calix.hagen.neuron_synin_coba.COBAReferenceCalib

class calix.hagen.neuron_synin_coba.COBAReferenceCalib(n_events: int, target_potential: Union[int, numpy.ndarray], expected_leak_parameters: Union[int, numpy.ndarray])

Bases: calix.common.base.Calib

Calibrates the COBA reference potential.

The COBA OTA compares the membrane potential with its reference potential and modulates the CUBA bias current accordingly. We calibrate the reference potential such that the COBA OTA does not generate an output current and therefore the original CUBA synaptic amplitude is not modulated.

This calibration needs to be supplied with the original CUBA amplitude as a target and the corresponding parameters how the amplitude was measured. It then adjusts the COBA reference potential such that the original CUBA amplitude is observed. Since the COBA OTA has this reference potential and the membrane potential (here: leak potential) as inputs, the reference potential equals the leak potential after successful calibration.

Requirements: * CADC is calibrated and neuron membrane potential is connected to

the CADCs.

  • Leak potential is calibrated at the potential where the original CUBA amplitudes should be unchanged. Note that if you use more than one event (n_events > 1) to measure amplitudes, consider setting the leak potential slightly below/above the potential where you want the same strength for a single synaptic event, such that the potential is roughly at half the amplitude of the synaptic events. This will counter the effect of the amplitude modulation due to the COBA circuit.

  • The original CUBA amplitude is supplied as target.

Variables
  • cuba_bias_calib – Instance of the calibration for CUBA synaptic input bias current. Used for measuring synaptic input amplitudes.

  • target_potential – Target reference potential in CADC units.

  • expected_leak_parameters – Leak parameters found at target reference potential with COBA modulation disabled.

  • allowed_deviation – Allowed deviation of resting potential from given target_potential after COBA modulation is enabled. A high deviation indicates a strong offset current generated from the CUBA synaptic input OTA, which in turn means a strong change in its bias current, i.e. a COBA modulation. Since the COBA modulation should be zero at the reference potential, we counter this state by adjusting the reference parameters. We try to measure the correct direction of parameter update by testing higher and lower parameters. In case the change in resting potential is not significant, which can happen if the reference potential is far off the target, we update the parameters in the direction of the expected leak parameters - which match the expected reference potentials apart from the individual OTA’s offsets.

  • parameters – Currently configured reference potential parameters. Saved to correct them towards the expected leak parameters if necessary, cf. allowed_deviation.

  • log – Logger used to log outputs.

__init__(n_events: int, target_potential: Union[int, numpy.ndarray], expected_leak_parameters: Union[int, numpy.ndarray])
Parameters

n_events – Number of events to use during measurement of synaptic input amplitudes. Has to correspond to how the given target was measured.

Methods

__init__(n_events, target_potential, …)

param n_events

Number of events to use during measurement of

configure_parameters(builder, parameters)

Configure the given COBA reference potentials.

measure_results(connection, builder)

Measure synaptic input amplitudes.

measure_slope(connection[, …])

Measure the change in resting potential with COBA modulation enabled, depending on the COBA reference potential setting.

prelude(connection)

Calls prelude of CUBA bias calib, which is used for measurements.

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

Configure the given COBA reference potentials.

Parameters
  • builder – Builder to append instructions to.

  • parameters – Array of CapMem parameters to configure.

Returns

Builder with instructions appended.

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

Measure synaptic input amplitudes.

We reuse the measure_amplitudes function of the CUBA bias calib for this purpose, but skip recalibrating the CUBA OTA’s reference potentials, as its bias is unchanged.

Parameters
  • connection – Connection to the chip to run on.

  • builder – Builder to execute before measuring amplitudes.

Returns

Array of measured synaptic input amplitudes.

measure_slope(connection: pyhxcomm_vx.ConnectionHandle, slope_estimation_distance: int = 80)numpy.ndarray

Measure the change in resting potential with COBA modulation enabled, depending on the COBA reference potential setting.

For two different reference potential settings (one above and one below the currently set reference potentials), the resting potentials are measured. The slope is calculated as the change in resting potential divided by the difference in reference potential settings.

Parameters
  • connection – Connection to the chip to run on.

  • slope_estimation_distance – Amount to decrease (increase) COBA reference potential below (above) the previously configured parameters, in order to estimate the slope. Given in CapMem LSB, used for the lower (upper) measurement.

prelude(connection: pyhxcomm_vx.ConnectionHandle)None

Calls prelude of CUBA bias calib, which is used for measurements.

Parameters

connection – Connection to the chip to run on.