calix.spiking.neuron_calib_parts.ICCMADCCalib
-
class
calix.spiking.neuron_calib_parts.ICCMADCCalib(target: quantities.quantity.Quantity = array(2.) * us, v_leak: numpy.ndarray = array([80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110]), neuron_configs: Optional[List[pyhaldls_vx_v3.NeuronConfig], None] = None) Bases:
calix.common.madc_base.CalibCalibrate the inter-compartment conductance time constant of all neurons to the provided target value.
Two neighboring, unconnected neuron circuits are set to different leak potentials. Then the two neurons are connected using the inter-compartment conductance. During that connection process the membrane of the neuron of interest is recorded with the MADC. Throughout this process the leak potential of the neighboring neurons approach one another exponentially. An exponential is fitted to the recorded trace and the bias current responsible for the inter-compartment conductance is tweaked such that the desired value for the time constant is reached.
The membrane potentials decay with a time constant tau_total, which is given by:
- tau_total = 1 / (2 / tau_icc + 1 / tau_leak)
<=>
tau_icc = 2 * tau_leak * tau_total / (tau_leak - tau_total)
If the membrane time constant (tau_leak) is large compared to tau_icc, tau_total is approximately half of tau_icc (the factor 2 in the equation above originates from the two membrane time constants of the two involved neurons). For that reason the leak conductance is set minimal during calibration.
This calibration decides whether inter-compartment conductance bias current division or multiplication is required during prelude. The given neuron configs are therefore altered. To be able to measure the total time constant some requirements have to be fulfilled which are set by calling prepare_for_measurement().
Note: * Leak potentials should be set alternatingly with a difference of a few
10 LSB (in CADC reads) between even and odd neurons. As the conductance between the compartments depends on the base voltages, it is recommended to choose a range, which will later also be used for experiments.
- Variables
neuron_configs – List of desired neuron configurations. Necessary to enable inter-compartment conductance bias division/multiplication.
v_leak – List of target leak potentials. When calibrating the icc the leak potential will be calibrated to the provided leak potentials in the prelude.
-
__init__(target: quantities.quantity.Quantity = array(2.) * us, v_leak: numpy.ndarray = array([80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110, 80, 110]), neuron_configs: Optional[List[pyhaldls_vx_v3.NeuronConfig], None] = None) - Parameters
target – Calib target for the inter-compartment conductance. Note that we measure the total time constant tau_total. Please refer to the class doc-string for further reading.
v_leak – Target for the leak potentials.
neuron_configs – List of neuron configurations. If None, the hagen-mode default neuron config is used for all neurons.
Methods
__init__([target, v_leak, neuron_configs])- param target
Calib target for the inter-compartment
configure_parameters(builder, parameters)Configure the given array of inter-compartment conductance 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 active and connected to the readout lines.
prelude(connection)Prepares chip for calibration.
prepare_for_measurement(connection[, v_leak])Set all necessary chip parameters such that a calibration of the inter- compartment conductance can be executed.
stimulate(builder, neuron_coord, …)Enables the inter-compartment conductance (ICC) between the compartments resulting in an approach of their membrane potentials.
-
configure_parameters(builder, parameters: numpy.ndarray) → calix.common.base.WriteRecordingPlaybackProgramBuilder Configure the given array of inter-compartment conductance bias currents.
- Parameters
builder – Builder to append configuration instructions to.
parameters – Array of nmda bias currents to set up.
- Returns
Builder with configuration appended.
-
evaluate(samples: List[numpy.ndarray]) → quantities.quantity.Quantity 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
Array of the fitted total time constants as quantity.
-
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 active and connected to the readout lines.
- Parameters
neuron_coord – Coordinate of neuron to get config for.
- Returns
Neuron config with readout enabled.
-
prelude(connection: pyhxcomm_vx.ConnectionHandle) Prepares chip for calibration.
Disable all multicompartment related switches, which are required to be turned off initially during the calibration.
Also measures the inter-compartment conductance time constant at low and high bias currents to decide whether multiplication or division of the bias is required to reach the given targets.
- Parameters
connection – Connection to the chip to calibrate.
-
prepare_for_measurement(connection: pyhxcomm_vx.ConnectionHandle, v_leak: Optional[numpy.ndarray, None] = None) Set all necessary chip parameters such that a calibration of the inter- compartment conductance can be executed.
In order to calibrate the inter compartment conductance the leak conductance is set to a small value, while preventing the membrane to float. Furthermore, the threshold comparator is disabled as well as the synaptic input. Note: The leak potential between two neighboring neurons on the same hemisphere should be calibrated some 10 LSB apart to ensure a gap large enough for a recordable decay.
- Parameters
connection – Connection to the chip to calibrate.
v_leak – List of targets for the leak potential calibration. If None is given the ivar v_leak will be used.
-
stimulate(builder, neuron_coord: pyhalco_hicann_dls_vx_v3.NeuronConfigOnDLS, stimulation_time: pyhaldls_vx_v3.Timer.Value) → calix.common.base.WriteRecordingPlaybackProgramBuilder Enables the inter-compartment conductance (ICC) between the compartments resulting in an approach of their membrane potentials.
A multicompartment neuron will be created by connecting two neurons via the somatic line with one ICC enabled. If neuron_coord is even the neuron will be connected with its right neighbor otherwise it will be connected with its left neighbor.
- 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 instructions appended.