|
@@ -1,9 +1,9 @@
|
|
|
function [STA_output]=BC_STA(loadData,filename,pixelSize,seed,Hz)
|
|
|
-%[STA_output]=BC_STA(loadData,filename,pixelSize,seed)
|
|
|
+%[STA_output]=BC_STA(loadData,filename,pixelSize,seed,Hz)
|
|
|
%this function loads the voltage trace of the selected bipolar cell (BC)
|
|
|
%and perorms a response-weighted average analysis analogous to the commonn
|
|
|
%spike-triggered average (STA). For simplicity we refer to the analysis
|
|
|
-%STA,even though we work with a continous voltage signal and not spikes.
|
|
|
+%STA,even though we work with a continous voltage signal and not spikes.
|
|
|
%Inputs:
|
|
|
% loadData = the folder path of the white noise files
|
|
|
% filename = the filename of the BC of interest
|
|
@@ -75,9 +75,10 @@ STA_3D=reshape(STA_2D,Ny,Nx, ...
|
|
|
|
|
|
%-------------------------------------------------------------------------------
|
|
|
%% 5. Make a zoom-in of the STA
|
|
|
-%cut a window of around 100 micrometer on each side from the maximum. The
|
|
|
-%zoom-in of the STA is better to avoid overfitting for the NL and
|
|
|
-%prediction.
|
|
|
+%For simplification and to keep the code simple, I cut a window of around
|
|
|
+%100 micrometer on each side from the maximum. A zoom-in of the STA is better
|
|
|
+%to avoid overfitting for the NL and prediction.See Methods part of the
|
|
|
+%manuscript and comment-section 7 below for how it is done in the manuscript.
|
|
|
oneCheckInMicron=pixelSize*microPerPix;
|
|
|
zoom_RF=ceil(100/oneCheckInMicron);
|
|
|
|
|
@@ -133,12 +134,13 @@ STA_output.pixelSize=pixelSize;
|
|
|
%the highest-ranked spatial and temporal component has to be defined e.g. by manually looking
|
|
|
%at the components.
|
|
|
%From here, I fitted a 2D Gaussian to the best spatial component.
|
|
|
-%Important for nonlinearity calculation:
|
|
|
+%Important for nonlinearity and prediction calculation:
|
|
|
%To avoid noise contributions from pixels outside the receptive field, I reduced
|
|
|
%the number of elements in the STA by setting pixel values of the STA outside
|
|
|
%the 3-sigma contour of the Gaussian fit to zero and re-separating the spatiotemporal
|
|
|
%receptive field within this window into the highest-ranked spatial and temporal components
|
|
|
-%by singular-value decomposition. Each component was then normalized to unit Euclidean norm. E.g.
|
|
|
+%by singular-value decomposition. To compute the nonlinearity, each component
|
|
|
+%was normalized to unit Euclidean norm. E.g.
|
|
|
%sp_bestnorm=normSTA(sp_best);
|
|
|
%temp_bestnorm=normSTA(temp_best);
|
|
|
|