hxtorch.spiking.morphology.Morphology

class hxtorch.spiking.morphology.Morphology

Bases: abc.ABC

Represents the internal structure of a neuron.

This neuron might be made up of several compartments and the compartments themselves can consist of several neuron circuits.

Note

Currently spike and voltage recording is only supported in the first neuron circuit of the first compartment.

__init__()

Initialize self. See help(type(self)) for accurate signature.

Methods

disable_leak(coord, neuron_block)

Disable the leak for the given neuron.

disable_spiking(coord, neuron_block)

Disable spiking for the given neuron.

enable_madc_recording(coord, neuron_block, …)

Configure neuron such that traces can be recorded with the MADC.

format_to_CapMemCell_value(**kwargs)

Helper function that can convert numbers (float or int) into hal.CapMemCell.Value type while issuing warnings, if bonds of the assignable value range are tried to surpass.

implement_morphology(coord, neuron_block)

Configure the atomic neurons in the given neuron block to represent this morphology.

set_adaptation_base_params(coord, …)

Set all parameters related to the base of the adaptation term of the adaptive exponential leaky integrate-and-fire model (without subthreshold- or spike-triggered adaptation) on the given hw neuron.

set_exponential_params(coord, neuron_block, …)

Set all parameters related to the exponential term of the adaptive exponential leaky integrate-and-fire model on the given hardware neuron.

set_spike_recording(enable, coord, neuron_block)

Set whether spikes are forwarded digitally.

set_spike_triggered_adaptation_increment(…)

Set the hardware parameter for the spike-triggered adaptation increment on the given hw neuron.

set_subthreshold_adaptation_strength(coord, …)

Set the hardware parameter for the subthreshold adaptation strength on the given hw neuron.

Attributes

compartments

Unplaced coordinate of the logical neuron.

logical_neuron

Base configuration of the logical neuron.

abstract property compartments

Unplaced coordinate of the logical neuron.

static disable_leak(coord: pyhalco_hicann_dls_vx_v3.LogicalNeuronOnDLS, neuron_block: pylola_vx_v3.NeuronBlock)None

Disable the leak for the given neuron.

Parameters
  • coord – Coordinate of the logical neuron for which the leak is disabled.

  • neuron_block – Neuron block in which the configuration of the atomic neurons is changed.

static disable_spiking(coord: pyhalco_hicann_dls_vx_v3.LogicalNeuronOnDLS, neuron_block: pylola_vx_v3.NeuronBlock)None

Disable spiking for the given neuron.

Disable the threshold comparator and the digital spike output.

Parameters
  • coord – Coordinate of the logical neuron for which spiking is disabled.

  • neuron_block – Neuron block in which the configuration of the atomic neurons is changed.

static enable_madc_recording(coord: pyhalco_hicann_dls_vx_v3.LogicalNeuronOnDLS, neuron_block: pylola_vx_v3.NeuronBlock, readout_source: pyhaldls_vx_v3.NeuronConfig.ReadoutSource)None

Configure neuron such that traces can be recorded with the MADC.

Parameters
  • coord – Coordinate of the logical neuron for which the recording is enabled.

  • neuron_block – Neuron block in which the configuration of the atomic neurons is changed.

  • readout_source – Voltage which should be recorded.

static format_to_CapMemCell_value(**kwargs)Tuple[pyhaldls_vx_v3.CapMemCell.Value]

Helper function that can convert numbers (float or int) into hal.CapMemCell.Value type while issuing warnings, if bonds of the assignable value range are tried to surpass.

Parameters

kwargs – Dictionary that holds the values that are to be converted and their respective variable names (used for warnings)

Returns

Tuple that holds the according hal.CapMemCell.Value for each passed value via kwargs

implement_morphology(coord: pyhalco_hicann_dls_vx_v3.LogicalNeuronOnDLS, neuron_block: pylola_vx_v3.NeuronBlock)None

Configure the atomic neurons in the given neuron block to represent this morphology.

Parameters
  • coord – Coordinate of the logical neuron which should be configured.

  • neuron_block – The configuration of neurons at coord will be changed such that a neuron with the given morphology is implemented.

abstract property logical_neuron

Base configuration of the logical neuron.

Default constructed logical neuron, the connections between neuron circuits are configured such that the specified morphology is implemented.

static set_adaptation_base_params(coord: pyhalco_hicann_dls_vx_v3.LogicalNeuronOnDLS, neuron_block: pylola_vx_v3.NeuronBlock, tau_adap: Union[float, int])None

Set all parameters related to the base of the adaptation term of the adaptive exponential leaky integrate-and-fire model (without subthreshold- or spike-triggered adaptation) on the given hw neuron.

Parameters
  • coord – Coordinate of the logical neuron for which the parameters are to be set.

  • neuron_block – Neuron block in which the configuration of the atomic neurons is changed.

  • tau_adap – Parameter value to be set for the adaptation time constant.

static set_exponential_params(coord: pyhalco_hicann_dls_vx_v3.LogicalNeuronOnDLS, neuron_block: pylola_vx_v3.NeuronBlock, exponential_threshold: Union[float, int], exponential_slope: Union[float, int])None

Set all parameters related to the exponential term of the adaptive exponential leaky integrate-and-fire model on the given hardware neuron.

Parameters
  • coord – Coordinate of the logical neuron for which the parameters are to be set.

  • neuron_block – Neuron block in which the configuration of the atomic neurons is changed.

  • exponential_threshold – Parameter value to be set for the exponential threshold.

  • exponential_slope – Parameter value to be set for the exponential slope.

static set_spike_recording(enable: bool, coord: pyhalco_hicann_dls_vx_v3.LogicalNeuronOnDLS, neuron_block: pylola_vx_v3.NeuronBlock)None

Set whether spikes are forwarded digitally.

Parameters
  • enable – Enable/disable the digital routing of spikes.

  • coord – Coordinate of the logical neuron for which the recording is enabled.

  • neuron_block – Neuron block in which the configuration of the atomic neurons is changed.

static set_spike_triggered_adaptation_increment(coord: pyhalco_hicann_dls_vx_v3.LogicalNeuronOnDLS, neuron_block: pylola_vx_v3.NeuronBlock, spike_triggered_adaptation_increment: Union[float, int], clock_scale_adaptation_pulse: Tuple[int] = (5, 5))None

Set the hardware parameter for the spike-triggered adaptation increment on the given hw neuron.

Parameters
  • coord – Coordinate of the logical neuron for which the parameters are to be set.

  • neuron_block – Neuron block in which the configuration of the atomic neurons is changed.

  • spike_triggered_adaptation_increment – Parameter value to be set for the spike-triggered adaptation increment.

static set_subthreshold_adaptation_strength(coord: pyhalco_hicann_dls_vx_v3.LogicalNeuronOnDLS, neuron_block: pylola_vx_v3.NeuronBlock, subthreshold_adaptation_strength: Union[float, int], leak_adaptation: Optional[Union[float, int]])None

Set the hardware parameter for the subthreshold adaptation strength on the given hw neuron.

Parameters
  • coord – Coordinate of the logical neuron for which the parameters are to be set.

  • neuron_block – Neuron block in which the configuration of the atomic neurons is changed.

  • subthreshold_adaptation_strength – Parameter value to be set for the subthreshold adaptation strength.

  • leak_adaptation – Parameter value to be set for the leak potential from the membrane taken into account by the subthreshold adaptation mechanism on hardware.