calix.hagen.neuron_synin.SynReferenceCalibMADC

class calix.hagen.neuron_synin.SynReferenceCalibMADC

Bases: calix.common.madc_base.Calib

Calibrate synaptic input reference potentials using the MADC.

This calibration requires the leak bias currents to be zero, which is set in the prelude. The leak bias currents are NOT restored, since the target use case is PPU-based hagen mode integration with leakage disabled.

As for all calibrations based on the MADC calibration, neuron configurations and readout configuration are changed during calibration and restored afterwards.

To measure the current output of the synaptic input OTA, the membrane potential is observed while floating (with the leak term disabled). Initially, the membrane is reset. Once the refractory period ends and the reset is released, we fit to the membrane potential: If a constant current flows onto the membrane, it increases or decreases linearly. We search the reference potential settings for minimum constant currents, i.e. such that the membrane potential stays constant after the reset is released.

Requirements: * The synaptic input is enabled and configured with the desired bias

currents (i_bias_synin_{exc,inh}_gm).

  • The refractory time has to be set as expected_refractory_time. We use this parameter to select the start time of the fit.

Variables
  • n_runs – Take the average of multiple measurements in each step of the calibration. Defaults to 1 (no averaging).

  • expected_refractory_time – Configured refractory time. Used to determine the start point of the linear fit, which should begin once the reset is released and the membrane potential starts drifting.

__init__()

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

Methods

__init__()

Initialize self.

configure_parameters(builder, parameters)

Configures the given array of synaptic input reference potentials.

evaluate(samples)

Evaluates the obtained MADC samples.

measure_results(connection, builder)

Executes multiple measurements on chip, returns the mean result.

neuron_config_disabled(neuron_coord)

Return a neuron config with readout disabled.

neuron_config_readout(neuron_coord)

Return a neuron config with readout enabled.

prelude(connection)

Prepares chip for calibration.

stimulate(builder, neuron_coord, …)

Reset the neuron’s membrane potential.

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

Configures the given array of synaptic input reference potentials.

Parameters
  • builder – Builder to append configuration instructions to.

  • parameters – Array of reference potentials to set up.

Returns

Builder with configuration appended.

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

Evaluates the obtained MADC samples.

To each neuron’s MADC samples, a linear function is fitted, and the slope is returned.

Parameters

samples – MADC samples obtained for each neuron.

Returns

Numpy array of fitted slopes.

measure_results(connection: pyhxcomm_vx.ConnectionHandle, builder: calix.common.base.WriteRecordingPlaybackProgramBuilder)numpy.ndarray

Executes multiple measurements on chip, returns the mean result.

Parameters
  • connection – Connection to the chip to calibrate.

  • builder – Builder to append measurement program to.

Returns

Numpy array of mean results.

neuron_config_disabled(neuron_coord)pyhaldls_vx_v3.NeuronConfig

Return a neuron config with readout disabled.

Returns

Neuron config with readout disabled.

neuron_config_readout(neuron_coord)pyhaldls_vx_v3.NeuronConfig

Return a neuron config with readout enabled.

Returns

Neuron config with readout enabled.

prelude(connection: pyhxcomm_vx.ConnectionHandle)

Prepares chip for calibration.

Enables the MADC and sets the leak bias currents to zero.

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

Reset the neuron’s membrane potential.

Parameters
  • builder – Builder to append resets to.

  • neuron_coord – Coordinate of neuron which is currently recorded.

  • stimulation_time – Timer value at beginning of stimulation.

Returns

Builder with reset appended.