cleo.stimulators module#

Contains basic stimulators.

class cleo.stimulators.StateVariableSetter(default_value: Any = 0, *, name: str = NOTHING, save_history: bool = True, variable_to_ctrl: str, unit: Unit)[source]#

Bases: cleo.base.Stimulator

Sets the given state variable of target neuron groups.

Method generated by attrs for class StateVariableSetter.


Connect device to given neuron_group.

If your device introduces any objects which Brian must keep track of, such as a NeuronGroup, Synapses, or Monitor, make sure to add these to brian_objects.

  • neuron_group (NeuronGroup) –

  • **kwparams (optional) – Passed from inject

neuron_groups: list[NeuronGroup]#
unit: Unit#

will be used in update()


Unit of controlled variable

update(ctrl_signal: float) None[source]#

Set state variable of target neuron groups


ctrl_signal (float) – Value to update variable to, without unit. The unit provided on initialization is automatically multiplied.

variable_to_ctrl: str#

Name of state variable to control