IRASA YASA
Module name: IRASAYASA
Package: CEAMSModules 7.4.0
Version: 0.0.0
Overview
Spectral power decomposition using IRASA algorithm (Iterative Rational Autocorrelation Decomposition Analysis).
This class implements signal decomposition to separate rhythmic (periodic/oscillatory) components from arhythmic (aperiodic/broadband) components of EEG or other time-series signals. The algorithm uses the YASA library’s IRASA implementation to perform the spectral decomposition.
Inputs
Input |
Format |
Default |
Description |
|---|---|---|---|
|
list of SignalModel objects |
— |
- signal.samples : numpy array of shape (N_samples,) containing the raw signal data
- signal.sample_rate : float, sampling rate of the signal in Hz
- signal.channel : str, channel label/name for identification
- signal.start_time : float, start time of the signal in seconds (optional)
|
|
float or str |
— |
Window length in seconds for the spectral analysis (e.g., 4.0)
Determines the time-frequency resolution of the analysis.
|
|
float or str |
— |
Window step/overlap in seconds between consecutive FFT windows.
Controls the temporal resolution of the PSD computation.
|
|
str |
— |
Name of the windowing function to apply before FFT (e.g., ‘hann’, ‘hamming’, ‘blackman’).
Reduces spectral leakage from windowing effects.
|
|
float or str |
— |
Lower frequency boundary (Hz) for the IRASA decomposition analysis.
Only frequency components within [first_freq, last_freq] are analyzed.
|
|
float or str |
— |
Upper frequency boundary (Hz) for the IRASA decomposition analysis.
Only frequency components within [first_freq, last_freq] are analyzed.
|
|
bool or str, optional (default: False) |
False |
It does nothing right now and can be used in the future to control whether to bypass the computation or not. |
Outputs
Output |
Format |
Description |
|---|---|---|
|
list of dicts |
List of dictionaries (one per input signal) containing rhythmic spectral components.
Each dictionary contains:
- ‘psd’ : numpy array of shape (N_epochs, N_freq_bins)
Rhythmic power spectral density (periodic component ratio)
- ‘freq_bins’ : numpy array of shape (N_freq_bins,)
Frequency bins in Hz corresponding to the PSD spectrum
- ‘win_len’ : float
Window length used for FFT in seconds
- ‘win_step’ : float
Window step/overlap in seconds
- ‘sample_rate’ : float
Sampling rate of the original signal in Hz
- ‘chan_label’ : str
Channel label from the input signal
- ‘start_time’ : float
Start time of the signal in seconds
- ‘end_time’ : float
End time of the signal in seconds
- ‘duration’ : float
Total duration of the signal in seconds
- ‘flag’ : str (value: ‘rhythmic’)
Flag indicating this is the rhythmic component
|
|
list of dicts |
List of dictionaries (one per input signal) containing arhythmic spectral components.
Each dictionary has identical structure to rhythmic_psd but with:
- ‘psd’ : numpy array of shape (N_epochs, N_freq_bins)
Arhythmic power spectral density (aperiodic component)
- ‘flag’ : str (value: ‘arhythmic’)
Flag indicating this is the arhythmic component
|
Usage in a process
Open Dev Tools -> New process in Snooz.
In the Module Library, find IRASA YASA under the Signal Processing 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.