cbrnr / mnelab

MNELAB – a GUI for MNE
BSD 3-Clause "New" or "Revised" License
238 stars 69 forks source link

Add NIRS support #144

Closed rob-luke closed 4 years ago

rob-luke commented 4 years ago

Hi @cbrnr,

I have enjoyed using your package to view my EEG data. I have recently added NIRS support to MNE. Would you be open to adding NIRS support to this package? If you are, then I could slowly open a few PRs.

cbrnr commented 4 years ago

Thanks @rob-luke, this would be awesome! What would be needed to support NIRS? Is it just reading NIRS files? Or are there functions that work exclusively on NIRS data?

rob-luke commented 4 years ago

I think just reading NIRS files.

Currently MNE only supports NIRX files. This data is stored as a directory with several files. I opened MNELAB master and tried to point it to a folder, but it would only let me select files. So I think that's the first change that would be required. Alternatively, I could read the data in via MNE, then save as fif. But I think I would like to use MNELAB to open raw data straight after recording if possible, to make it a lab tool.

There is also work being done to read imagent files and also SNIRF. But that is not in master yet.

cbrnr commented 4 years ago

Sounds good. Regarding NIRX files, is there any particular "master" file inside the directory that we could open instead of the whole directory (BrainVision data consists of three files, and users open the one ending with .vhdr)? If not, I don't think it won't be that difficult to enable opening folders.

rob-luke commented 4 years ago

There is not a master file as such, but each directory must contain specific files including a *.wl1, *.wl2, *.hdr file. Would it be easier to get the user to choose one of these files, and then if one of these is selected the program knows to take a step up and load the directory?

cbrnr commented 4 years ago

Yes, if an .hdr file must exist, it would be easier (and more consistent) to have users pick that file instead of the whole directory. Maybe this behavior could be added directory to the MNE read function? It could accept an .hdr file in addition to a directory.