You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm wondering if it might be possible to issue a warning when data are loaded if they seem to have incorrect or unknown units? I'm asking because I've just run into a problem caused by loading data which were in uV, but MNE defaulted to assuming volts due a lack of info in the edf file.
Specifically, when loading and then re-exporting some edf files (as part of a BIDS re-structuring) I got the following error:
This is due to the incorrect scaling causing edfio to throw an error when trying to write the file (when the min and max of the data were calculated the resulting values were longer than the 8 character limit).
Describe your proposed implementation
I guess there are a couple of options:
In relation to my specific case, just before handing things off to edfio the min and max of the data could be calculated and an error could be thrown if these exceed 8 characters, with an explicit recommendation to double check the scaling. Obviously edfio goes on to throw an error but its not particularly informative so it took me a while to figure out the underlying cause.
A more general option would be to try to infer when loading an edf file if the data seem to be off by a relevant factor (i.e. 1e6) and throw a warning?
Perhaps the simplest option would be just to give a warning if the edf file does not contain unit information and MNE has had to default to volts, then people can just go double-check whether this was appropriate. Or more strictly, you could make it impossible to load an edf without supplying unit information if none is present in the edf file.
Describe the new feature or enhancement
I'm wondering if it might be possible to issue a warning when data are loaded if they seem to have incorrect or unknown units? I'm asking because I've just run into a problem caused by loading data which were in uV, but MNE defaulted to assuming volts due a lack of info in the edf file.
Specifically, when loading and then re-exporting some edf files (as part of a BIDS re-structuring) I got the following error:
This is due to the incorrect scaling causing edfio to throw an error when trying to write the file (when the min and max of the data were calculated the resulting values were longer than the 8 character limit).
Describe your proposed implementation
I guess there are a couple of options:
In relation to my specific case, just before handing things off to edfio the min and max of the data could be calculated and an error could be thrown if these exceed 8 characters, with an explicit recommendation to double check the scaling. Obviously edfio goes on to throw an error but its not particularly informative so it took me a while to figure out the underlying cause.
A more general option would be to try to infer when loading an edf file if the data seem to be off by a relevant factor (i.e. 1e6) and throw a warning?
Perhaps the simplest option would be just to give a warning if the edf file does not contain unit information and MNE has had to default to volts, then people can just go double-check whether this was appropriate. Or more strictly, you could make it impossible to load an edf without supplying unit information if none is present in the edf file.
Describe possible alternatives
N/A
Additional context
Full traceback in my specific case:
The text was updated successfully, but these errors were encountered: