### Inacurrate Number of Spikes While Using Random Netstim

Posted:

**Fri Nov 11, 2016 6:39 pm**Hello,

I am trying to run a parameter search by varying the number of excitatory and inhibitory synapses on a multi-compartment model as well as their corresponding presynaptic firing rates. It is also important that these presynaptic spikes occur at random times. For the presynaptic spike parameters (i.e. netstim parameters) I use the following for each of the synapses:
Unfortunately, I am finding that when I set the fractional randomness to 1 (i.e. netstim.noise), I occasionally get less presynaptic spikes than expected (i.e. according to the value declared by netstim.number versus the value obtained using netcon.record(vec)). Presumably this is because the values taken from the negative exponential distribution occasionally generate presynaptic spike times > tstop(?). Since this introduces inaccuracies in my parameter search, I need to find a way to circumvent this issue. Is there a quick and easy way to re-sample from the negative exponential distribution during events where the spike times exceed tstop (or any other potential fixes for this)?

My guess on how to do this would be to implement this somehow while putting together code for generating independent random spike streams, according to https://www.neuron.yale.edu/neuron/node/60. I haven't implemented independent random spike streams yet because my code is not parallelized and for any given simulation in the parameter search each synapse is assigned the same netstim parameters (i.e. it did not seem necessary). Any advice would be most helpful.

Thanks,

Alex GM

I am trying to run a parameter search by varying the number of excitatory and inhibitory synapses on a multi-compartment model as well as their corresponding presynaptic firing rates. It is also important that these presynaptic spikes occur at random times. For the presynaptic spike parameters (i.e. netstim parameters) I use the following for each of the synapses:

Code: Select all

```
tstop = 1000
netstim.number = 2 to 10 // Varied according to parameter search
netstim.interval = tstop/netstim.number
netstim.start = 0
and netstim.noise = 1
```

My guess on how to do this would be to implement this somehow while putting together code for generating independent random spike streams, according to https://www.neuron.yale.edu/neuron/node/60. I haven't implemented independent random spike streams yet because my code is not parallelized and for any given simulation in the parameter search each synapse is assigned the same netstim parameters (i.e. it did not seem necessary). Any advice would be most helpful.

Thanks,

Alex GM