Skip to content

← spectral package

EventRelatedSpectralPerturbation

A meta-node that segments and calculates the ERSPs for a predefined set of event markers.

Uses the following nodes: SelectRange, Segmentation, Spectrogram, FrequencyNormalization, ToDecibels, Rereferencing, Mean. More Info... Version 1.0.1

Ports/Properties

data

Data to process.

verbose name
Data
default value
None
port type
DataPort
value type
Packet (can be None)
data direction
INOUT

spectogram_subwindow_length

Length of the sub-windows for spectral estimation, in seconds. This node will extract successive windows from the given data of this length, which are overlapped according to the overlap samples parameter. Longer windows will give a higher-resolution spectrum, but at the same time the result will increase the smoothness (i.e., blurriness) along the time axis. The tradeoff between time resolution and frequency resolution that can be adjusted via this parameter is fundamental.

verbose name
Spectogram Subwindow Length
default value
0.5
port type
FloatPort
value type
float (can be None)

spectrogram_overlap

Overlap between successive sub-windows, expressed as a fraction of the sub-window length. This determines by how much successive sub-windows are overlapped. Using a higher value will yield finer stepping in time without a change in temporal or frequency detail (since the time axis will be correspondingly more smooth to counter the finer stepping). If not given, defaults to half of the sub-window length. Can also be expressed in samples.

verbose name
Spectrogram Overlap
default value
0.95
port type
FloatPort
value type
float (can be None)

spectogram_fft_size

Length of the FFT used, in samples. Using a higher number will yield a finer stepping along the frequency axis, without a change in frequency or temporal detail (the frequency axis will be correspondingly more smooth to counter the finer stepping). If not given, it defaults to the sub-window length.

verbose name
Spectogram Fft Size
default value
256
port type
IntPort
value type
int (can be None)

spectogram_unit

Unit in which the sub-window length is expressed. By default this is seconds, but samples can also be used if necessary.

verbose name
Unit Used For Sub-Window Length.
default value
seconds
port type
EnumPort
value type
str (can be None)

frequency_normalization_alpha

The exponent of 1/f^alpha used in the correction. Set to None to determine the value automatically.

verbose name
Frequency Normalization Alpha
default value
1.0
port type
FloatPort
value type
float (can be None)

time_bounds

Time range in seconds relative to the event, within which data will be selected to represent the individual trials. Express in this format: -1.5, 2 (will select from 1.5 seconds before the event to 2 seconds after).

verbose name
Time Bounds
default value
[-0.2, 0.6]
port type
ListPort
value type
list (can be None)

frequency_range

Frequency range for which to plot the ERSP.

verbose name
Frequency Range
default value
1...45
port type
Port
value type
object (can be None)

baseline_removal_range

Reference time range relative to the event for removing the baseline.

verbose name
Baseline Removal Range
default value
-0.5...0
port type
Port
value type
object (can be None)

skip_baseline_removal

Skip baseline removal (performed later.)

verbose name
Skip Baseline Removal
default value
False
port type
BoolPort
value type
bool (can be None)

max_gap_length

Maximum length of time-stamp gaps that are allowed in segments. If a gap between successive samples is larger than this duration in seconds, then the affected segment is not extracted. Optional. Note that if your time stamps are jittered, this will generate a lot of false positives unless you use a very generous cutoff. You can use the DejitterTimestamps node early during your processing to fix that.

verbose name
Max Gap Length
default value
0.2
port type
FloatPort
value type
float (can be None)

channel_range

Comma separated list of channels/ROIs for which an ERSP plot will be generated. Leave blank or set to 'all' to generate ERSP plots for all previously-selected channels/ROIs.

verbose name
Channel Range
default value
:
port type
Port
value type
object (can be None)

output_measure

Output measure to calculate. Mean will be the usual average ERP, while median and trim_mean result in estimates that are more robust to outliers. For moderate artifact content, trim_mean is preferable, and median should only be used for extremely contaminated data. The trials mode will return the raw trials instead of taking the mean, for averaging later using the GroupedMean for example.

verbose name
Output Measure
default value
trials
port type
EnumPort
value type
str (can be None)

cache_spectrogram

Enable caching for Spectrogram. This will significantly speed up re-use of the same data.

verbose name
Cache Spectrogram
default value
False
port type
BoolPort
value type
bool (can be None)

set_breakpoint

Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.

verbose name
Set Breakpoint (Debug Only)
default value
False
port type
BoolPort
value type
bool (can be None)

metadata

User-definable meta-data associated with the node. Usually reserved for technical purposes.

verbose name
Metadata
default value
{}
port type
DictPort
value type
dict (can be None)