Grid cell model with compression effects (Raudies & Hasselmo, 2015)

 Download zip file 
Help downloading and running models
Accession:194881
We present a model for compression of grid cell firing in modules to changes in barrier location.
Reference:
1 . Raudies F, Hasselmo ME (2015) Differences in Visual-Spatial Input May Underlie Different Compression Properties of Firing Fields for Grid Cell Modules in Medial Entorhinal Cortex. PLoS Comput Biol 11:e1004596 [PubMed]
Model Information (Click on a link to find other models with that property)
Model Type:
Brain Region(s)/Organism: Entorhinal cortex;
Cell Type(s):
Channel(s):
Gap Junctions:
Receptor(s):
Gene(s):
Transmitter(s):
Simulation Environment: MATLAB;
Model Concept(s): Grid cell;
Implementer(s): Raudies, Florian [florian.raudies at gmail.com];
/
RaudiesHasselmo2015
DotWorld
screenshots
README.html
attractorModel.m
errorarea.m
estimatePosition.m
estimateVelocity.m
Fig2.m
Fig3.m
Fig4.m
FigS1.m
FigS3.m
gpl-3.0.txt *
gridScoreForActivity.m
gridScoreForSpikes.m
ModuleModel.m
randomTrajectory.m
rescaleCorr.m
SimConfA.m
SimConfA.mat
SimConfB.m
SimConfB.mat
SimNoiseWithBias.m
SimNoiseWoutBias.m
TestEstimatePosition.m
vcoModel.m
                            
function [CorrCoeff, Stretch] = rescaleCorr(X, Y, opt)
% rescaleCorr
%   X   - First input 2D matrix.
%   Y   - Second input 2D matrix.
%   opt - Structure with fields:
%         * scale - Compression scale that refers to 100% compression.
%
% RETURN
%   CorrCoff    - Correlation coefficient for all tested stretches along
%                 the 1st dimension.
%   Strecth     - Tested strech ratios.
%
%   Copyright (C) 2015  Florian Raudies, 05/02/2015, Palo Alto, CA.
%   License, GNU GPL, free software, without any warranty.
%

nX1         = size(X,1);
nY1         = size(Y,1);
scale       = opt.scale;
nStretch    = 51;
CorrCoeff   = zeros(nStretch, 1);
Stretch     = linspace(0.6, 1.15, nStretch); % Range of stretch factors.

if nX1~=nY1,    
    X = interp1(linspace(-1,+1,nX1)',X,linspace(-scale,scale,nY1)','*linear');    
    Original    = linspace(-scale,scale,nY1);
    for iStretch = 1:nStretch,
        stretch                     = Stretch(iStretch);
        Rescale                     = linspace(-stretch,+stretch,nY1);
        YStretch                    = interp1(Rescale',Y,Original',...
                                              '*linear');
        YStretch(isnan(YStretch))   = 0;
        CorrCoeff(iStretch)         = corrCoeff(X,YStretch);
    end
    
    Stretch = 2*(Stretch - scale)/scale; % strech = 2/3 is 100%
else
    error('Matlab:IO','Only supports matching for the 1st dimension!');
end


function r = corrCoeff(X,Y)

    X = X(:);
    Y = Y(:);
    X = X - mean(X);
    Y = Y - mean(Y);
    r = sum(X.*Y)./(eps + sqrt(sum(X.^2).*sum(Y.^2)));
    

Loading data, please wait...