neuronunit.capabilities package

Submodules

neuronunit.capabilities.channel module

NeuronUnit abstract Capabilities for channel models

class neuronunit.capabilities.channel.NML2_Channel_Runnable[source]

Bases: sciunit.capabilities.Capability

Capability for models that can be run using functions available in pyNeuroML.analsysi.NML2ChannelAnalysis

NML2_channel_run(**run_params)[source]
class neuronunit.capabilities.channel.ProducesIVCurve[source]

Bases: sciunit.capabilities.Capability

The capability to produce a current-voltage plot for a set of voltage steps

plot_iv_curve(v, i, *plt_args, **plt_kwargs)[source]

Plots IV Curve using array-like voltage ‘v’ and array-like current ‘i’

produce_iv_curve(**run_params)[source]

Produces steady-state and peak IV curve at voltages and conditions given according to ‘run_params’

produce_iv_curve_peak(**run_params)[source]

Produces peak current IV curve at voltages and conditions given according to ‘run_params’

produce_iv_curve_ss(**run_params)[source]

Produces steady-state IV curve at voltages and conditions given according to ‘run_params’

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]

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]

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

neuronunit.capabilities.spike_functions.spikes2widths(spike_waveforms)[source]
IN:
spike_waveforms: Spike waveforms, e.g. from get_spike_waveforms().
neo.core.AnalogSignal
OUT:
1D numpy array of spike widths, specifically the full width at half the maximum amplitude.

Module contents

NeuronUnit abstract Capabilities.

class neuronunit.capabilities.ProducesActionPotentials[source]

Bases: neuronunit.capabilities.ProducesSpikes, neuronunit.capabilities.ProducesMembranePotential

Indicates the model produces action potential waveforms. Waveforms must have a temporal extent.

get_AP_amplitudes()[source]
get_AP_thresholds()[source]
get_AP_widths()[source]
get_APs()[source]

Gets action potential waveform chunks from the model.

Must return a neo.core.AnalogSignal. Each column of the AnalogSignal should be a spike waveform.

class neuronunit.capabilities.ProducesMembranePotential[source]

Bases: sciunit.capabilities.Capability

Indicates that the model produces a somatic membrane potential.

get_initial_vm(**kwargs)[source]

Returns a quantity corresponding to the starting membrane potential. This will in some cases be the resting potential.

get_iqr_vm(**kwargs)[source]
get_mean_vm(**kwargs)[source]
get_median_vm(**kwargs)[source]
get_membrane_potential(**kwargs)[source]

Must return a neo.core.AnalogSignal.

get_std_vm(**kwargs)[source]
class neuronunit.capabilities.ProducesSpikes[source]

Bases: sciunit.capabilities.Capability

Indicates that the model produces spikes. No duration is required for these spikes.

get_spike_count()[source]
get_spike_train()[source]

Gets computed spike times from the model.

Arguments: None. Returns: a neo.core.SpikeTrain object.

class neuronunit.capabilities.ReceivesCurrent[source]

Bases: neuronunit.capabilities.ReceivesSquareCurrent

Indicates that somatic current can be injected into the model as either an arbitrary waveform or as a square pulse.

inject_current(current)[source]

Injects somatic current into the model.

current : neo.core.AnalogSignal This is a time series of the current to be injected.

class neuronunit.capabilities.ReceivesSquareCurrent[source]

Bases: sciunit.capabilities.Capability

Indicates that somatic current can be injected into the model as a square pulse.

inject_square_current(current)[source]

Injects somatic current into the model.

current : a dictionary like:
{‘amplitude’:-10.0*pq.pA,
‘delay’:100*pq.ms, ‘duration’:500*pq.ms}}

where ‘pq’ is the quantities package

This describes the current to be injected.

class neuronunit.capabilities.Runnable[source]

Bases: sciunit.capabilities.Capability

Capability for models that can be run.

run(**run_params)[source]
set_default_run_params(**default_run_params)[source]
set_run_params(**run_params)[source]