calix.hagen.neuron_leak_bias.MembraneTimeConstCalibOffset

class calix.hagen.neuron_leak_bias.MembraneTimeConstCalibOffset(target: quantities.quantity.Quantity, neuron_configs: Optional[List[pyhaldls_vx_v3.NeuronConfig]] = None)

Bases: calix.common.madc_base.Calib

Measure response to step current with MADC to calibrate the membrane time constant.

Due to the MADC’s high sample rate, an exponential fit on the decaying potential after a step current stimulus is used to determine the membrane time constant. Leak bias currents are tweaked to reach the desired membrane time constant.

This calibration decides whether leak division is required during prelude. The given neuron configs are therefore altered. The original neuron config (configured on chip before running the calibration) is not restored, instead we stay with the config used (and altered) during calibration.

Requirements: * Leak potential is calibrated to the desired value. This is useful

since the time constant is then calibrated at and above this selected potential.

  • The desired membrane time constant is larger than some 3 us, since leak multiplication is not supported by this calibration.

  • The synaptic input should be on; it should be calibrated or the bias currents should be set to 0. The reason is an effect on the membrane dynamics for some neurons, which looks similar to leakage. We recommend the synaptic input to be enabled and calibrated.

Variables
  • neuron_configs – List of desired neuron configurations. Necessary to enable leak division.

  • adjust_bias_range – Enable/disable adjustment of leak division to extend the dynamic range of calibration. By default, this setting is enabled and we select appropriate settings during the prelude.

__init__(target: quantities.quantity.Quantity, neuron_configs: Optional[List[pyhaldls_vx_v3.NeuronConfig]] = None)
Parameters

neuron_configs – List of neuron configurations. If None, the hagen-mode default neuron config is used for all neurons.

Methods

__init__(target[, neuron_configs])

param neuron_configs

List of neuron configurations. If None, the

configure_parameters(builder, parameters)

Configure the given array of leak bias currents.

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)

Restore original readout configuration.

prelude(connection)

Prepares chip for calibration.

stimulate(builder, neuron_coord, …)

Disable the membrane offset current.

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

Configure the given array of leak bias currents.

Parameters
  • builder – Builder to append configuration instructions to.

  • parameters – Array of bias currents 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, an exponential decay is fitted, and the resulting time constant is returned.

Parameters

samples – MADC samples obtained for each neuron.

Returns

Numpy array of fitted synaptic input time constants.

neuron_config_disabled(neuron_coord: pyhalco_hicann_dls_vx_v3.NeuronConfigOnDLS)pyhaldls_vx_v3.NeuronConfig

Return a neuron config with readout disabled.

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. The step current is alredy enabled here and will be disabled as the stimulus.

Parameters

neuron_coord – Coordinate of neuron to get config for.

Returns

Neuron config with readout enabled.

postlude(connection: pyhxcomm_vx.ConnectionHandle)

Restore original readout configuration. The base class postlude is overwritten to _not_ restore the original neuron configuration, as leak division may be altered by this routine.

Parameters

connection – Connection to the chip to calibrate.

prelude(connection: pyhxcomm_vx.ConnectionHandle)

Prepares chip for calibration.

Sets a high offset current in all neurons.

Also measures the membrane time constant at low leak bias currents to decide whether leak division is required to reach the given targets.

Leak multiplication is not supported by this calibration: The offset current is too weak to stimulate the membrane significantly if multiplication gets enabled. The calibration can therefore only be used if the target membrane time constant is larger than some 3 us.

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

Disable the membrane offset current.

This results in a decaying potential back to the leak.

Parameters
  • builder – Builder to append instructions to.

  • neuron_coord – Coordinate of neuron which is currently recorded.

  • stimulation_time – Timer value at beginning of stimulation.

Returns

Builder with neuron resets appended.