elasticai.preprocessor.windower.window#
Module Contents#
Classes#
Class for defining the properties for applying a window sequenzer on transient signals Attributes: sampling_rate: Floating value with sampling rate of the transient signal [Hz] window_sec: Floating value with the size of the window [s] overlap_sec: Floating value with overlapping the sequences [s] |
|
Functions#
Generating window for smoothing input of signal transformation method. |
Data#
API#
- elasticai.preprocessor.windower.window.transformation_window_method(window_size: int, method: str = 'hamming') numpy.ndarray[source]#
Generating window for smoothing input of signal transformation method.
- Parameters:
window_size – Integer number with size of the window
method – Selection of window method [‘’: Ones, ‘hamming’, ‘hanning’, ‘gaussian’, ‘bartlett’, ‘blackman’]
- Returns:
Numpy array with window
- class elasticai.preprocessor.windower.window.SettingsWindow[source]#
Class for defining the properties for applying a window sequenzer on transient signals Attributes: sampling_rate: Floating value with sampling rate of the transient signal [Hz] window_sec: Floating value with the size of the window [s] overlap_sec: Floating value with overlapping the sequences [s]
- sampling_rate: float#
None
- window_sec: float#
None
- overlap_sec: float#
None
- property window_length: int#
Returning an integer with total number of samples for building the window sequence
- property overlap_length: int#
Returning an integer with total number of samples for overlapping
- elasticai.preprocessor.windower.window.DefaultSettingsWindow#
‘SettingsWindow(…)’
- class elasticai.preprocessor.windower.window.WindowSequencer(settings: elasticai.preprocessor.windower.window.SettingsWindow)[source]#
Initialization
Class for applying a window sequenzer on transient signals
- Parameters:
settings – Class SettingsWindow with definitions for the window sequenzer
- Returns:
None
- sequence(signal: numpy.ndarray) numpy.ndarray[source]#
Building a sequence-to-sequence output array from signal input
- Parameters:
signal – Numpy array with input signal to build the sequence with shape=(N, )
- Returns:
Numpy array of sequence signals with shape=(M, window length)
- slide(signal: numpy.ndarray) numpy.ndarray[source]#
Building a sliding window sequencer on signal input
- Parameters:
signal – Numpy array with input signal to build the sequence with shape=(N, )
- Returns:
Numpy array of sequence signals with shape=(M, window length)
- window_event_detected(signal: numpy.ndarray, thr: float, pre_time: float, do_abs: bool = False) numpy.ndarray[source]#
Building a window sequencer based on an event-detection (absolute input)
- Parameters:
signal – Numpy array with input signal to build the sequence with shape=(N, )
thr – Floating value with absolute threshold value
pre_time – Floating value with pre-time in the window before event is detected
do_abs – Boolean for applying absolute signal to threshold calculation
- Returns:
Numpy array of sequence signals with shape=(M, window length)