pynn_brainscales.brainscales2.recording.Recorder
-
class
pynn_brainscales.brainscales2.recording.Recorder(population, file=None) Bases:
pyNN.recording.Recorder,pygrenade_vx.network.abstract.frontend.ExperimentElement-
__init__(population, file=None) Create a recorder.
- population – the Population instance which is being recorded by the
recorder
- file – one of:
a file-name,
None (write to a temporary file)
False (write to memory).
Methods
__init__(population[, file])Create a recorder.
add_analog_recording(segment, snippet_idx, …)Add the analog samples to the segment.
add_recording(segment, snippet_idx, variable, *)Add the recorded samples to the segment.
add_spike_trains(segment, snippet_idx, ids, *)Add the recorded spike trains to the segment.
add_to_input_data(experiment, …)Add element to experiment snippet’s input data.
add_to_topology(experiment)Add element to experiment snippet’s topology.
extract_output_data(experiment)Extract output data of element from experiment snippet.
filter_recorded(variable, filter_ids)get(variables[, gather, filter_ids, clear, …])Return the recorded data as a Neo Block.
is_spike_observable(recording_sites, name)Test if the given variable is of spiking type.
record(variables, ids[, sampling_interval, …])Add the cells in ids to the sets of recorded cells for the given variables.
Attributes
-
add_analog_recording(segment: neo.core.segment.Segment, snippet_idx: int, variable: str, ids: List[pynn_brainscales.brainscales2.recording_data.RecordingSite], *, device: str = 'madc', clear: bool = True) → None Add the analog samples to the segment.
- Parameters
segment – Segment to which add the data.
snippet_idx – Snipped for from which to get the samples.
variable – Name of variable for which to get the data.
device – Device for which get the samples. I.e. CADC or MADC.
ids – Ids for which to get data.
clear – Clear recorded data.
-
add_recording(segment: neo.core.segment.Segment, snippet_idx: int, variable: str, *, filter_ids=None, clear: bool = True) → None Add the recorded samples to the segment.
- Parameters
segment – Segment to which add the data.
snippet_idx – Snipped for from which to get the samples.
variable – Name of variable for which to get the data.
filter_ids – Ids of cells for which to get the data. If None, the samples of all cells are retrieved.
clear – Clear recorded data.
-
add_spike_trains(segment: neo.core.segment.Segment, snippet_idx: int, ids: List[pynn_brainscales.brainscales2.recording_data.RecordingSite], *, clear: bool = True, variable: str = 'spikes') → None Add the recorded spike trains to the segment.
- Parameters
segment – Segment to which to add the spike trains.
snippet_idx – Snipped for from which to get the spike trains.
ids – Ids for which to get data.
clear – Clear recorded data.
variable – Name of mechanism that was recorded.
-
add_to_input_data(experiment: pygrenade_vx.network.abstract.frontend.ExperimentSnippet, snippet_begin_time, snippet_end_time) Add element to experiment snippet’s input data.
If the snippet doesn’t contain the element yet, it is added. If it is already contained it is updated, if changed_input_data is True. The method is called after mapping is available.
- Parameters
experiment – Experiment snippet for which to add this element into the snippet’s input data
snippet_begin_time – Time at which the snippet begins
snippet_end_time – Time at which the snippet ends
-
add_to_topology(experiment: pygrenade_vx.network.abstract.frontend.ExperimentSnippet) Add element to experiment snippet’s topology.
If the snippet doesn’t contain the element yet, it is added. If it is already contained it is updated, if changed_topology is True. This method is called before the potential mapping operation.
- Parameters
experiment – Experiment snippet for which to add this element into the snippet’s topology
- Returns
Whether the element was added to the topology. The experiment doesn’t track interdependencies defining the order in which the elements can be added to the topology. Therefore this method is expected to perform the check whether the element can be added or updated, in which case the return value is expected to be True.
-
extract_output_data(experiment: List[pygrenade_vx.network.abstract.frontend.ExperimentSnippet]) Extract output data of element from experiment snippet. This method is called after execution of the experiment. Storage in the front end format is to be performed by the front end.
- Parameters
experiment – Experiment snippet from which to extract this element’s output data
-
filter_recorded(variable, filter_ids)
-
get(variables, gather=False, filter_ids=None, clear=False, annotations=None, locations=None) Return the recorded data as a Neo Block.
-
is_spike_observable(recording_sites: List[pynn_brainscales.brainscales2.recording_data.RecordingSite], name: str) → bool Test if the given variable is of spiking type.
The observable has to have the same type in all compartments otherwise, an error is raised.
- Parameters
recording_sites – Locations where the variable should be recorded.
name – Name of the variable.
- Returns
If the variable is of type spike.
- Raises
RuntimeError – If the type is not the same at all locations.
-
record(variables, ids, sampling_interval=None, locations=None, *, device='madc') Add the cells in ids to the sets of recorded cells for the given variables.
-