mne-tools / mne-python

MNE: Magnetoencephalography (MEG) and Electroencephalography (EEG) in Python
https://mne.tools
BSD 3-Clause "New" or "Revised" License
2.67k stars 1.31k forks source link

RuntimeError: The time unit None is not supported by MNE. Please report this error as a GitHub issue to inform the developers. #12277

Open szahar opened 9 months ago

szahar commented 9 months ago

Description of the problem

Hello, I am writing to request help for loading snirf derivates (ie preprocessed in HOMER3) into mne which seems to not work with the mne.io.read_raw_snirf function since I am getting the error: "RuntimeError: The time unit None is not supported by MNE. Please report this error as a GitHub issue to inform the developers.". Thanks in advance for your help. Best regards, Sélima

Steps to reproduce

1) exported derivate snirf from HOMER3

2) imported derivate snirf into mne: 

raw = mne.io.read_raw_snirf('C:/OneDrive/Twilight 1/Results/Oxysoft/Epochs/S'+participants[i]+'.snirf',
                               optode_frame='C:/OneDrive/fNIRS devices/Important OxySoft Files/optodetemplates.xml',preload=True)

Link to data

No response

Expected results

ProcStreamFunctionsSummary.txt S01_processing.json

Actual results

image

Additional information

NA

welcome[bot] commented 9 months ago

Hello! 👋 Thanks for opening your first issue here! ❤️ We will try to get back to you soon. 🚴

larsoner commented 9 months ago

Can you share the data? If not, can you look (e.g., using post-mortem debugging with import pdb; pdb.pm() or similar) at dat to see if there is something that should be used other than TimeUnit to get the sample rate of the data?

larsoner commented 9 months ago

@rob-luke any time to look?

szahar commented 9 months ago

Hello,

I could solve the issue mentioned above which appeared to be related to the fact that I was concatenating my recording with another recording, creating bad boundaries and a time unit not recognized my MNE.

However, I am still unable to import my snirf file obtained from HOMER3 into MNE. I am facing the following error when trying to read the file in MNE: image

I would greatly appreciate any input to understand this error.

PS: I suppressed the file attached above, but I can share it privately if it can help understanding the issue.

Best, Sélima