neuronunit.tests package¶
Submodules¶
neuronunit.tests.base module¶
Base classes and attributes for many neuronunit tests.
No classes here meant for direct use in testing.
-
class
neuronunit.tests.base.
FakeTest
(observation, name=None, **params)[source]¶ Bases:
sciunit.tests.Test
Fake test class.
Just computes agreement between an observation key and a model attribute. e.g. observation = {‘a’:[0.8,0.3], ‘b’:[0.5,0.1], ‘vr’:[-70*pq.mV,5*pq.mV]} fake_test_a = FakeTest(“test_a”,observation=observation) fake_test_b = FakeTest(“test_b”,observation=observation) fake_test_vr = FakeTest(“test_vr”,observation=observation)
-
class
neuronunit.tests.base.
VmTest
(observation={'mean': None, 'std': None}, name=None, **params)[source]¶ Bases:
sciunit.tests.ProtocolToFeaturesTest
Base class for tests involving the membrane potential of a model.
-
bind_score
(score, model, observation, prediction)[source]¶ For the user to bind additional features to the score.
-
compute_params
()[source]¶ Compute new params from existing self.params. Inserts those new params into self.params. Use this when some params depend upon the values of others. Example: self.params[‘c’] = self.params[‘a’] + self.params[‘b’]
-
condition_model
(model)[source]¶ Update the model in any way needed before generating the prediction.
This could include updating parameters such as simulation durations that do not define the model but do define experiments performed on the model. No default implementation.
-
default_params
= {'amplitude': array(0.) * pA, 'delay': array(100.) * ms, 'dt': array(0.025) * ms, 'duration': array(300.) * ms, 'padding': array(200.) * ms}¶
-
ephysprop_name
= ''¶
-
name
= ''¶
-
observation_schema
= [('Mean, Standard Deviation, N', {'mean': {'units': True, 'required': True}, 'std': {'units': True, 'min': 0, 'required': True}, 'n': {'type': 'integer', 'min': 1}}), ('Mean, Standard Error, N', {'mean': {'units': True, 'required': True}, 'sem': {'units': True, 'min': 0, 'required': True}, 'n': {'type': 'integer', 'min': 1, 'required': True}})]¶
-
params_schema
= {'amplitude': {'required': False, 'type': 'current'}, 'delay': {'min': 0, 'required': False, 'type': 'time'}, 'dt': {'min': 0, 'required': False, 'type': 'time'}, 'duration': {'min': 0, 'required': False, 'type': 'time'}, 'padding': {'min': 0, 'required': False, 'type': 'time'}, 'tmax': {'min': 0, 'required': False, 'type': 'time'}}¶
-
required_capabilities
= (<class 'sciunit.capabilities.Runnable'>, <class 'neuronunit.capabilities.ProducesMembranePotential'>)¶
-
state
¶ Get the frozen (pickled) model state.
-
units
¶ alias of
quantities.unitquantity.Dimensionless
-
neuronunit.tests.channel module¶
NeuronUnit Test classes for ion channel models
neuronunit.tests.druckmann2013 module¶
Tests of features described in Druckmann et. al. 2013 (https://academic.oup.com/cercor/article/23/12/2994/470476)
AP analysis details (from suplementary info): https://github.com/scidash/neuronunit/files/2295064/bhs290supp.pdf
Numbers in class names refer to the numbers in the publication table
-
class
neuronunit.tests.druckmann2013.
AP12AHPDepthPercentChangeTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
16 Percent change in AP fast AHP depth, first to second spike (%)
Difference in depth of fast AHP between first and second AP divided by the first AP depth of fast AHP.
-
description
= 'Difference in depth of fast AHP between first and second AP divided by the first\n AP depth of fast AHP.'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Percent change in AP fast AHP depth, first to second spike'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.druckmann2013.
AP12AmplitudeChangePercentTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
- Percent change in AP amplitude, first to second spike (%)
Difference in AP amplitude between first and second AP divided by the first AP amplitude.
-
description
= 'Difference in AP amplitude between first and second AP divided by the first AP\n amplitude.'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Percent change in AP amplitude, first to second spike '¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
class
neuronunit.tests.druckmann2013.
AP12AmplitudeDropTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
- Drop in AP amplitude (amp.) from first to second spike (mV)
Difference in the voltage value between the amplitude of the first and second AP.
Negative values indicate 2nd AP amplitude > 1st
-
description
= 'Difference in the voltage value between the amplitude of the first and second AP'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Drop in AP amplitude from 1st to 2nd AP'¶
-
units
= UnitQuantity('millivolt', 0.001 * V, 'mV')¶
-
class
neuronunit.tests.druckmann2013.
AP12HalfWidthChangePercentTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
- Percent change in AP width at half height, first to second spike (%)
Difference in AP width at half-height between first and second AP divided by the first AP width at half-height.
-
description
= 'Difference in AP width at half-height between first and second AP divided by the\n first AP width at half-height.'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Percent change in AP width at half height, first to second spike'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
class
neuronunit.tests.druckmann2013.
AP12RateOfChangePeakToTroughPercentChangeTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
- Percent change in AP peak to trough rate of change, first to second spike (%)
Difference in peak to trough rate of change between first and second AP divided by the first AP peak to trough rate of change.
-
description
= 'Difference in peak to trough rate of change between first and second AP divided\n by the first AP peak to trough rate of change.'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Percent change in AP peak to trough rate of change, first to second spike'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
class
neuronunit.tests.druckmann2013.
AP1AHPDepthTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
- AP 1 Fast AHP depth (mV)
Difference between the minimum of voltage at the trough and the voltage value at the beginning of the AP.
-
description
= 'Difference between the minimum of voltage at the trough and the voltage value at\n the beginning of the AP.'¶
-
generate_prediction
(model, ap_index=0)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'AP 1 Fast AHP depth'¶
-
units
= UnitQuantity('millivolt', 0.001 * V, 'mV')¶
-
class
neuronunit.tests.druckmann2013.
AP1AmplitudeTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
- AP 1 amplitude (mV)
Amplitude of the first AP.
-
description
= 'Amplitude of the first AP'¶
-
generate_prediction
(model, ap_index=0)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'First AP amplitude'¶
-
units
= UnitQuantity('millivolt', 0.001 * V, 'mV')¶
-
class
neuronunit.tests.druckmann2013.
AP1DelayMeanStrongStimTest
(current_amplitude, repetitions=7, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AP1DelayMeanTest
33 Average delay to AP 1, strong stimulus (ms)
Same as
AP1DelayMeanTest
but for strong stimulus
-
class
neuronunit.tests.druckmann2013.
AP1DelayMeanTest
(current_amplitude, repetitions=7, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
18 Average delay to AP 1 (ms)
Mean of the delay to beginning of first AP over experimental repetitions of step currents.
-
description
= 'Mean delay to the first AP'¶
-
name
= 'First AP delay mean'¶
-
units
= UnitTime('millisecond', 0.001 * s, 'ms')¶
-
-
class
neuronunit.tests.druckmann2013.
AP1DelaySDStrongStimTest
(current_amplitude, repetitions=7, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AP1DelaySDTest
34 SD of delay to AP 1, strong stimulus (ms)
Same as
AP1DelaySDTest
but for strong stimulus
-
class
neuronunit.tests.druckmann2013.
AP1DelaySDTest
(current_amplitude, repetitions=7, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AP1DelayMeanTest
19 SD of delay to AP 1 (ms)
Standard deviation of the delay to beginning of first AP over experimental repetitions of step currents.
-
description
= 'Standard deviation of delay to the first AP'¶
-
name
= 'First AP delay standard deviation'¶
-
units
= UnitTime('millisecond', 0.001 * s, 'ms')¶
-
-
class
neuronunit.tests.druckmann2013.
AP1RateOfChangePeakToTroughTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
- AP 1 peak to trough rate of change (mV/ms)
Difference in voltage value between peak and trough divided by the amount of time in between the peak and trough.
-
description
= 'Difference in voltage value between peak and trough over the amount of time in between the peak and trough.'¶
-
generate_prediction
(model, ap_index=0)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'AP 1 peak to trough rate of change'¶
-
units
= array(1.) * mV/ms¶
-
class
neuronunit.tests.druckmann2013.
AP1SSAmplitudeChangeTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
- AP amplitude change from first spike to steady-state (mV)
Steady state AP amplitude is calculated as the mean amplitude of the set of APs that occurred during the latter third of the current step.
-
description
= 'Steady state AP amplitude is calculated as the mean amplitude of the set of APs\n that occurred during the latter third of the current step.'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'AP amplitude change from 1st AP to steady-state'¶
-
units
= UnitQuantity('millivolt', 0.001 * V, 'mV')¶
-
class
neuronunit.tests.druckmann2013.
AP1WidthHalfHeightTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
- AP 1 width at half height (ms)
-
description
= 'Amount of time in between the first crossing (in the upwards direction) of the\n half-height voltage value and the second crossing (in the downwards direction) of\n this value, for the first AP. Half-height voltage is the voltage at the beginning of\n the AP plus half the AP amplitude.'¶
-
generate_prediction
(model, ap_index=0)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'First AP width at its half height'¶
-
units
= UnitTime('millisecond', 0.001 * s, 'ms')¶
-
class
neuronunit.tests.druckmann2013.
AP1WidthPeakToTroughTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
- AP 1 peak to trough time (ms)
Amount of time between the peak of the first AP and the trough, i.e., the minimum of the AHP.
-
description
= 'Amount of time between the peak of the first AP and the trough, i.e., the minimum of the AHP'¶
-
generate_prediction
(model, ap_index=0)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'AP 1 peak to trough time'¶
-
units
= UnitTime('millisecond', 0.001 * s, 'ms')¶
-
class
neuronunit.tests.druckmann2013.
AP2AHPDepthTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AP1AHPDepthTest
- AP 2 Fast AHP depth (mV)
Same as
AP1AHPDepthTest
but for second AP-
description
= 'Same as :any:`AP1AHPDepthTest` but for second AP'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'AP 2 Fast AHP depth'¶
-
class
neuronunit.tests.druckmann2013.
AP2AmplitudeTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AP1AmplitudeTest
- AP 2 amplitude (mV)
Same as
AP1AmplitudeTest
but for second AP-
description
= 'Same as :any:`AP1AmplitudeTest` but for second AP'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'AP 2 amplitude'¶
-
class
neuronunit.tests.druckmann2013.
AP2DelayMeanStrongStimTest
(current_amplitude, repetitions=7, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AP2DelayMeanTest
35 Average delay to AP 2, strong stimulus (ms)
Same as
AP2DelayMeanTest
but for strong stimulus
-
class
neuronunit.tests.druckmann2013.
AP2DelayMeanTest
(current_amplitude, repetitions=7, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AP1DelayMeanTest
20 Average delay to AP 2 (ms)
Same as
AP1DelayMeanTest
but for 2nd AP-
description
= 'Mean of delay to the second AP'¶
-
name
= 'Second AP delay mean'¶
-
-
class
neuronunit.tests.druckmann2013.
AP2DelaySDStrongStimTest
(current_amplitude, repetitions=7, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AP2DelaySDTest
36 SD of delay to AP 2, strong stimulus (ms)
Same as
AP2DelaySDTest
but for strong stimulus
-
class
neuronunit.tests.druckmann2013.
AP2DelaySDTest
(current_amplitude, repetitions=7, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AP1DelaySDTest
21 SD of delay to AP 2 (ms)
Same as
AP1DelaySDTest
but for 2nd APOnly stochastic models will have a non-zero value for this test
-
description
= 'Standard deviation of delay to the second AP'¶
-
name
= 'Second AP delay standard deviation'¶
-
-
class
neuronunit.tests.druckmann2013.
AP2RateOfChangePeakToTroughTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AP1RateOfChangePeakToTroughTest
- AP 2 peak to trough rate of change (mV/ms)
Same as
AP1RateOfChangePeakToTroughTest
but for second AP-
description
= 'Same as :any:`AP1RateOfChangePeakToTroughTest` but for second AP'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'AP 2 peak to trough rate of change'¶
-
class
neuronunit.tests.druckmann2013.
AP2WidthHalfHeightTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AP1WidthHalfHeightTest
- AP 2 width at half height (ms)
Same as
AP1WidthHalfHeightTest
but for second AP-
description
= 'Same as :any:`AP1WidthHalfHeightTest` but for second AP'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'AP 2 width at half height'¶
-
class
neuronunit.tests.druckmann2013.
AP2WidthPeakToTroughTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AP1WidthPeakToTroughTest
- AP 2 peak to trough time (ms)
Same as
AP1WidthPeakToTroughTest
but for second AP-
description
= 'Same as :any:`AP1WidthPeakToTroughTest` but for second AP'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'AP 2 peak to trough time'¶
-
class
neuronunit.tests.druckmann2013.
AccommodationAtSSMeanTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
27 Average accommodation at steady-state (%)
Accommodation analysis based on a fit of the ISIs to an exponential function: ISI = A+B*exp(-t/tau). This feature gives the relative size of the constant term (A) to the term before the exponent (B).
-
description
= 'Mean of the ISI steady state accomodation'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'ISI Steady state accomodation mean'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.druckmann2013.
AccommodationRateMeanAtSSTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.AccommodationAtSSMeanTest
28 Average rate of accommodation during steady-state
Accommodation analysis based on a fit of the ISIs to an exponential function. This feature is the time constant (tau) of the exponent.
-
description
= 'Time constant of the ISI accomodation'¶
-
name
= 'ISI accomodation time constant'¶
-
units
= UnitTime('millisecond', 0.001 * s, 'ms')¶
-
-
class
neuronunit.tests.druckmann2013.
AccommodationRateToSSTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
26 Rate of accommodation to steady-state (percent/ms)
The percent difference between the spiking rate of the first fifth of the step current and final fifth of the step current divided by the time taken to first reach the rate of steady state accommodation.
Note: It’s not clear what is meant by “time taken to first reach the rate of steady state accommodation”. Here, it’s computed as smallest t of an ISI which is longer than 0.95 of the mean ISIs in the final fifth of the current step.
-
description
= 'Rate of ISI Accomodation'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'ISI Accomodation Rate'¶
-
units
= UnitQuantity('per_ms', 1.0 * 1/ms, 'per_ms')¶
-
-
class
neuronunit.tests.druckmann2013.
Burst1ISIMeanStrongStimTest
(current_amplitude, repetitions=7, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Burst1ISIMeanTest
37 Average initial burst ISI, strong stimulus (ms)
Same as
Burst1ISIMeanTest
but for strong stimulus
-
class
neuronunit.tests.druckmann2013.
Burst1ISIMeanTest
(current_amplitude, repetitions=7, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
22 Average initial burst interval (ms)
Initial burst interval is defined as the average of the first two ISIs, i.e., the average of the time differences between the first and second AP and the second and third AP. This feature is the average the initial burst interval across experimental repetitions.
-
description
= 'Mean of the initial burst interval'¶
-
name
= 'Initial burst interval mean'¶
-
units
= UnitTime('millisecond', 0.001 * s, 'ms')¶
-
-
class
neuronunit.tests.druckmann2013.
Burst1ISISDStrongStimTest
(current_amplitude, repetitions=7, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Burst1ISISDTest
38 SD of average initial burst ISI, strong stimulus (ms)
Same as
Burst1ISISDTest
but for strong stimulus
-
class
neuronunit.tests.druckmann2013.
Burst1ISISDTest
(current_amplitude, repetitions=7, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Burst1ISIMeanTest
23 SD of average initial burst interval (ms)
The standard deviation of the initial burst interval across experimental repetitions.
-
description
= 'StDev of the initial burst interval'¶
-
name
= 'Initial burst interval std'¶
-
-
class
neuronunit.tests.druckmann2013.
Druckmann2013AP
(waveform, begin_time)[source]¶ Bases:
object
This is a helper class that computes/finds aspects of APs as defined in Druckmann 2013
-
get_amplitude
()[source]¶ The amplitude of a spike is given by the difference between the voltage at the beginning and peak of the spike.
Returns: the amplitude value
-
get_beginning
()[source]¶ The beginning of a spike was then determined by a crossing of a threshold on the derivative of the voltage (12mV/msec).
Returns: the voltage and time of the AP beginning
-
get_halfwidth
()[source]¶ Amount of time in between the first crossing (in the upwards direction) of the half-height voltage value and the second crossing (in the downwards direction) of this value, for the first AP. Half-height voltage is the voltage at the beginning of the AP plus half the AP amplitude.
Returns:
-
-
class
neuronunit.tests.druckmann2013.
Druckmann2013Test
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.base.VmTest
- All tests inheriting from this class assume that the subject model:
- Is at steady state at time 0 (i.e. resume from SS)
- Starting at t=0, will have a 2s step current injected into soma, at least once
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
get_APs
(model)[source]¶ Spikes were detected by a crossing of a voltage threshold (-20 mV).
Parameters: model – model which provides the waveform to analyse Returns: a list of Druckman2013APs
-
required_capabilities
= (<class 'neuronunit.capabilities.ProducesActionPotentials'>,)¶
-
score_type
¶ alias of
sciunit.scores.complete.ZScore
-
class
neuronunit.tests.druckmann2013.
ISIBurstMeanChangeTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
31 Average change in ISIs during a burst (%)
Difference between the first and second ISI divided by the value of the first ISI.
-
description
= 'ISI Burst Mean Change'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'ISI Burst Mean Change'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.druckmann2013.
ISICVTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
29 Average inter-spike interval (ISI) coefficient of variation (CV) (unitless)
Coefficient of variation (mean divided by standard deviation) of the distribution of ISIs.
-
description
= 'ISI Coefficient of Variation'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'ISI CV'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.druckmann2013.
ISIMedianTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
30 Median of the distribution of ISIs (ms)
Median of the distribution of ISIs.
-
description
= 'ISI Median'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'ISI Median'¶
-
units
= UnitTime('millisecond', 0.001 * s, 'ms')¶
-
-
class
neuronunit.tests.druckmann2013.
InitialAccommodationMeanTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
24 Average initial accommodation (%)
Initial accommodation is defined as the percent difference between the spiking rate of the first fifth of the step current and the third fifth of the step current.
-
description
= 'Mean of the initial accomodation'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Initial accomodation mean'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.druckmann2013.
InputResistanceTest
(injection_currents=array([], dtype=float64) * nA, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
17 Input resistance for steady-state current (MOhm)
Input resistance calculated by injecting weak subthreshold hyperpolarizing and depolarizing step currents. Input resistance was taken as linear fit of current to voltage difference.
-
description
= 'Input resistance calculated by injecting weak subthreshold hyperpolarizing and\n depolarizing step currents. Input resistance was taken as linear fit of current to\n voltage difference'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Input resistance for steady-state current'¶
-
units
= array(1) * megaohm¶
-
-
class
neuronunit.tests.druckmann2013.
SSAccommodationMeanTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
25 Average steady-state accommodation (%)
Steady-state accommodation is defined as the percent difference between the spiking rate of the first fifth of the step current and the last fifth of the step current.
-
description
= 'Mean of the steady state accomodation'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Steady state accomodation mean'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.druckmann2013.
SpikeRateStrongStimTest
(current_amplitude, **params)[source]¶ Bases:
neuronunit.tests.druckmann2013.Druckmann2013Test
32 Average rate, strong stimulus (Hz)
Firing rate of strong stimulus.
-
description
= 'Strong Stimulus Firing Rate'¶
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Strong Stimulus Firing Rate'¶
-
units
= UnitQuantity('hertz', 1.0 * 1/s, 'Hz')¶
-
neuronunit.tests.dynamics module¶
Dynamic neuronunit tests, e.g. investigating dynamical systems properties
-
class
neuronunit.tests.dynamics.
BurstinessTest
(observation={'mean': None, 'std': None}, name=None, **params)[source]¶ Bases:
neuronunit.tests.waveform.InjectedCurrentAPWidthTest
Test whether a model exhibits the observed burstiness
-
cv_threshold
= 1.0¶
-
description
= 'A test of AP bursting at the provided current'¶
-
name
= 'Burstiness test'¶
-
nonunited_observation_keys
= ['cv']¶
-
score_type
¶ alias of
sciunit.scores.complete.RatioScore
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.dynamics.
FiringRateTest
(*args, **kwargs)[source]¶ Bases:
neuronunit.tests.fi.RheobaseTest
Test whether a model exhibits the observed burstiness
-
description
= 'Spikes Per Second.'¶
-
name
= 'Firing Rate Test'¶
-
score_type
¶ alias of
sciunit.scores.complete.RatioScore
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.dynamics.
ISICVTest
(observation={'mean': None, 'std': None}, name=None, **params)[source]¶ Bases:
neuronunit.tests.base.VmTest
Test whether a model exhibits the observed burstiness
-
description
= 'For neurons and muscle cells check the Coefficient of Variation on a list of Interval Between Spikes given a spike train recording.'¶
-
generate_prediction
(model=None)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'ISI Coefficient of Variation Test'¶
-
nonunited_observation_keys
= ['cv']¶
-
score_type
¶ alias of
sciunit.scores.complete.RatioScore
-
united_observation_keys
= []¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.dynamics.
ISITest
(*args, **kwargs)[source]¶ Bases:
neuronunit.tests.base.VmTest
Test whether a model exhibits the observed Inter Spike Intervals
-
description
= 'For neurons and muscle cells check the mean Interval Between Spikes given a spike train recording.'¶
-
generate_prediction
(model=None)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Inter Spike Interval Tests'¶
-
score_type
¶ alias of
sciunit.scores.complete.ZScore
-
units
= UnitTime('millisecond', 0.001 * s, 'ms')¶
-
-
class
neuronunit.tests.dynamics.
LocalVariationTest
(*args, **kwargs)[source]¶ Bases:
neuronunit.tests.base.VmTest
Tests whether a model exhibits the observed burstiness
-
description
= 'For neurons and muscle cells with slower non firing dynamics like CElegans neurons check to see how much variation is in the continuous membrane potential.'¶
-
generate_prediction
(model=None)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
local_variation
= 0.0¶
-
name
= 'Local Variation test'¶
-
required_capabilities
= (<class 'neuronunit.capabilities.ReceivesSquareCurrent'>, <class 'neuronunit.capabilities.ProducesSpikes'>)¶
-
score_type
¶ alias of
sciunit.scores.complete.RatioScore
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.dynamics.
TFRTypeTest
(*args, **kwargs)[source]¶ Bases:
neuronunit.tests.fi.RheobaseTest
Test whether a model has particular threshold firing rate dynamics, i.e. type 1 or type 2.
-
description
= 'A test of the instantaneous firing rate dynamics, i.e. type 1 or type 2'¶
-
name
= 'Firing Rate Type test'¶
-
score_type
¶ alias of
sciunit.scores.complete.BooleanScore
-
neuronunit.tests.fi module¶
F/I neuronunit tests.
For example, investigating firing rates and patterns as a function of input current.
-
class
neuronunit.tests.fi.
RheobaseTest
(observation={'mean': None, 'std': None}, name=None, **params)[source]¶ Bases:
neuronunit.tests.base.VmTest
Serial implementation of a binary search to test the rheobase.
Strengths: this algorithm is faster than the parallel class, present in this file under important and limited circumstances: this serial algorithm is faster than parallel for model backends that are able to implement numba jit optimization.
Weaknesses this serial class is significantly slower, for many backend implementations including raw NEURON, NEURON via PyNN, and possibly GLIF.
-
bind_score
(score, model, observation, prediction)[source]¶ Bind additional attributes to the test score.
-
condition_model
(model)[source]¶ Update the model in any way needed before generating the prediction.
This could include updating parameters such as simulation durations that do not define the model but do define experiments performed on the model. No default implementation.
-
default_params
= {'amplitude': array(100.) * pA, 'delay': array(100.) * ms, 'dt': array(0.025) * ms, 'duration': array(1000.) * ms, 'padding': array(200.) * ms, 'tolerance': array(1.) * pA}¶
-
description
= 'A test of the rheobase, i.e. the minimum injected current needed to evoke at least one spike.'¶
-
ephysprop_name
= 'Rheobase'¶
-
name
= 'Rheobase test'¶
-
params_schema
= {'amplitude': {'required': False, 'type': 'current'}, 'delay': {'min': 0, 'required': False, 'type': 'time'}, 'dt': {'min': 0, 'required': False, 'type': 'time'}, 'duration': {'min': 0, 'required': False, 'type': 'time'}, 'padding': {'min': 0, 'required': False, 'type': 'time'}, 'tmax': {'min': 0, 'required': False, 'type': 'time'}, 'tolerance': {'min': 1, 'required': False, 'type': 'current'}}¶
-
required_capabilities
= (<class 'neuronunit.capabilities.ReceivesSquareCurrent'>, <class 'neuronunit.capabilities.ProducesSpikes'>)¶
-
score_type
¶ alias of
sciunit.scores.complete.RatioScore
-
threshold_FI
(model, units, guess=None)[source]¶ Use binary search to generate an FI curve including rheobase.
-
units
= UnitCurrent('picoampere', 0.001 * nA, 'pA')¶
-
-
class
neuronunit.tests.fi.
RheobaseTestP
(observation={'mean': None, 'std': None}, name=None, **params)[source]¶ Bases:
neuronunit.tests.fi.RheobaseTest
Parallel implementation of a binary search to test the rheobase.
Strengths: this algorithm is faster than the serial class, present in this file for model backends that are not able to implement numba jit optimization, which actually happens to be typical of a signifcant number of backends.
-
condition_model
(model)[source]¶ Update the model in any way needed before generating the prediction.
This could include updating parameters such as simulation durations that do not define the model but do define experiments performed on the model. No default implementation.
-
description
= 'A test of the rheobase, i.e. the minimum injected current needed to evoke at least one spike.'¶
-
ephysprop_name
= 'Rheobase'¶
-
get_rheobase_vm
= True¶
-
name
= 'Rheobase test'¶
-
score_type
¶ alias of
sciunit.scores.complete.RatioScore
-
units
= UnitCurrent('picoampere', 0.001 * nA, 'pA')¶
-
-
neuronunit.tests.fi.
check_current
(dtc)[source]¶ Check the response to the proposed current and count spikes.
Inputs are an amplitude to test and a virtual model output is an virtual model with an updated dictionary.
-
neuronunit.tests.fi.
check_fix_range
(dtc)[source]¶ Check for the rheobase value.
Inputs: lookup, A dictionary of previous current injection values used to search rheobase Outputs: A boolean to indicate if the correct rheobase current was found and a dictionary containing the range of values used. If rheobase was actually found then rather returning a boolean and a dictionary, instead logical True, and the rheobase current is returned. given a dictionary of rheobase search values, use that dictionary as input for a subsequent search.
neuronunit.tests.morphology module¶
NeuronUnit Test classes for cell models with morphology
-
class
neuronunit.tests.morphology.
ApicalDendriteAverageBifurcationAngleLocalTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.AverageBifurcationAngleLocalTest
-
name
= 'Apical Dendrite Average Bifurcation Angle Local Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteAverageBifurcationAngleRemoteTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.AverageBifurcationAngleRemoteTest
-
name
= 'Apical Dendrite Average Bifurcation Angle Remote Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteAverageContractionTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.AverageContractionTest
-
name
= 'Apical Dendrite Average Contraction Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteAverageDiameterTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.AverageDiameterTest
-
name
= 'Apical Dendrite Average Diameter Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteAverageRallsRatioTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.AverageRallsRatioTest
-
name
= 'Apical Dendrite Average Ralls Ratio Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteFractalDimensionTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.FractalDimensionTest
-
name
= 'Apical Dendrite Fractal Dimension Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteMaxBranchOrderTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MaxBranchOrderTest
-
name
= 'Apical Dendrite Max Branch Order Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteMaxEuclideanDistanceTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MaxEuclideanDistanceTest
-
name
= 'Apical Dendrite Max Euclidean Distance Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteMaxPathDistanceTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MaxPathDistanceTest
-
name
= 'Apical Dendrite Max Path Distance Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteNumberofBifurcationsTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.NumberofBifurcationsTest
Test the agreement between number of apical dendrite bifurcations observed in the model and experiments
-
name
= 'Number of Apical Dendrite Bifurcations Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteNumberofBranchesTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.NumberofBranchesTest
-
name
= 'Apical Dendrite Number of Branches Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteOverallDepthTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.OverallDepthTest
-
name
= 'Apical Dendrite Overall Depth Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteOverallHeightTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.OverallHeightTest
-
name
= 'Apical Dendrite Overall Height Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteOverallWidthTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.OverallWidthTest
-
name
= 'Apical Dendrite Overall Width Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendritePartitionAsymmetryTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.PartitionAsymmetryTest
-
name
= 'Apical Dendrite Partition Asymmetry Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteTotalLengthTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.TotalLengthTest
-
name
= 'Apical Dendrite Total Length Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteTotalSurfaceTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.TotalSurfaceTest
-
name
= 'Apical Dendrite Total Surface Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
ApicalDendriteTotalVolumeTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.TotalVolumeTest
-
name
= 'Apical Dendrite Total Volume Test'¶
-
specificity
= 'Type==4'¶
-
-
class
neuronunit.tests.morphology.
AverageBifurcationAngleLocalTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between average bifurcation angle local observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Average Bifurcation Angle Local Test'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.morphology.
AverageBifurcationAngleRemoteTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between average bifurcation angle remote observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Average Bifurcation Angle Remote Test'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.morphology.
AverageContractionTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between average contraction observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Average Contraction Test'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.morphology.
AverageDiameterTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between average diameter observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Average Diameter Test'¶
-
pca
= True¶
-
units
= UnitLength('micrometer', 0.001 * mm, 'um')¶
-
-
class
neuronunit.tests.morphology.
AverageRallsRatioTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between average Rall’s ratio observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Average Ralls Ratio Test'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteAverageBifurcationAngleLocalTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.AverageBifurcationAngleLocalTest
-
name
= 'Basal Dendrite Average Bifurcation Angle Local Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteAverageBifurcationAngleRemoteTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.AverageBifurcationAngleRemoteTest
-
name
= 'Basal Dendrite Average Bifurcation Angle Remote Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteAverageContractionTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.AverageContractionTest
-
name
= 'Basal Dendrite Average Contraction Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteAverageDiameterTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.AverageDiameterTest
-
name
= 'Basal Dendrite Average Diameter Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteAverageRallsRatioTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.AverageRallsRatioTest
-
name
= 'Basal Dendrite Average Ralls Ratio Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteFractalDimensionTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.FractalDimensionTest
-
name
= 'Basal Dendrite Fractal Dimension Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteMaxBranchOrderTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MaxBranchOrderTest
-
name
= 'Basal Dendrite Max Branch Order Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteMaxEuclideanDistanceTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MaxEuclideanDistanceTest
-
name
= 'Basal Dendrite Max Euclidean Distance Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteMaxPathDistanceTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MaxPathDistanceTest
-
name
= 'Basal Dendrite Max Path Distance Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteNumberofBifurcationsTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.NumberofBifurcationsTest
Test the agreement between number of basal dendrite bifurcations observed in the model and experiments
-
name
= 'Number of Basal Dendrite Bifurcations Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteNumberofBranchesTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.NumberofBranchesTest
-
name
= 'Basal Dendrite Number of Branches Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteOverallDepthTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.OverallDepthTest
-
name
= 'Basal Dendrite Overall Depth Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteOverallHeightTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.OverallHeightTest
-
name
= 'Basal Dendrite Overall Height Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteOverallWidthTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.OverallWidthTest
-
name
= 'Basal Dendrite Overall Width Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendritePartitionAsymmetryTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.PartitionAsymmetryTest
-
name
= 'Basal Dendrite Partition Asymmetry Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteTotalLengthTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.TotalLengthTest
-
name
= 'Basal Dendrite Total Length Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteTotalSurfaceTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.TotalSurfaceTest
-
name
= 'Basal Dendrite Total Surface Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
BasalDendriteTotalVolumeTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.TotalVolumeTest
-
name
= 'Basal Dendrite Total Volume Test'¶
-
specificity
= 'Type==3'¶
-
-
class
neuronunit.tests.morphology.
FractalDimensionTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between fractal dimension observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Fractal Dimension Test'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.morphology.
MaxBranchOrderTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between max branch order observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Max Branch Order Test'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.morphology.
MaxEuclideanDistanceTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between max euclidean distance observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Max Euclidean Distance Test'¶
-
units
= UnitLength('micrometer', 0.001 * mm, 'um')¶
-
-
class
neuronunit.tests.morphology.
MaxPathDistanceTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between max path distance observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Max Path Distance Test'¶
-
units
= UnitLength('micrometer', 0.001 * mm, 'um')¶
-
-
class
neuronunit.tests.morphology.
MorphologyTest
(observation, name=None, **params)[source]¶ Bases:
sciunit.tests.Test
An abstract class to hold common elements among the morphology tests below
-
get_lmeasure
(model_swc, measure, stat)[source]¶ Computes the specified L-Measure measure and selects one of the statistics
Parameters: - model_swc – A model that has ProducesSWC capability
- measure – One of the functions from the list: http://cng.gmu.edu:8080/Lm/help/index.htm
- stat – One of: Average, Maximum, Minimum, StdDev, TotalSum
Returns: The computed measure statistic
-
pca
= False¶
-
required_capabilities
= (<class 'neuronunit.capabilities.morphology.ProducesSWC'>,)¶
-
score_type
¶ alias of
sciunit.scores.complete.ZScore
-
specificity
= 'Type > 1'¶
-
-
class
neuronunit.tests.morphology.
NumberofBifurcationsTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between number of bifurcations observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Number of Bifurcations Test'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.morphology.
NumberofBranchesTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between number of branches observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Number of Branches Test'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.morphology.
NumberofStemsTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between number of stems observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Number of Stems Test'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.morphology.
OverallDepthTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between overall depth observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Overall Depth Test'¶
-
pca
= True¶
-
units
= UnitLength('micrometer', 0.001 * mm, 'um')¶
-
-
class
neuronunit.tests.morphology.
OverallHeightTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between overall height observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Overall Height Test'¶
-
pca
= True¶
-
units
= UnitLength('micrometer', 0.001 * mm, 'um')¶
-
-
class
neuronunit.tests.morphology.
OverallWidthTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between overall width observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Overall Width Test'¶
-
pca
= True¶
-
units
= UnitLength('micrometer', 0.001 * mm, 'um')¶
-
-
class
neuronunit.tests.morphology.
PartitionAsymmetryTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between partition asymmetry observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Partition Asymmetry Test'¶
-
units
= Dimensionless('dimensionless', 1.0 * dimensionless)¶
-
-
class
neuronunit.tests.morphology.
SomaSurfaceAreaTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between soma surface area observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Soma Surface Area Test'¶
-
units
= array(1.) * um**2¶
-
-
class
neuronunit.tests.morphology.
TotalLengthTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between total length observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Total Length Test'¶
-
units
= UnitLength('micrometer', 0.001 * mm, 'um')¶
-
-
class
neuronunit.tests.morphology.
TotalSurfaceTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between total surface observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Total Surface Test'¶
-
units
= array(1.) * um**2¶
-
-
class
neuronunit.tests.morphology.
TotalVolumeTest
(observation, name=None, **params)[source]¶ Bases:
neuronunit.tests.morphology.MorphologyTest
Test the agreement between total volume (excl. soma) observed in the model and experiments
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
name
= 'Total Volume Test'¶
-
units
= array(1.) * um**3¶
-
neuronunit.tests.passive module¶
Passive neuronunit tests, requiring no active conductances or spiking.
-
class
neuronunit.tests.passive.
CapacitanceTest
(*args, **kwargs)[source]¶ Bases:
neuronunit.tests.passive.TestPulseTest
Tests the input resistance of a cell.
-
description
= 'A test of the membrane capacitance of a cell.'¶
-
ephysprop_name
= 'Cell Capacitance'¶
-
name
= 'Capacitance test'¶
-
units
= UnitQuantity('picofarad', 0.001 * nF, 'pF')¶
-
-
class
neuronunit.tests.passive.
InputResistanceTest
(*args, **kwargs)[source]¶ Bases:
neuronunit.tests.passive.TestPulseTest
Test the input resistance of a cell.
-
description
= 'A test of the input resistance of a cell.'¶
-
ephysprop_name
= 'Input Resistance'¶
-
name
= 'Input resistance test'¶
-
units
= UnitQuantity('megaohm', 1000000.0 * ohm, 'Mohm')¶
-
-
class
neuronunit.tests.passive.
RestingPotentialTest
(*args, **kwargs)[source]¶ Bases:
neuronunit.tests.passive.TestPulseTest
Tests the resting potential under zero current injection.
-
default_params
= {'amplitude': array(0.) * pA, 'delay': array(100.) * ms, 'dt': array(0.025) * ms, 'duration': array(300.) * ms, 'padding': array(200.) * ms}¶
-
description
= 'A test of the resting potential of a cell where injected current is set to zero.'¶
-
ephysprop_name
= 'Resting membrane potential'¶
-
name
= 'Resting potential test'¶
-
score_type
¶ alias of
sciunit.scores.complete.ZScore
-
units
= UnitQuantity('millivolt', 0.001 * V, 'mV')¶
-
-
class
neuronunit.tests.passive.
TestPulseTest
(*args, **kwargs)[source]¶ Bases:
neuronunit.tests.base.VmTest
A base class for tests that use a square test pulse.
-
compute_params
()[source]¶ Compute new params from existing self.params. Inserts those new params into self.params. Use this when some params depend upon the values of others. Example: self.params[‘c’] = self.params[‘a’] + self.params[‘b’]
-
condition_model
(model)[source]¶ Update the model in any way needed before generating the prediction.
This could include updating parameters such as simulation durations that do not define the model but do define experiments performed on the model. No default implementation.
-
default_params
= {'amplitude': array(-10.) * pA, 'delay': array(100.) * ms, 'dt': array(0.025) * ms, 'duration': array(300.) * ms, 'padding': array(200.) * ms}¶
-
name
= ''¶
-
required_capabilities
= (<class 'neuronunit.capabilities.ReceivesSquareCurrent'>,)¶
-
score_type
¶ alias of
sciunit.scores.complete.ZScore
-
-
class
neuronunit.tests.passive.
TimeConstantTest
(*args, **kwargs)[source]¶ Bases:
neuronunit.tests.passive.TestPulseTest
Test the input resistance of a cell.
-
description
= 'A test of membrane time constant of a cell.'¶
-
ephysprop_name
= 'Membrane Time Constant'¶
-
name
= 'Time constant test'¶
-
units
= UnitTime('millisecond', 0.001 * s, 'ms')¶
-
neuronunit.tests.waveform module¶
Waveform neuronunit tests, e.g. testing AP waveform properties
-
class
neuronunit.tests.waveform.
APAmplitudeTest
(observation={'mean': None, 'std': None}, name=None, **params)[source]¶ Bases:
neuronunit.tests.base.VmTest
Test the heights (peak amplitude) of action potentials.
-
description
= 'A test of the amplitude (peak minus threshold) of action potentials.'¶
-
ephysprop_name
= 'Spike Amplitude'¶
-
name
= 'AP amplitude test'¶
-
required_capabilities
= (<class 'neuronunit.capabilities.ProducesActionPotentials'>,)¶
-
score_type
¶ alias of
sciunit.scores.complete.ZScore
-
units
= UnitQuantity('millivolt', 0.001 * V, 'mV')¶
-
-
class
neuronunit.tests.waveform.
APThresholdTest
(observation={'mean': None, 'std': None}, name=None, **params)[source]¶ Bases:
neuronunit.tests.base.VmTest
Test the full widths of action potentials at their half-maximum.
-
description
= 'A test of the membrane potential threshold at which action potentials are produced.'¶
-
ephysprop_name
= 'Spike Threshold'¶
-
name
= 'AP threshold test'¶
-
required_capabilities
= (<class 'neuronunit.capabilities.ProducesActionPotentials'>,)¶
-
score_type
¶ alias of
sciunit.scores.complete.ZScore
-
units
= UnitQuantity('millivolt', 0.001 * V, 'mV')¶
-
-
class
neuronunit.tests.waveform.
APWidthTest
(observation={'mean': None, 'std': None}, name=None, **params)[source]¶ Bases:
neuronunit.tests.base.VmTest
Test the full widths of action potentials at their half-maximum.
-
description
= 'A test of the widths of action potentials at half of their maximum height.'¶
-
ephysprop_name
= 'Spike Half-Width'¶
-
name
= 'AP width test'¶
-
required_capabilities
= (<class 'neuronunit.capabilities.ProducesActionPotentials'>,)¶
-
score_type
¶ alias of
sciunit.scores.complete.RatioScore
-
units
= UnitTime('millisecond', 0.001 * s, 'ms')¶
-
-
class
neuronunit.tests.waveform.
InjectedCurrent
[source]¶ Bases:
object
Metaclass to mixin with InjectedCurrent tests.
-
default_params
= {'amplitude': array(100.) * pA, 'delay': array(100.) * ms, 'dt': array(0.025) * ms, 'duration': array(300.) * ms, 'padding': array(200.) * ms}¶
-
required_capabilities
= (<class 'neuronunit.capabilities.ReceivesSquareCurrent'>,)¶
-
-
class
neuronunit.tests.waveform.
InjectedCurrentAPAmplitudeTest
(observation={'mean': None, 'std': None}, name=None, **params)[source]¶ Bases:
neuronunit.tests.waveform.InjectedCurrent
,neuronunit.tests.waveform.APAmplitudeTest
Test the heights (peak amplitude) of action potentials.
Uses current injection.
-
description
= 'A test of the heights (peak amplitudes) of action potentials when current is injected into cell.'¶
-
name
= 'Injected current AP amplitude test'¶
-
-
class
neuronunit.tests.waveform.
InjectedCurrentAPThresholdTest
(observation={'mean': None, 'std': None}, name=None, **params)[source]¶ Bases:
neuronunit.tests.waveform.InjectedCurrent
,neuronunit.tests.waveform.APThresholdTest
Test the thresholds of action potentials under current injection.
-
description
= 'A test of the membrane potential threshold at which action potentials are produced under current injection.'¶
-
name
= 'Injected current AP threshold test'¶
-
-
class
neuronunit.tests.waveform.
InjectedCurrentAPWidthTest
(observation={'mean': None, 'std': None}, name=None, **params)[source]¶ Bases:
neuronunit.tests.waveform.InjectedCurrent
,neuronunit.tests.waveform.APWidthTest
Tests the full widths of APs at their half-maximum under current injection.
-
description
= 'A test of the widths of action potentials at half of their maximum height when current is injected into cell.'¶
-
name
= 'Injected current AP width test'¶
-
score_type
¶ alias of
sciunit.scores.complete.ZScore
-
units
= UnitTime('millisecond', 0.001 * s, 'ms')¶
-
Module contents¶
NeuronUnit Test classes.
-
class
neuronunit.tests.
FakeTest
(observation, name=None, **params)[source]¶ Bases:
sciunit.tests.Test
-
compute_score
(observation, prediction)[source]¶ Generates a score given the observations provided in the constructor and the prediction generated by generate_prediction.
Must generate a score of score_type. No default implementation.
-
generate_prediction
(model)[source]¶ Generate a prediction from a model using the required capabilities.
No default implementation.
-
score_type
¶ alias of
sciunit.scores.complete.ZScore
-