The intermediate/ Folder

The intermediate/ folder is where AutoCleanEEG saves step-by-step snapshots of your preprocessing pipeline. These folders are dynamically generated — only the steps you enable and configure for export will appear here. For example, if you skip ICA or don’t export filtering outputs, the corresponding step folder (08_ica/ or 03_filter/) won’t exist in your run.

Example Layout

intermediate/
├── 01_import
├── 02_resample
├── 03_filter
├── 04_trim
├── 05_bad_channels
├── 06_rereference
├── 07_artifact_detection
├── 08_ica
├── 09_pre_ica
├── 10_epochs
├── 11_drop_bad_epochs
├── 12_epochs
├── 13_gfp_clean
└── 14_comp

How It Works

  • Step numbering reflects the pipeline order.
  • Exported steps only: If you request export after filtering but not after trimming, you’ll see 03_filter/ but not 04_trim/.
  • Flexible granularity: This lets you save just the checkpoints you care about (for inspection or debugging), while avoiding unnecessary disk usage.

Step Highlights

FolderPurpose
01_importOriginal raw data converted into BIDS-compatible format.
02_resampleData resampled (e.g., 1000 Hz → 250 Hz).
03_filterFiltered signals (HP, LP, notch).
05_bad_channelsSnapshot of data after noisy channels are dropped.
08_icaData after ICA decomposition and component removal.
10_epochsSegmented data into epochs.
13_gfp_cleanEpochs cleaned with Global Field Power metrics.
14_compFinal compiled output before writing to derivatives/ and final_files/.

ICA Export Format

The ICA stage is exported in both EEGLAB (.set) and MNE (.fif) formats.
This is a special case:
  • In EEGLAB, ICA weights are stored directly inside the .set dataset.
  • In MNE-Python, ICA weights are stored separately from the EEG data (the .fif ICA file).
This separation allows you to:
  • Reapply ICA weights later to the same dataset.
  • Redo component artifact removal and continue the pipeline from that point (feature coming soon).

Why It Matters

  • Customizable exports: You decide which steps produce saved files.
  • Debug-friendly: Inspect any stage of the pipeline without re-running the entire process.
  • Storage-aware: Avoid large intermediate folders by disabling exports for steps you don’t need.
Intermediate folders are optional checkpoints. You can enable or disable exports per step in your task configuration. Once validated, these folders can be safely deleted to reclaim space.