-
Notifications
You must be signed in to change notification settings - Fork 0
random_raster.m
Generate a random raster of axon spikes following the specified non-stationary population firing rate, for models.nerve_recording. Two syntaxes will be supported:
raster = random_raster(time, g_xy, [opts]) % used by models.nerve_recording
raster = models.random_raster( 'name',value, ... ) % NOT IMPLEMENTED YET
Several non-stationary population codes are supported (as detailed below) as well as stationary (Poisson) spiking. Within a population of the specified size, individual axons' spike-rates are lognormally distributed around the population average spike-rate. Specifically, if the population spike-rate is some value .ax_sd = val
then the spike-rate
.type
= 'poisson'
(or 'stationary'
or 'flat'
):
Parameters (fields of opts
) and default values:
-
.fb [2]
=$c$ : baseline, imp/s (constant rate)
.type
= 'raised_cosine'
(or 'cos'
):
Parameters (fields of opts
) and default values:
-
.fb [2]
=$r_{base}$ : baseline, imp/s -
.fp [40]
=$r_{peak}$ : max spikerate, imp/s -
.ph [0]
=$\phi$ : phase offset, radians -
.fc [30]
=$f$ : frequency of population firing-rate modulation, Hz -
.ex [4]
=$a$ : exponent
.type
= 'double_exponential'
(or 'exp2'
) :
Parameters (fields of opts
) and default values:
-
.fb [2]
=$r_{base}$ : baseline, imp/s -
.fp [40]
=$r_{peak}$ : peak, imp/s (note that the peak might not achieve that value if$\tau_1$ is not much less than$\tau_2$ -
.t0 [0]
=$t_0$ : onset time, ms -
.tau1 []
=$\tau_1$ : onset time constant, ms -
.tau2 []
=$\tau_2$ : decay time constant, ms
.type
= 'step_function'
(or 'step'
) :
Parameters (fields of opts
) and default values:
-
.fb [2]
= $r_{init}
: starting rate, imp/s -
.fp [40]
=$r_{final}$ : ending rate, imp/s -
.t0 [0]
=$t_{50}$ : half-maximal time, ms -
.ex [4]
=$\tau$ : 1 / slope of step at half-maximal point, ms.
The step covers ~46% of the difference between peak and base in the time between
-
.dt [1]
: bin size for spike-rate histogram -
.ax_sd [1]
: imp/s, intra-population coherence -
.pop_dist 'lognormal'
: if set to'normal'
, use a modified population coherence equation:
note: these mostly not implemented yet
-
-mat
: save output as .mat file -
-xml
: save output as .xml file -
-json
: save output as .json file -
-roi [start end] or [0 end]
: duration of simulated spike-train -
-count [n_axons]
: number of axons in population
Field | Type | Description |
---|---|---|
spk_time |
double nSpikes x 1 | time of the nth spike (at the reference spatial location, wherever that is decided to be by the code utilising this output) |
spk_axon |
integer nSpikes x 1 | axon ID of the nth spike |
spk_rate |
double 1 x nBins | binned population spike_rate (as generated) |
bin_time |
double 1 x nBins | time vector for binned population spike-rate |
bin_rate |
double 1 x nBins | target population spike_rate (from input arguments) |
pop_rate |
double 1 x nTime | target population spike_rate, interpolated to match input time vector defined in the input arguments |
axon_group |
double nAxons x 1 | (sample_id).(fascicle_id) for each axon in this population (see axons.mat) |