biophysics_fitting
❭ hay
❭ evaluation
❭ bAP
bAP¶
-
class biophysics_fitting.hay.evaluation.bAP(soma_thresh=
-30
, stim_onset=295
, stim_duration=5
, bAP_thresh='+2mV'
, punish=250.0
, punish_last_spike_after_deadline=True
, punish_minspikenum=1
, punish_returning_to_rest_tolerance=2.0
, definitions=HAY_BAP_DEFINITIONS
)¶ Evaluate the \(bAP\) stimulus protocol.
These metrics were introduced by Hay et al. [2], and illustrated in Bast et al. [3].
See also
biophysics_fitting.setup_stim.setup_bAP()
for more information on the stimulus protocol.- Parameters:¶
soma_thresh (float) – The threshold for APs in the somatic voltage trace. Defaults to \(-30\ mV\).
stim_onset (float) – The onset of the stimulus (\(ms\)). Defaults to \(295\ ms\).
stim_duration (float) – The duration of the stimulus (\(ms\)). Defaults to \(5\ ms\).
bAP_thresh (float) – The threshold for the backpropagating action potential. Defaults to \(+2\ mV\).
punish (float) – The punishment value in units of \(\sigma\). Used as a baseline if the voltage trace cannot be evaluated on a metric (e.g. if it does not contain an AP). Defaults to \(250 \sigma\).
punish_last_spike_after_deadline (bool) – Whether to punish if the last spike is after the deadline. Defaults to
True
punish_minspikenum (int) – The minimum number of spikes required for this stimulus protocol. Defaults to \(1\).
punish_returning_to_rest_tolerance (float) – The tolerance for returning to rest (\(mV\)). Defaults to \(2 mV\).
definitions (dict) – The definitions for the evaluation metrics. See also:
definitions
.
- Attributes:¶
- soma_thresh¶
The threshold for APs in the somatic voltage trace. Defaults to \(-30\) mV.
- Type:¶
float
- bAP_thresh¶
The threshold for the backpropagating action potential. Defaults to \(+2\) mV.
- Type:¶
float
- punish¶
The punishment value in units of \(\sigma\). Used as a baseline if the voltage trace cannot be evaluated on a metric (e.g. if it does not contain an AP). Defaults to \(250 \sigma\).
- Type:¶
float
- punish_last_spike_after_deadline¶
Whether to punish if the last spike is after the deadline. Defaults to
True
- Type:¶
bool
- punish_returning_to_rest_tolerance¶
The tolerance for returning to rest (\(mV\)). Defaults to \(2 mV\).
- Type:¶
float
- definitions¶
The empirical means and standard deviations for the evaluation metrics. Defaults to:
{ 'bAP_APheight': ('AP_height', 25.0, 5.0), 'bAP_APwidth': ('AP_width', 2.0, 0.5), 'bAP_att2': ('BPAPatt2', 45.0, 10.0), 'bAP_att3': ('BPAPatt3', 36.0, 9.33), 'bAP_spikecount': ('Spikecount', 1.0, 0.01) }
- Type:¶
dict
- Methods:¶
get
(**voltage_traces)Get the full evaluation of the voltage traces for bAP firing.
check
(out, voltage_traces)Check for problems in the voltage trace.
bAP_APheight
(voltage_traces)Get the height of the first action potential in the somatic voltage trace.
bAP_APwidth
(voltage_traces)Get the width of the first action potential in the somatic voltage trace.
bAP_spikecount
(voltage_traces)Get the number of spikes in the somatic voltage trace.
_bAP_att
(voltage_traces, _n)Get the backpropagating action potential attenuation.
bAP_att2
(voltage_traces)Get the backpropagating action potential attenuation between the soma and first dendritic pipette location.
bAP_att3
(voltage_traces)Get the backpropagating action potential attenuation between the soma and second dendritic pipette location.