Ok great! Now replace sample
with your subject’s name, and the path after -d
should point to the directory with your FreeSurfer subjects’ data.
Greetings all,
I was able to figure out the error. There was a typo in the mkheadsurf function. The error was in the line under “check_params:”
The line originally was: set OutputSurf = $subjid/surf/$hemi.$headsurf
However, the subjdir is not defined until return from check_params. So I edited.
The line how I edited: set OutputSurf = $SUBJECTS_DIR/$subjid/surf/$hemi.$headsurf
I then ran the mne make_scalp_surfaces function, and it worked perfect!
I am including here a screenshot of the mkheadsurf function so the edited line can be seen:
Of note: these lines are not present in this script for earlier versions of FreeSurfer. I am using FreeSurfer 7.2.0
Hope this helps!
Can you make a PR to GitHub - freesurfer/freesurfer: Neuroimaging analysis and visualization suite to fix this bug? It seems like the right thing to do here!
Hi @ktyner, i am currently facing the same problem that you have mentioned in this post. How did you solve it? Did you make changes to the source itself of MNE function or did you change your code?
Hi Rekha,
I did indeed solve the problem. The issue was with the mkheadsurf function. I had to change a mistake in the check_params: section of the code. The line reading set OutputSurf needed to say:
set OutputSurf = $SUBJECTS_DIR/$subjid/surf/$hemi.$headsurf
Once I made that change, the function worked perfectly for me! I will note that I am using FreeSurfer 7.2.0, and that error was not present in earlier versions of FreeSurfer.
Hopefully that helps you!