PyNN
PyNN copied to clipboard
Inconsistent behaviour of NoisyCurrentSource
The documentation is not clear for the following case: when NoisyCurrentSource
is injected into multiple cells with NoisyCurrentSource(...).inject_into(cells)
does each cell get a different noise current?
Also, the documentation says that NoisyCurrentSource
takes a rng
argument, when in fact, it does not (PyNN 0.9.1)
Does this mean there is no way to control the random seed of the NoisyCurrentSource
?
This currently depends on the simulator that is chosen to run the execution
- NEURON/Brian: Same noisy current gets injected in all target cells that share the same
NoisyCurrentSource
- NEST: Each cell gets a different noisy current, even if they share the same
NoisyCurrentSource
NoisyCurrentSource
earlier used to accept an RNG parameter, but currently this is not available. This is planned to be reintroduced (see #439).
We shall update the documentation accordingly. Thanks for pointing that out.
Hi Shailesh, I had not realized that each cell gets a different current with NEST (although I should have, it is a typical NEST behaviour). This is a bug from the perspective of PyNN, and I think we shall have to reimplement NoisyCurrentSource for NEST using step_current_generator
.
@anandtrex for the current implementation, you can only set the global random seeds in the setup()
function.
@apdavison : Even for the current recording in NEST, it returns
The instantaneous average of the current evaluated for all the targets... giving the actual current when only one target is present Discussed here: https://github.com/nest/nest-simulator/pull/663 (posts Feb 21 onwards)
It would be nice if the NEST parrot neuron supported passing on currents as well as spikes, as HEP suggests in that thread, but for the time being I think the only solution is to reimplement NoisyCurrentSource using step_current_generator. We should also create a native_electrode()
class factory, by analog to native_cell_type
, so that people can use the original noise_generator if needed for efficiency reasons.
@apdavison @appukuttan-shailesh Thanks for the quick response.
@anandtrex for the current implementation, you can only set the global random seeds in the setup() function.
I do set up the global random seed in the setup function. It's good to know that this is sufficient for reproducibility. (Perhaps this could be documented in the NoisyCurrentSource
?)
I've changed the title of the issue, since the issue is not really with the documentation but with NEST having different behaviour to NEURON and Brian.