cleo.recorders module#
Contains basic recorders.
- class cleo.recorders.GroundTruthSpikeRecorder(*, name: str = NOTHING, save_history: bool = True)[source]#
Bases:
cleo.base.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() nptyping.types._ndarray.NDArray[Any, nptyping.types._number.UInt] [source]#
- Returns
n_neurons-length array with spike counts over the latest control period.
- Return type
NDArray[(n_neurons,), np.uint]
- neuron_group: brian2.groups.neurongroup.NeuronGroup#
- class cleo.recorders.RateRecorder(i: int, *, name: str = NOTHING, save_history: bool = True)[source]#
Bases:
cleo.base.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
- i: int#
index of neuron to record
- class cleo.recorders.VoltageRecorder(voltage_var_name: str = 'v', *, name: str = NOTHING, save_history: bool = True)[source]#
Bases:
cleo.base.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() brian2.units.fundamentalunits.Quantity [source]#
- Returns
Current voltage of target neuron group
- Return type
Quantity
- voltage_var_name: str#
Name of variable representing membrane voltage