added a file (coreg_fiducials_JK.py) to demonstrate two methods to align fiducials.
Method 1
-get fiducials from 'fsaverage'
-uses 'coregister_fiducials()' function to create transformation matrix from the 'fsaverage' fiducials and the fiducials added to info struct
-this transformation matrix is passed as the 'trans' argument to 'mne.viz.plot_alignment()'
Method 2
-similar to how info.dig is calculated in nirx.py
-gets mri-to-head space transformation matrix for fsaverage using '_get_trans()'
-applies this transformation matrix to all channel and fiducial coords using 'apply_trans()'
-'trans='fsaverage'' is passed to 'mne.viz.plot_alignment()'
should note that info only contains coordinates for info.dig channels
when creating the info struct, channels must be specified as 'eeg' type or else they won't plot
not sure why this is, especially since 'nirx.py' specifies the channels as 'fnirs_raw' and they plot just fine. May be because only info.dig coordinates are included in my example file.
added a file (coreg_fiducials_JK.py) to demonstrate two methods to align fiducials.
Method 1 -get fiducials from 'fsaverage' -uses 'coregister_fiducials()' function to create transformation matrix from the 'fsaverage' fiducials and the fiducials added to info struct -this transformation matrix is passed as the 'trans' argument to 'mne.viz.plot_alignment()'
Method 2 -similar to how info.dig is calculated in nirx.py -gets mri-to-head space transformation matrix for fsaverage using '_get_trans()' -applies this transformation matrix to all channel and fiducial coords using 'apply_trans()' -'trans='fsaverage'' is passed to 'mne.viz.plot_alignment()'
should note that info only contains coordinates for info.dig channels when creating the info struct, channels must be specified as 'eeg' type or else they won't plot not sure why this is, especially since 'nirx.py' specifies the channels as 'fnirs_raw' and they plot just fine. May be because only info.dig coordinates are included in my example file.