New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FIX: mne.io.read_raw_fil
handling of bad channels
#12597
Conversation
I think I've attempted to be simultaneously too clever and not enough here. Pandas isn't a part of the minimal requirements so I should seek an alternative method to manipulate the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks great!
mne/io/fil/tests/test_fil.py
Outdated
def _set_bads_tsv(chanfile, badchan): | ||
"""Update channels.tsv by setting target channel to bad.""" | ||
data = [] | ||
with open(chanfile) as f: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can you please explicitly pass an encoding here and below?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I did in the orignal code, but ruff seems to be auto formatting them out...?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
see my comment please
Now there's definitely a paper trail, I put rt/wt back into the code using the text editor on GitHub, and the CI style editor on here just took them back out. Thoughts @hoechenberger? |
The formatter removes those parameters because they're the defaults but I was talking about otherwise the encoding used will be platform-dependent |
Reference issue
Fixes #12594.
What does this implement/fix?
Changes the ordering that the
info
struct is populated inread_raw_fil
so that bad channels can be read straight from thechannels.tsv
file without raising an error.