Amplitude Var Detector
Module name: AmplitudeVarDetector
Package: CEAMSModules 7.4.0
Version: 2.0.0
Overview
This plugin detects events based on maximum amplitude variation in a narrow time windows. The amplitude variation is computed as max - min of amplitude values included in a sliding window. The threshold can be fixed or a z-score (a number of standard deviations) from the baseline window. The plugin is flexible, an event can be detected when activity goes above or below the threshold. The threshold can be fixed or adaptive based on a baseline window around the event. The adaptive threshold can be x times the baseline median value or x times the standard deviation of the baseline. When a z-score is used as threshold (x BSL STD), the absolute signal amplitude can be log10 transformed to make them more normally distributed.
Inputs
Input |
Format |
Default |
Description |
|---|---|---|---|
|
a list of SignalModel |
— |
signal.samples : The actual signal data as numpy list
signal.sample_rate : sampling rate of the signal (used to STFT)
signal.channel : current channel label
|
|
string, event group. |
— |
string, event group. |
|
string |
— |
event label. |
|
string |
1 |
The window length (in second) used to compute the amplitude variation. |
|
string |
1 |
The window step (in seconds) between two amplitude variation calculations. |
|
string |
0 |
The padding event (length in second) to add to the beginning and
the end of the originally detected event.
|
|
string |
— |
The threshold value to detect events. |
|
string |
fixed |
The threshold unit (fixed, x BSL median, x BSL STD or x BSL STD(log10)). |
|
string |
Above |
Above : Event is detected when activity goes above the threshold.
Below : Event is detected when activity goes below the threshold.
|
|
string |
— |
(optional) The baseline window length in seconds |
|
Pandas DataFrame (columns=[‘group’,’name’,’start_sec’,’duration_sec’,’channels’]) |
— |
(optional) Artefact events previously detected |
|
— |
— |
See module settings for configuration details. |
Outputs
Output |
Format |
Description |
|---|---|---|
|
Pandas DataFrame |
List of events (columns=[‘group’,’name’,’start_sec’,’duration_sec’,’channels’]) |
|
ndarray of n_windows |
Absolute signal amplitude or the std amplitude value relative to the baseline. |
|
ndarray of n_windows |
(Optional) MedianSTD amplitude of the baseline window. |
Usage in a process
Open Dev Tools -> New process in Snooz.
In the Module Library, find Amplitude Var Detector under the Detectors category.
Drag the module onto the process canvas.
Connect the required inputs from upstream modules (or set values in the Settings tab).
Connect outputs to downstream modules as needed.
Double-click the module to configure parameters in the Settings tab.
Run the process and inspect results in the Results tab.
Note
For general guidance on building processes with modules, see Explore examples.