cleo.recorders module#

Contains basic recorders.

class cleo.recorders.GroundTruthSpikeRecorder(*, name: str = _Nothing.NOTHING, save_history: bool = True)[source]#

Bases: Recorder

Reports the number of spikes seen since last queried for each neuron.

This amounts effectively to the number of spikes per control period. Note: this will only work for one neuron group at the moment.

Method generated by attrs for class GroundTruthSpikeRecorder.

connect_to_neuron_group(neuron_group)[source]#

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.

Parameters:
  • neuron_group (NeuronGroup) –

  • **kwparams (optional) – Passed from inject

get_state() NDArray[Any, UInt][source]#
Returns:

n_neurons-length array with spike counts over the latest control period.

Return type:

NDArray[(n_neurons,), np.uint]

neuron_group: NeuronGroup#
class cleo.recorders.RateRecorder(i: int, *, name: str = _Nothing.NOTHING, save_history: bool = True)[source]#

Bases: Recorder

Records firing rate from a single neuron.

Firing rate comes from Brian’s PopulationRateMonitor

Method generated by attrs for class RateRecorder.

connect_to_neuron_group(neuron_group)[source]#

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.

Parameters:
  • neuron_group (NeuronGroup) –

  • **kwparams (optional) – Passed from inject

get_state()[source]#

Return current measurement.

i: int#

index of neuron to record

mon: PopulationRateMonitor#
class cleo.recorders.VoltageRecorder(voltage_var_name: str = 'v', *, name: str = _Nothing.NOTHING, save_history: bool = True)[source]#

Bases: Recorder

Records the voltage of a single neuron group.

Method generated by attrs for class VoltageRecorder.

connect_to_neuron_group(neuron_group)[source]#

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.

Parameters:
  • neuron_group (NeuronGroup) –

  • **kwparams (optional) – Passed from inject

get_state() Quantity[source]#
Returns:

Current voltage of target neuron group

Return type:

Quantity

mon: StateMonitor#
voltage_var_name: str#

Name of variable representing membrane voltage