-
Notifications
You must be signed in to change notification settings - Fork 88
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
using units in channels.tsv in read_raw_bids ? #1044
Comments
is it just that the BIDS metadata are wrong and it's actually in V? |
even if I change the channels.tsv file to have V and not uV it does not
change anything
… Message ID: ***@***.***>
|
This bit seems like a bug in MNE-BIDS then... |
digging into the reader the .edf file does not contain units. So it defaults to 1 for scaling and so it's off by 1e6. Now I don't know what to do with the channels.tsv as if the units in the tsv copy the unit in the edf file then we could apply the scaling twice. Here is an attempt #1045 it drives me nuts to have file format where units can be omitted... |
If units can be omitted in EDF maybe we need to add a |
interesting idea. what would be the logic? if the units are not present in
the edf files we require to pass it on read_raw_edf?
if we pass it it overwrites the units in the file?
… Message ID: ***@***.***>
|
Yes to both of your questions (IMHO) ... default should be None. and if we overwrite, we also warn. |
I'd say yes; fail hard and force users to specify the unit.
If the param is present and the units are specified in the file, we should either fail, or at least print a big fat warning… Are there actually situations where users might want to override the units? I'm worried that if we allow this override, we're about to open a can of worms, as this will creep into the reader functions for other file formats too over time. I'd rather force users to fix their input files than us allowing this override... But then again, we actually quite often see users running into scaling issues and I don't think we currently have a "clean" way to address those, right? So maybe we should add this feature for all readers? 🤔 |
not all readers have this issue and the format is clear ;)
it's really an EDF problem.
to proceed step by step let's add a units parameter that is None by
default and for now
can be not None if units are actually missing from the file. And I would do
units : str or list of str
for now.
… Message ID: ***@***.***>
|
@agramfort can this be closed now? |
Closing as addressed upstream in mne-tools/mne-python#11099; actually reading the units from |
I just realized that the title of this issue is exactly what we want to solve in #1045, so I'm re-opening. |
playing with ds003775 I see that units say the data in the edf file are in uV but it's read by
read_raw_bids
as V.I saw the pb with: https://output.circle-artifacts.com/output/job/869cb730-d785-46aa-9c16-afc668bf6b70/artifacts/0/site/examples/ds003775/sub-010_ses-t1_task-resteyesc_report.html from mne-tools/mne-bids-pipeline#585
@sappelhoff @hoechenberger any idea? can I consider the edf files broken? as
mne.io.read_raw_edf
screws up also the units🙏
The text was updated successfully, but these errors were encountered: