Analog Interval Threshold
Overview
This transform detects continuous time intervals during which an analog signal’s value meets a specified threshold condition (e.g., staying above a value).
Detailed Description
This transformation is used to identify continuous periods, or “intervals,” where a signal’s amplitude meets certain criteria. Unlike event detection, which marks a single point in time, interval detection finds the start and end times of periods that satisfy the condition.
The user can define a threshold and specify whether the signal must be above (Positive
), below (Negative
), or have its absolute value exceed (Absolute
) that threshold.
Additionally, two timing parameters help refine the detection: - A lockout_time
prevents the detection of new intervals for a set duration after the start of a previous interval. - A min_duration
ensures that only intervals lasting longer than a specified duration are included in the final output.
This transform is useful for isolating epochs of interest in a continuous signal for further analysis. It takes an analog time series as input and produces a digital interval series as output.
Neuroscience Use Cases
This transform is particularly useful for identifying specific “states” or “epochs” in neural or behavioral data.
- Identifying Periods of Movement: From accelerometer or video tracking data, one can find intervals of high activity that correspond to an animal moving, versus periods of rest.
- Analyzing Muscle Activation: In electromyography (EMG), this can be used to determine the duration of muscle contractions by finding intervals where the rectified signal remains above a certain level of activity.
Parameters
This transform has the following parameters:
threshold_value
: The amplitude value the signal must be above/below for the duration of the interval.direction
: Specifies the condition the signal must meet. Valid options are:"Positive"
,"Negative"
, or"Absolute"
.lockout_time
: A duration (in the same time units as the data) after the start of a detected interval, during which no new intervals can begin. This is useful for isolating the onset of distinct episodes of activity.min_duration
: The minimum required length of an interval. Any detected period that is shorter than this value will be discarded.missing_data_mode
: Defines how to handle non-consecutive time points in the signal.Treat as Zero
: Missing time points are treated as if the signal’s value is zero. This can terminate an interval if zero does not meet the threshold condition.Ignore
: The algorithm proceeds to the next available data point, effectively ignoring the time gap.
Example Configuration
Here is a complete example of a JSON configuration file that could be used to run this transformation. This example finds all intervals where a signal named “LFP_channel_1” remains above 1.5
for at least 50 milliseconds.
[
{
"transformations": {
"metadata": {
"name": "Interval Threshold Detection Pipeline",
"description": "Detects intervals of high activity in an LFP signal.",
"version": "1.0"
},
"steps": [
{
"step_id": "1",
"transform_name": "Threshold Interval Detection",
"phase": "analysis",
"input_key": "LFP_channel_1",
"output_key": "detected_activity_intervals",
"parameters": {
"threshold_value": 1.5,
"direction": "Positive",
"lockout_time": 0.0,
"min_duration": 0.050,
"missing_data_mode": "Treat as Zero"
}
}
]
}
}
]