biophysics_fitting
❭ ephys
❭ AP_height_check_1AP
AP_height_check_1AP¶
-
biophysics_fitting.ephys.AP_height_check_1AP(t, v, thresh=
None
)¶ Determines if an action potential (AP) is present in a voltage trace by checking if the voltage crosses a given threshold.
- Parameters:¶
t (array-like) – Array of time values corresponding to the voltage trace.
v (array-like) – Array of voltage values for the trace.
thresh (float, optional) – The voltage threshold to use for detecting the AP. If None, defaults to the maximum voltage value divided by 2.
- Returns:¶
True if at least one AP is detected in the voltage trace, False otherwise.
- Return type:¶
bool