Skip to content

Re-referencing for raw (continuous) data only seems to be applied in certain cases #1169

@jschepers

Description

@jschepers

Hi,

I'm using the mne-bids-pipeline for the preprocessing of my current data set and noticed that the eeg_reference specified in the config file only seems to be applied for the epoched data in _07_make_epochs.py but not for the raw/continuous data:

# Set an EEG reference
if "eeg" in cfg.ch_types:
projection = True if cfg.eeg_reference == "average" else False
epochs.set_eeg_reference(cfg.eeg_reference, projection=projection)

If I see it correctly, the raw/continuous data is only re-referenced (to average) in the case of using ica_use_icalabel:

if cfg.ica_use_icalabel:
raw.set_eeg_reference("average", projection=True).apply_proj()

But please correct me if I'm wrong.

For my preprocessing, I plan to add code to re-reference the raw/continuous data (to the reference specified in the config file) in our fork in _08a_apply_ica.py after applying the ica and before saving the raw data. If this is alo of interest for you I am happy to do a small PR upstream.

Best,
Judith

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions