calix.spiking.neuron_threshold.ThresholdCalibMADC

class calix.spiking.neuron_threshold.ThresholdCalibMADC(target: Union[int, numpy.ndarray] = 125)

Bases: calix.common.madc_base.Calib

Calibrate the neurons’ spike threshold potential using the MADC.

A constant current is injected onto the membrane, with the leak disabled and the reset potential set low. This means we observe regular spikes. The maximum recorded voltage at the MADC is just below the threshold potential, we use it as threshold measurement.

Requirements: - None -

Variables

neuron_configs – List of neuron configs that will be used as basis for the neuron_config_disabled and neuron_config_readout functions.

__init__(target: Union[int, numpy.ndarray] = 125)

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

Methods

__init__([target])

Initialize self.

configure_parameters(builder, parameters)

Configure the given array of threshold voltages.

evaluate(samples)

Evaluates the obtained MADC samples.

neuron_config_disabled(neuron_coord)

Return a neuron config with readout disabled.

neuron_config_readout(neuron_coord)

Return a neuron config with readout enabled.

postlude(connection)

Disable offset current CapMem cell again.

prelude(connection)

Prepares chip for calibration.

stimulate(builder, neuron_coord, …)

Empty function.

configure_parameters(builder: calix.common.base.WriteRecordingPlaybackProgramBuilder, parameters: numpy.ndarray)calix.common.base.WriteRecordingPlaybackProgramBuilder

Configure the given array of threshold voltages.

Parameters
  • builder – Builder to append configuration instructions to.

  • parameters – Array of threshold voltages to set up.

Returns

Builder with configuration appended.

evaluate(samples: List[numpy.ndarray])numpy.ndarray

Evaluates the obtained MADC samples.

For each neuron’s MADC samples the maximum is determined which is assumed to be near the threshold voltage.

Parameters

samples – MADC samples obtained for each neuron.

Returns

Numpy array of measured threshold voltages.

neuron_config_disabled(neuron_coord: pyhalco_hicann_dls_vx_v3.NeuronConfigOnDLS)pyhaldls_vx_v3.NeuronConfig

Return a neuron config with readout disabled.

The synaptic input and the offset current are disabled as well.

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 enabled. Also, the offset current and threshold comparator are enabled for regular spiking.

Parameters

neuron_coord – Coordinate of neuron to get config for.

Returns

Neuron config with readout enabled.

postlude(connection: pyhxcomm_vx.ConnectionHandle)

Disable offset current CapMem cell again.

Parameters

connection – Connection to the chip to run on.

prelude(connection: pyhxcomm_vx.ConnectionHandle)

Prepares chip for calibration.

Disable leak, set a low reset voltage and the offset current. Note that only the amplitude of the current is set but it is not enabled.

Parameters

connection – Connection to the chip to calibrate.

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

Empty function. The offset current is enabled already in the neuron_config_readout, therefore no stimuli are neccesary.

Parameters
  • builder – Builder to append neuron resets to.

  • neuron_coord – Coordinate of neuron which is currently recorded.

  • stimulation_time – Timer value at beginning of stimulation.

Returns

Builder with neuron resets appended.