- MNE version: 1.5.1
- operating system: e.g. macOS 13.4.1
I am using a Cortivision fNIRS device to record data and a Structure Sensor Pro to record 3D coordinates of optodes. I would like to know how I can most easily read in the digitised coordinates and replace the coordinates that are specified in the .snirf file.
So far I have been successful at reading in and plotting coordinates for the optodes. I read in a .csv which contains ch_name (optode name), x, z, y per optode, using the following snippet:
# read in coordinates + plot
coords = mne.channels.read_custom_montage(fname = '...',
head_size=1,
coord_frame='mri')
coords.plot();
# replace original coordinates with digited coordinates + plot
raw_intensity = raw_intensity.set_montage(coords)
raw_intensity.plot_sensors();
But then set_montage()
isnβt actually replacing the original position information from the .snirf file. From other posts here, I think this is because the coordinates for optodes have the names of single optodes (e.g., S1, S2) and not channel names (e.g., S1_D1 760, S1_D1 850), which the function expects.
Question: Would it be smarter to format a .csv of the channel coordinates (halfway-point between optodes), with each position duplicated for the two wavelengths (760 and 850) with the exact channel names, rather than optode positions? Or is there a way to use the optode positions to generate the channel information, perhaps in the way that mne-nirs does it when reading a .snirf? The latter would help visualise optodes and points of measurement over the brain.
Thanks very much in advance!