elasticai.preprocessor.thresholding.thresholding#
Module Contents#
Classes#
Dataclass for defining the funcs for determining properties to calculate thresholding Attributes: method: Applied method for thresholding [‘const’: constant given value, ‘abs_mean’: absolute mean value, ‘mad’: median absolute derivation, ‘mavg’, moving average, ‘mavg_abs’: absolute mean absolute value, ‘rms_norm’: Root-Mean-Squared, ‘rms_move’: Moving RMS, ‘rms_black’: RMS method used in Blackrock Neurotechnology Systems, ‘welford’: Welford Online Algorithm for STD Calculation] sampling_rate: Sampling rate of the transient signal [Hz] gain: Applied gain on threshold output window_sec: Window length in sec. |
|
Data#
API#
- class elasticai.preprocessor.thresholding.thresholding.SettingsThreshold[source]#
Dataclass for defining the funcs for determining properties to calculate thresholding Attributes: method: Applied method for thresholding [‘const’: constant given value, ‘abs_mean’: absolute mean value, ‘mad’: median absolute derivation, ‘mavg’, moving average, ‘mavg_abs’: absolute mean absolute value, ‘rms_norm’: Root-Mean-Squared, ‘rms_move’: Moving RMS, ‘rms_black’: RMS method used in Blackrock Neurotechnology Systems, ‘welford’: Welford Online Algorithm for STD Calculation] sampling_rate: Sampling rate of the transient signal [Hz] gain: Applied gain on threshold output window_sec: Window length in sec.
- method: str#
None
- sampling_rate: float#
None
- gain: float#
None
- window_sec: float#
None
- property window_steps: int#
Getting the stepsize of the window
- elasticai.preprocessor.thresholding.thresholding.DefaultSettingsThreshold#
‘SettingsThreshold(…)’
- class elasticai.preprocessor.thresholding.thresholding.Thresholding(settings: elasticai.preprocessor.thresholding.thresholding.SettingsThreshold)[source]#
Initialization
Class for calculating the thresholding values based on the transient input signal
- Parameters:
settings – Class SettingsThreshold for configuring the properties
- Returns:
None
- get_overview() list[source]#
Getting an overview of available thresholding methods
- Returns:
List with names of available methods
- get_threshold(xin: numpy.ndarray, do_abs: bool = False, **kwargs) numpy.ndarray[source]#
Function for getting the thresholding value from input
- Parameters:
xin – Numpy array with transient raw signal
do_abs – Apply absolute xin for thresholding or not
- Returns:
Numpy array with thresholding value from applied method
- get_threshold_position(xin: numpy.ndarray, pre_time: float = 0.0, do_abs: bool = False, **kwargs) numpy.ndarray[source]#
Function for getting the crosspoints of thresholding value and transient input
- Parameters:
xin – Numpy array with transient raw signal
pre_time – Floating value with pre-time in the window before event is detected [s]
do_abs – Boolean for applying absolute xin for getting position and threshold
- Returns:
Numpy array with thresholding value from applied method