calix.hagen.neuron_leak_bias.MembraneTimeConstCalibCADC
-
class
calix.hagen.neuron_leak_bias.
MembraneTimeConstCalibCADC
(target_time_const: quantities.quantity.Quantity = array(60.) * us, target_amplitude: Union[int, numpy.ndarray] = 50) Bases:
calix.common.base.Calib
Find the leak conductivity by resetting the neuron’s membrane to a potential significantly below the leak potential.
The reset potential v_reset is set below the leak potential v_leak. After a reset the membrane voltage rises towards the leak potential v_leak. As the membrane voltage rises, the CADCs are used to read the voltage at a specified time after the reset. The leak bias current gets calibrated such that the voltage after the desired time has risen to v_leak - (v_leak - v_reset)/e. Therefore, the specified time should be roughly the membrane time constant.
The leak potential gets recalibrated every time the bias current is changed, as changing the OTA bias current also changes the required offset between its inputs. The target CADC reads at leak potential are acquired at the beginning of the calibration with the existing neuron configuration. The median of all reads is taken as target.
This class provides functions for configuring leak bias currents and reading the potentials of neurons a specific time after reset.
Requirements: * Neuron membrane readout is connected to the CADCs (causal and acausal). * The currently selected leak potential is not too low, such that the
target_amplitude can still be subtracted from the CADC reads at leak potential without leaving the desired operating range of the leak OTA or the dynamic range of the CADCs.
The target membrane time constant is long, above some 30 us.
- Variables
target_amplitude – Target amplitude for (v_leak - v_reset), given in CADC reads.
target_time_const – Target membrane time constant.
target_leak_read – Target CADC read at leak potential.
leak_calibration – LeakPotentialCalib class instance used for recalibration of leak potential after changing the bias current.
- Raises
ValueError – if target_time_constant is not a single value.
-
__init__
(target_time_const: quantities.quantity.Quantity = array(60.) * us, target_amplitude: Union[int, numpy.ndarray] = 50) Initialize self. See help(type(self)) for accurate signature.
Methods
__init__
([target_time_const, target_amplitude])Initialize self.
configure_parameters
(builder, parameters)Configure the leak OTA bias currents of all neurons to the given values.
measure_results
(connection, builder)Calibrate the leak potentials such that the CADC reads match the read targets.
postlude
(connection)Function to do necessary postconfiguring of the chip.
prelude
(connection)Read leak potentials, calibrate reset potential to leak - amplitude.
-
configure_parameters
(builder: calix.common.base.WriteRecordingPlaybackProgramBuilder, parameters: numpy.ndarray) → calix.common.base.WriteRecordingPlaybackProgramBuilder Configure the leak OTA bias currents of all neurons to the given values.
- Parameters
builder – Builder to append configuration instructions to.
parameters – Array of leak OTA bias current settings to configure the CapMem cells to.
- Returns
Builder with configuration appended.
-
measure_results
(connection: pyhxcomm_vx.ConnectionHandle, builder: calix.common.base.WriteRecordingPlaybackProgramBuilder) → numpy.ndarray Calibrate the leak potentials such that the CADC reads match the read targets. Reset the neurons and wait for the target time constant. Measure the membrane potentials using the CADCs.
- Parameters
connection – Connection to the chip to run on.
builder – Builder to run.
- Returns
Array of CADC reads after reset and wait.
-
postlude
(connection: pyhxcomm_vx.ConnectionHandle) → None Function to do necessary postconfiguring of the chip. If not overwritten, this function does nothing.
- Parameters
connection – Connection to the chip to be calibrated.
-
prelude
(connection: pyhxcomm_vx.ConnectionHandle) → None Read leak potentials, calibrate reset potential to leak - amplitude.
- Parameters
connection – Connection to the chip to run on.
- Raises
CalibNotSuccessful – If the target CADC read at reset potential is below the reliable range of the CADC for more than 5% of the neurons.