inject_currents_into_populations#
- inject_currents_into_populations( ) None[source]#
Injects input currents into the specified populations.
Sets up time-varying current injection using NEURON’s IClamp and Vector.play() mechanisms. This function only sets up the current injection - spike recording and simulation execution must be handled separately by the user.
- Parameters:
populations (Sequence[_Pool]) – The populations of neurons to inject current into.
input_current__AnalogSignal (CURRENT__AnalogSignal) – The analog signal of input currents to inject into the population. Shape should be (time_points, n_pools) where n_pools matches len(populations).
- Returns:
Current injection mechanisms are attached to the neurons as side effects.
- Return type:
None
- Raises:
ValueError – If the number of populations does not match the number of current channels.
Notes
Current injection vectors and IClamp objects are stored on each cell as cell._stim_vectors to prevent garbage collection
The user is responsible for setting up spike recording and calling h.run()