Issues with make_scalp_surfaces

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!

1 Like

Thank you for sharing your solution, @ktyner!

cc @larsoner @agramfort

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!

1 Like