Spike Train Generation
To generate spike trains, the user should create a description file
referred to as a "generation file" or ".ndg file". The file allows
the user to specify the type of algorithm for making spikes (listed
below) in addition to three types of parameters:
- constant - these are held constant.
- variable (or "stimulus") - these parameters are varied from trial
to trial in a systematic manner. They can be used to simulate an
experiment in which the variation of a stimulus parameter influences
neuronal firing rate.
- population - These parameters allow the generation of
multiple data files with different properties. If the user asks for
100 data files to be generated, for each file, a new value of each
population parameter is chosen from its specified distribution
(choices are listed below).
See .../libc/ndata.h for the format of the 'ndg' file.
Generation algorithms
- poisson - single unit, Poisson (or kth order Poisson intervals)
with refraction.
- nth - order of intervals to pick (1=Poisson; 2=2nd order Gamma)
- rmu - mean refractory period.
- rsigma - SD of refractory period.
- poisson_pair - two units
- fp_base - 0.010
- fp_box 0.100
- bimod - pair of units, common modulated drive.
- p - inclusion prob?
- fpmin - firing prob. minimum (e.g. 0.005)
- fpmax - firing prob. maximum (e.g. 0.400)
- sigs - ?
- rsig - ?
- rmax - ?
- replicate - 1 or 0.
- lt_seed - 73252
- lt_seed2 - 20341
- lt_sigma - 5.0
- lt_amp_sigma - 0.1
- lt_bg_const - 1
- lt_base_mod - 0
- lt_common - 0
- contrib - A pair of units, source and target, are modeled
where the target spike train is the combination of a Poisson "other"
spike train and some fraction (psource) of spikes from a Poisson
source spike train.
- psource - probability of spike in 1ms bin on source
- pcontrib - probability of source spike being included in target train
- pother - probability of target spike generated in 1 bin (not from source)
- toff - time offset spikes contributed from source to target (msec)
- tsd - SD of Gaussian jitter added to contributed spikes (msec)
- common_p - From a source Poisson train of rate 'rs',
create a pair of spike trains by picking w/ prob p1 and p2 for
inclusion. Spikes in p2 can be jittered.
- rs - source rate (spikes/s)
- p1 - prob of picking source spike to put in Unit 1
- p2 - prob of picking source spike to put in Unit 2
- toff - mean of Gaussian noise added to C to create C' (msec)
- tsd - SD of Gaussian noise added to C to create C' (msec)
- collision - (0 by default) set to 1 to allow spike collisions to add
- common - Create a pair of spike trains S1 and S2 where S1
is the combination of A and C (both Poisson) and S2 is the combination
of B and C' (B is Poisson and C' is a jittered version of C).
- ra - spike rate of A (spikes/s)
- rb - spike rate of B (spikes/s)
- rc - spike rate of C (spikes/s)
- toff - mean of Gaussian noise added to C to create C' (msec)
- tsd - SD of Gaussian noise added to C to create C' (msec)
- collision - (0 by default) set to 1 to allow spike collisions to add
General parameters
- nfiles - number of data files to create.
- ntrials - number of trials.
- nrepeats - used when nvar > 0 (or nvar_link > 0)
- sampling - samples per second, typically 1000.0 (for msec).
- period - trial duration in sampling units.
- seed - randomization seed.
Distribution specifications for population parameters
- uniform_int [seed] [min] [max]
- uniform_float [seed] [min] [max]
- uniform_list [seed] [item1] [item2] ...
- list [item1] [item2] ... The list is used in this order,
repeatedly, until the requested number of files is used up. Deterministic.
EXAMPLE
#
# Generate an `opld120' data file
#
poisson
nfiles 1
nrepeats 20
period 2000
sampling 1000.0
nth 1
rmu 0.0
rsigma 0.0
cycles i 16
tf i 64
nvar_link 7
lambda f 5 5 5 10 20 60 100 60 20 10 5 5 5 10 20 60 100 65 35 65 100 60 20 10 5 5
ori1 i 0 30 60 90 120 150 180 210 240 270 300 330 300 330 0 30 60 90 120 150 180 210 240 270 0 0
ampl1 i 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 512 0 0
odiam1 i 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 0 0
ori2 i 60 90 120 150 180 210 240 270 300 330 0 30 60 90 120 150 180 210 240 270 300 330 0 30 0 0
ampl2 i 0 0 0 0 0 0 0 0 0 0 0 0 512 512 512 512 512 512 512 512 512 512 512 512 0 0
odiam2 i 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 256 0 0
EXAMPLE
#
# Generate A and B from a Poisson source C, by picking w/ p1 and p2
#
common_p
nfiles 20
ntrials 500
period 2000
sampling 1000.0
rs 200.0
p1 0.20
p2 0.20
toff 0.0
tsd 0.0
collision 1
npop 1
seed uniform_int 1777 1 10000
EXAMPLE
#
# Generate Poisson spike trains.
#
poisson
nfiles 50
ntrials 500
period 2000
sampling 1000.0
nth 1
rmu 0.0
rsigma 0.0
nvar 1
lambda f 5.0 15.0 25.0 35.0 45.0 55.0 65.0 75.0 85.0 95.0
npop 1
seed uniform_int 1777 1 10000
EXAMPLE
#
# Generate spike trains.
#
bimod
nfiles 20
ntrials 500
period 2000
sampling 1000.0
p 0.1
fpmin 0.005
fpmax 0.400
sigs 4.0
rsig 0.0
rmax 1.0
npop 1
seed uniform_int 1777 1 10000
EXAMPLE
#
# Generate spike trains.
#
bimod
nfiles 24
period 2000
sampling 1000.0
p 0.1
fpmin 0.005
fpmax 0.400
sigs 4.0
rsig 0.0
rmax 1.0
lt_seed 73252
lt_sigma 5.0
lt_amp_sigma 0.1
lt_common 0
replicate 1
npop 2
seed uniform_int 1777 1 10000
ntrials list_int 30 82 60 60 30 30 90 60 90 60 60 30 119 35 56 150 30 60 60 90 30 58 210 90
EXAMPLE
#
# Generate source and target spike trains to test efficacy measure
#
contrib
nfiles 1
ntrials 1000
period 2000
sampling 1000.0
psource 0.1
pcontrib 0.5
pother 0.1
toff 6.0
tsd 2.0
EXAMPLE
#
# Generate S1 and S2 from a mixture of A, B, C
#
common
nfiles 1
ntrials 200
period 2000
sampling 1000.0
ra 20
rb 20
rc 20
toff 0.0
tsd 2.0
collision 0
seed 1777