Synthesis of spatial tuning functions from theta cell spike trains (Welday et al., 2011)

 Download zip file   Auto-launch 
Help downloading and running models
A single compartment model reproduces the firing rate maps of place, grid, and boundary cells by receiving inhibitory inputs from theta cells. The theta cell spike trains are modulated by the rat's movement velocity in such a way that phase interference among their burst pattern creates spatial envelope function which simulate the firing rate maps.
1 . Welday AC, Shlifer IG, Bloom ML, Zhang K, Blair HT (2011) Cosine directional tuning of theta cell burst frequencies: evidence for spatial coding by oscillatory interference. J Neurosci 31:16157-76 [PubMed]
Citations  Citation Browser
Model Information (Click on a link to find other models with that property)
Model Type: Neuron or other electrically excitable cell;
Brain Region(s)/Organism:
Cell Type(s): Hippocampus CA1 pyramidal GLU cell; Hippocampus CA3 pyramidal GLU cell; Entorhinal cortex stellate cell;
Channel(s): I Na,p;
Gap Junctions:
Receptor(s): GabaA; AMPA;
Transmitter(s): Gaba; Glutamate;
Simulation Environment: NEURON; MATLAB;
Model Concept(s): Synchronization; Envelope synthesis; Grid cell; Place cell/field;
Implementer(s): Blair, Hugh T.;
Search NeuronDB for information about:  Hippocampus CA1 pyramidal GLU cell; Hippocampus CA3 pyramidal GLU cell; GabaA; AMPA; I Na,p; Gaba; Glutamate;
function [peak, base, phase, gof] = cosfit8(x,orig,peaktopeak,peakoff,zeroline,dirt)

%COSFIT8    Create plot of datasets and fits
%   Creates a plot, similar to the plot in the main curve fitting
%   window, using the data that you provide as input.  You can
%   apply this function to the same data you used with cftool
%   or with different data.  You may want to edit the function to
%   customize the code and this help message.
%   Number of datasets:  1
%   Number of fits:  1

% Data from dataset "orig vs. x with dirt":
%    X = x:
%    Y = orig:
%    Weights = dirt:
% This function was automatically generated on 10-Jun-2009 19:25:01

% Set up figure to receive datasets and fits
f_ = clf;
set(f_,'Units','Pixels','Position',[1772 364 680 484]);
legh_ = []; legt_ = {};   % handles and text for legend
xlim_ = [Inf -Inf];       % limits of x axis
ax_ = axes;
set(ax_,'Units','normalized','OuterPosition',[0 0 1 1]);
axes(ax_); hold on;

% --- Plot data originally in dataset "orig vs. x with dirt"
x = x(:);
orig = orig(:);
dirt = dirt(:);
h_ = line(x,orig,'Parent',ax_,'Color',[0.333333 0 0.666667],...
     'LineStyle','-', 'LineWidth',1,...
     'Marker','.', 'MarkerSize',12);
xlim_(1) = min(xlim_(1),min(x));
xlim_(2) = max(xlim_(2),max(x));
legh_(end+1) = h_;
legt_{end+1} = 'orig vs. x with dirt';

% Nudge axis limits beyond data limits
if all(isfinite(xlim_))
   xlim_ = xlim_ + [-1 1] * 0.01 * diff(xlim_);

% --- Create fit "fit 1"
ok_ = ~(isnan(x) | isnan(orig) | isnan(dirt));
st_ = [peaktopeak peakoff zeroline ];
ft_ = fittype('a*cos(x+b)+c' ,...
     'coefficients',{'a', 'b', 'c'});

% Fit this model using new data
[cf_, gof] = fit(x(ok_),orig(ok_),ft_ ,'Startpoint',st_,'Weight',dirt(ok_),'Lower',[0 -Inf 0], 'Upper', [Inf Inf 20]);

% Or use coefficients from the original fit:
if 0
   cv_ = {-0.2906144055756, 2.924742804905, 7.52847430406};
   cf_ = cfit(ft_,cv_{:});

% Plot this fit
h_ = plot(cf_,'fit',0.95);
legend off;  % turn off legend from plot method call
set(h_(1),'Color',[1 0 0],...
     'LineStyle','-', 'LineWidth',2,...
     'Marker','none', 'MarkerSize',6);
legh_(end+1) = h_(1);
legt_{end+1} = 'fit 1';

% Done plotting data and fits.  Now finish up loose ends.
hold off;
h_ = legend(ax_,legh_,legt_,'Location','NorthEast');  
ylabel(ax_,'');               % remove x label
xlabel(ax_,['r2=' num2str(round(gof.rsquare*1000)/1000) '; pd=' num2str(round((2*pi-phase)*100)/100) '; bl=' num2str(round(base*100)/100)]); % remove y label
% title(['preferred direction = ' num2str(phi)])