neuronunit.capabilities package¶
Submodules¶
neuronunit.capabilities.channel module¶
NeuronUnit abstract Capabilities for channel models
-
class
neuronunit.capabilities.channel.
NML2ChannelAnalysis
[source]¶ Bases:
sciunit.capabilities.Capability
Capability for models that can be altered using functions available in pyNeuroML.analsysi.NML2ChannelAnalysis
neuronunit.capabilities.morphology module¶
NeuronUnit abstract Capabilities for multicompartment cell models
neuronunit.capabilities.spike_functions module¶
Auxiliary helper functions for analysis of spiking.
-
neuronunit.capabilities.spike_functions.
get_spike_train
(vm, threshold=array(0.) * mV)[source]¶ - Inputs:
vm: a neo.core.AnalogSignal corresponding to a membrane potential trace. threshold: the value (in mV) above which vm has to cross for there
to be a spike. Scalar float.- Returns:
- a neo.core.SpikeTrain containing the times of spikes.
-
neuronunit.capabilities.spike_functions.
get_spike_waveforms
(vm, threshold=array(0.) * mV, width=array(10.) * ms)[source]¶ Membrane potential trace (1D numpy array) to matrix of spike snippets (2D numpy array)
- Inputs:
vm: a neo.core.AnalogSignal corresponding to a membrane potential trace. threshold: the value (in mV) above which vm has to cross for there
to be a spike. Scalar float.- width: the length (in ms) of the snippet extracted,
- centered at the spike peak.
- Returns:
- a neo.core.AnalogSignal where each column contains a membrane potential snippets corresponding to one spike.
-
neuronunit.capabilities.spike_functions.
spikes2amplitudes
(spike_waveforms)[source]¶ - IN:
- spike_waveforms: Spike waveforms, e.g. from get_spike_waveforms().
- neo.core.AnalogSignal
- OUT:
- 1D numpy array of spike amplitudes, i.e. the maxima in each waveform.
-
neuronunit.capabilities.spike_functions.
spikes2thresholds
(spike_waveforms)[source]¶ - IN:
- spike_waveforms: Spike waveforms, e.g. from get_spike_waveforms().
- neo.core.AnalogSignal
- OUT:
- 1D numpy array of spike thresholds, specifically the membrane potential at which 1/10 the maximum slope is reached.
If the derivative contains NaNs, probably because vm contains NaNs Return an empty list with the appropriate units
Module contents¶
NeuronUnit abstract Capabilities.
The goal is to enumerate all possible capabilities of a model that would be tested using NeuronUnit. These capabilities exchange ‘neo’ objects.
-
class
neuronunit.capabilities.
ProducesActionPotentials
[source]¶ Bases:
neuronunit.capabilities.ProducesSpikes
,neuronunit.capabilities.ProducesMembranePotential
Indicate the model produces action potential waveforms.
Waveforms must have a temporal extent.
-
class
neuronunit.capabilities.
ProducesMembranePotential
[source]¶ Bases:
sciunit.capabilities.Capability
Indicates that the model produces a somatic membrane potential.
-
class
neuronunit.capabilities.
ProducesSpikes
[source]¶ Bases:
sciunit.capabilities.Capability
Indicate that the model produces spikes.
No duration is required for these spikes.
-
class
neuronunit.capabilities.
ReceivesCurrent
[source]¶ Bases:
neuronunit.capabilities.ReceivesSquareCurrent
Indicate that somatic current can be injected into the model as either an arbitrary waveform or as a square pulse.