calix.common.madc_base.MembraneRecorder

class calix.common.madc_base.MembraneRecorder

Bases: calix.common.madc_base.Recorder

Record, plot and save a trace of each neuron via the MADC.

Note that here, the neuron is recorded without any stimuli. You may want to derive a class for your experiment setup and configure a suitable stimulate() function.

Example usage: >>> from calix.common import madc_base >>> recorder = madc_base.MembraneRecorder() >>> recorder.prepare_recording(connection) >>> samples = recorder.record_traces( … connection, builder=base.WriteRecordingPlaybackProgramBuilder()) >>> recorder.plot_traces(samples)

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

neuron_config_disabled(neuron_coord)

Return a neuron config in silent state, i.e. disconnected from the common readout lines.

neuron_config_readout(neuron_coord)

Return a neuron config with readout active and connected to the readout lines.

plot_traces(samples)

Plot recorded traces, and save them as png figures.

stimulate(builder, neuron_coord, …)

Send no stimuli to the observed neuron.

neuron_config_disabled(neuron_coord: pyhalco_hicann_dls_vx_v3.NeuronConfigOnDLS)pyhaldls_vx_v3.NeuronConfig

Return a neuron config in silent state, i.e. disconnected from the common readout lines.

Parameters

neuron_coord – Coordinate of neuron to get config for.

Returns

Neuron config with readout disabled.

neuron_config_readout(neuron_coord: pyhalco_hicann_dls_vx_v3.NeuronConfigOnDLS)pyhaldls_vx_v3.NeuronConfig

Return a neuron config with readout active and connected to the readout lines.

Parameters

neuron_coord – Coordinate of neuron to get config for.

Returns

Neuron config with readout enabled.

static plot_traces(samples: List[numpy.ndarray])

Plot recorded traces, and save them as png figures.

Each neurons’ trace is plotted in its own figure, saved postfixed with the neuron id from enumerating the list. You may slice the original samples in order to save runtime while plotting.

Parameters

samples – List of recorded MADC samples, as returned by the record_traces() function.

stimulate(builder: calix.common.base.WriteRecordingPlaybackProgramBuilder, neuron_coord: pyhalco_hicann_dls_vx_v3.NeuronConfigOnDLS, stimulation_time: pyhaldls_vx_v3.Timer.Value)calix.common.base.WriteRecordingPlaybackProgramBuilder

Send no stimuli to the observed neuron.

Note

Overwrite this function in order to send arbitrary stimuli during the MADC recording.

E.g., synaptic inputs could be sent to observe their shape.

Parameters
  • builder – Builder to append stimulation instructions to.

  • neuron_coord – Coordinate of neuron which is currently recorded.

  • stimulation_time – Timer value at beginning of stimulation.

Returns

Builder with stimulation instructions appended.