calix.hagen.neuron_synin_coba.COBABiasCalib
-
class
calix.hagen.neuron_synin_coba.
COBABiasCalib
(e_coba_reference: Union[int, numpy.ndarray], e_coba_reversal: Union[int, numpy.ndarray]) Bases:
calix.common.base.Calib
Calibration for the COBA synaptic input modulation strength.
To perform this calibration, we first calibrate the leak potential at the target reference potential and measure the CUBA amplitudes. We then calibrate the COBA bias current such that the amplitudes reach zero at the given reversal potential, and remain unchanged at the given reference potential.
To determine the size of the amplitudes at the reversal potential, we need a second voltage where we measure the amplitudes of the synaptic input. We then estimate the amplitude at the reversal potential by a linear extrapolation. This second voltage is normally chosen in between the reference voltage and the reversal potential, close to the latter. In case the distance between reference and this second voltage is too small, or the measurement would fall outside the reliable CADC range, it is chosen differently, compare the doc-string of too_little_separation_mask.
During the calibration, the COBA OTA’s reference potential is re-calibrated each time its bias current was changed. A member coba_reference_calib is used to handle this sub-calibration.
Requirements: * CADCs are calibrated and neuron membranes are connected to the CADCs. * Synaptic inputs are enabled and calibrated (in CUBA mode)
to the paramters desired at e_coba_reference.
- Variables
e_coba_reference – Reference potential for COBA mode, where there is no modulation, i.e. the original CUBA amplitude is present. Given in CADC units. May be different than the neurons’ desired leak potential, but must be reachable via the leak term, and allow for some headroom in the reliable CADC range in order to measure synaptic input amplitudes.
e_coba_reversal – Desired COBA reversal potential, i.e. the potential where the amplitude has decreased to 0. Given in CADC units. May exceed the valid range of leak or CADC.
leak_parameters_reference – Calibrated parameters for achieving a leak potential at the target e_coba_reference.
cuba_bias_calib – Instance of the calibration for CUBA synaptic input bias current. Used for measuring synaptic input amplitudes.
coba_reference_calib – Instance of the calibration for the COBA reference potential. Used to re-calibrate the reference each time when touching the bias current.
too_little_separation_mask – Mask containing instances where the measurement that is normally taken near the reversal potential is taken on the other side of the reference potential due to insufficient space in the leak potential range.
max_leak_target – Maximum value of feasible leak potential where synaptic input amplitudes can be measured, i.e. limited by the CADC’s dynamic range. Used as the start point for interpolation of e_coba_reversal.
min_leak_target – Minimum value of feasible leak potential where synaptic input amplitudes can be measured, i.e. limited by the CADC’s dynamic range. Used as the start point for interpolation of e_coba_reversal.
leak_target_reversal – Target for resting potential close to the reversal potential. If there is not enough separation to the reference potential, this target may be at the other side of the reference potential: cf. too_little_separation_mask.
reliable_amplitudes – Target amplitude for CADC-based measurement of syn. input amplitude at COBA reference potential. Also affects the measurement point for the reversal potential as we ensure enough separation.
allowed_deviation – Maximum deviation from resting potential near reversal potential from the intended target. If the deviation is exceeded, the COBA bias current is reduced.
log – Logger used for output.
-
__init__
(e_coba_reference: Union[int, numpy.ndarray], e_coba_reversal: Union[int, numpy.ndarray]) Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
(e_coba_reference, e_coba_reversal)Initialize self.
configure_parameters
(builder, parameters)Configure the given bias currents on the chip.
measure_results
(connection, builder)Measure the synaptic input amplitudes close to the reversal potential.
postlude
(connection)Re-calibrate the reference potentials again after the bias currents have reached their final parameters.
prelude
(connection)Interpolate given potentials to set calibration targets.
-
configure_parameters
(builder: calix.common.base.WriteRecordingPlaybackProgramBuilder, parameters: numpy.ndarray) → calix.common.base.WriteRecordingPlaybackProgramBuilder Configure the given bias currents on the chip.
- 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 the synaptic input amplitudes close to the reversal potential.
Before measurement, the reference potential is re-calibrated.
- Parameters
connection – Connection to the chip to run on.
builder – Builder to be run before measurement.
- Returns
Array of synaptic input amplitudes when measured near the target reversal potential.
-
postlude
(connection: pyhxcomm_vx.ConnectionHandle) → None Re-calibrate the reference potentials again after the bias currents have reached their final parameters.
- Parameters
connection – Connection to the chip to run on.
-
prelude
(connection: pyhxcomm_vx.ConnectionHandle) → None Interpolate given potentials to set calibration targets.
Since several events are used to determine the strength of the synaptic inputs, the COBA modulation has to be taken into account when setting the reference potential (compare the documentation of COBAReferenceCalib). We set the integration start potential such that the desired reference potential is at roughly half the expected integrated amplitudes. The obtained leak parameters are saved in order to later switch between this setting and a measurement close to the reversal potential quickly.
We calibrate leak potentials shortly below (above) the desired reference potentials for excitatory (inhibitory) mode. This ensures that the changed membrane potential by integrating amplitudes does not cause a modulating effect already. The desired reference potential is centered within the expected range of integrated amplitudes. The obtained leak parameters are saved in order to later switch between this setting and a measurement close to the reversal potential quickly.
The currently visible (CUBA) amplitude is measured and used for interpolation of the target amplitude at the maximum (or minimum) reachable leak potentials.
- Parameters
connection – Connection to the chip to run on.