I am new to fnirs and MNE. I want to draw the montage (electrodes layout) in 2D and also in 3D on a head model. I am not sure how to start. Some of the electrodes in the montage correspond to the 10-20 eeg electrodes locations, but some don’t. So I have the distance between electrodes, and thier distance from known 10-20 electrodes, but I am not sure how to proceed and what is the format that this info should be stored in. I have a MKII fnirs system (Artinis).
Thanks in advance!
Hello @Michalw and welcome to the forum!
I’m tagging @rob-luke, MNE’s fNIRS expert, who I’m sure will be able to give you some advice!
Thanks for trying out fNIRS with MNE and taking the time to report your question. I don’t have access to an Artinis system, but we can figure this out together, it may just take a few more questions to find the optimal approach.
What we need to do is create a Montage in MNE. This can be done either by reading a file that contains the optode positions in 3D, or by providing the positions manually. Let’s address each approach in turn.
Have you looked at this tutorial Importing data from fNIRS devices — MNE 0.24.dev0 documentation ?
The Artinis Octomon and Brite23 have set optode positions. So we created a file to store these positions, then we can simply read it and use the
set_montage code. In MNE you must code your optodes and sources and detectors according to a specific convention (see Importing data from fNIRS devices — MNE 0.24.dev0 documentation). Then you need to create a file describing the 3D locations of your specific setup, here is an example from the bride 23 mne-python/artinis-brite23.elc at 0b503d8b64bd1383eee0450c3998700ad354a1ef · mne-tools/mne-python · GitHub
So in the end your code would look something like…
# Following from the tutorial linked above info = mne.create_info(ch_names=ch_names, ch_types=ch_types, sfreq=sfreq) raw = mne.io.RawArray(data, info, verbose=True) montage = mne.channels.read_custom_montage('/path/to/custom/montage.elp') raw.set_montage(montage) raw.plot_sensors()
Make sure to read the documentation for each function, and you will probably need to specify the coord_frame too.
You could also create the montage just in your script using mne.channels.make_dig_montage — MNE 0.23.4 documentation
Then the same procedure as above would follow.
# Following from the tutorial linked above info = mne.create_info(ch_names=ch_names, ch_types=ch_types, sfreq=sfreq) raw = mne.io.RawArray(data, info, verbose=True) montage = mne.channels.make_dig_montage(...) raw.set_montage(montage) raw.plot_sensors()
Does Artinis provide a file specifying the positions of the optodes? If so, can you share an example of this so we can see if it matches an existing location reader?
Thanks for your time and help. In Brite24, the optodes placement on the head are flexible. There are predefined templates, the researcher can choose where on the head to place the template. The template is not physical, it’s just a description of the order and number of transmitters and receivers and the definition of channels, without the definition of distances between them. I can even choose to make holes for the optodes on the elastic cap so all I can provide is a 2D drawing of the template (assuming a channel length of 30mm) and information regarding optodes that have the same location as electrodes in the 10-20 system (anchor). So I am still not sure how to start…
First, I suggest that you ask Artinis to provide some way to export the sensor locations. The location of the optodes makes a difference with fNIRS measurements. There is more than just the distance between optodes. The properties of the skin and skull etc vary across the head.
But in the meantime, can you estimate the 10-20 positions of where your sensors were placed? Or failing that, can you make up some 3d locations that roughly match the properties of your montage? You just need some rough location estimates to tell the software.