Example: Time-Frequency Analysis¶
This page explains the time_frequency_analysis_pipeline.signalJourney.json
example file, which documents a typical time-frequency analysis using MNE-Python.
{
"sj_version": "0.1.0",
"schema_version": "0.1.0",
"description": "Example signalJourney file for a time-frequency analysis pipeline using MNE-Python.",
"pipelineInfo": {
"name": "Time-Frequency Analysis (Morlet)",
"description": "Calculates time-frequency representation using Morlet wavelets on epoched data and applies baseline correction.",
"pipelineType": "time-frequency",
"version": "1.0.0",
"executionDate": "2024-05-02T12:00:00Z"
},
"processingSteps": [
// ... steps detailed below ...
],
"summaryMetrics": {
"analysisType": "Time-Frequency",
"method": "Morlet Wavelet",
"frequencyRangeHz": [2.0, 40.0]
}
}
Overview¶
The pipeline performs the following steps:
- Loads epoched EEG data (presumably cleaned, e.g., output from an ICA pipeline).
- Calculates TFR power using Morlet wavelets for frequencies between 2-40 Hz for a specific condition ("ConditionA").
- Applies baseline correction (log ratio) to the calculated power.
- Saves the baseline-corrected TFR power to an HDF5 file.
Key Sections Explained¶
pipelineInfo
: Defines the pipeline name, description, type ("time-frequency"), etc.processingSteps
:- Step 1: Load Epoched Data
inputSources
: Loads an epoched FIF file (*_epo.fif
), potentially generated by a previous pipeline (pipelineSource: "ICA Decomposition"
).outputTargets
: Outputs the loaded data as anin-memory
MNE Epochs object.
- Step 2: Calculate TFR (Morlet)
dependsOn
:["1"]
.software
: MNE-Python, usingmne.time_frequency.tfr_morlet
.parameters
: Specifies the analysis parameters:event_id
: Selects epochs belonging to "ConditionA".freqs
: Defines the frequency range using start/stop/step.n_cycles_formula
: Shows how the number of wavelet cycles was determined (here, frequency-dependent).- Other parameters like
use_fft
,return_itc
,decim
.
inputSources
: Takes the loaded Epochs object from Step 1.outputTargets
: Outputs the computed TFR power as anin-memory
AverageTFR object.
- Step 3: Apply Baseline Correction
dependsOn
:["2"]
.software
: MNE-Python, using theapply_baseline
method of the TFR object.parameters
: Specifies thebaseline
period[-0.5, 0.0]
seconds and the correctionmode
("logratio"
).inputSources
: Takes the TFR power object from Step 2.outputTargets
: Saves the final baseline-corrected TFR power to afile
(format: "HDF5"
).qualityMetrics
: Records the baseline period and mode used.
- Step 1: Load Epoched Data
summaryMetrics
: Provides overall information about the analysis performed, such as the type, method, and frequency range.
This example illustrates documenting time-frequency specific parameters, including how parameters like frequency ranges or wavelet cycles were defined, and linking to prior processing stages.