mne-tools / mne-bids-pipeline

Automatically process entire electrophysiological datasets using MNE-Python.
https://mne.tools/mne-bids-pipeline/
BSD 3-Clause "New" or "Revised" License
138 stars 66 forks source link

Report section on original raw data doesn't contain bads #930

Closed hoechenberger closed 5 months ago

hoechenberger commented 5 months ago

In my BIDS data, 3 channels are marked as bad. These show up correctly in the HTML repr for the filtered and cleaned raw, but not for the original raw. The content of the generated *_bads.tsv file is:

name    reason
P8  pre-existing (before MNE-BIDS-pipeline was run)
T7  pre-existing (before MNE-BIDS-pipeline was run)
TP10    pre-existing (before MNE-BIDS-pipeline was run)
Screenshot 2024-04-23 at 13 17 29 Screenshot 2024-04-23 at 13 17 34

I tried to understand what was going on but so far I don't really have a clue.

hoechenberger commented 5 months ago

I also just realized that experimenter and participant are also not correctly represented in the "original" repr.

hoechenberger commented 5 months ago

@SophieHerbst Do you see similar issues with your reports?

larsoner commented 5 months ago

Are you fully up to date with your MNE version? If you're a couple weeks behind you might be hitting a bug that was in MNE for a bit

larsoner commented 5 months ago

... Or if you generated those sections a couple of weeks ago could be same thing. Might be worth rerunning from scratch now to check

larsoner commented 5 months ago

https://github.com/mne-tools/mne-python/pull/12548

hoechenberger commented 5 months ago

everything's up to date and i had deleted the outputs entirely...

will check again to be sure

hoechenberger commented 5 months ago

https://github.com/mne-tools/mne-python/pull/12548

that's not the problem, it is as of part of my raw.info is simply missing

larsoner commented 5 months ago

Sounds like the bads just aren't being loaded from the sidecar then. I bet bads aren't displayed in the info repr if the list is empty. And they probably aren't defined in the raw on disk itself but rather in the sidecar file

hoechenberger commented 5 months ago

Sounds like the bads just aren't being loaded from the sidecar then.

Yep that's it. Looking into this now. Thanks for your help!