Fixes make_scalp_surfaces
Reference issue (if any)
Fixes #13014.
What does this implement/fix?
Updates make_scalp_surfaces to force regenerating seghead.mgz ,lh.seghead and {subject}-head-{{}}.fif if overwrite is set to True. Will raise an OSError if either seghead.mgz ,lh.seghead and {subject}-head-{{}}.fif exists and overwrite is set to False
Additional information
There are some edgy cases when mixing overwrite and no_decimate which can lead to {subject}-head-medium.fif / {subject}-head-sparse.fif to be untouched while seghead.mgz ,lh.seghead and {subject}-head-dense.fif are regenerated.
I tried to handle theses cases by always deleting {subject}-head-medium.fif / {subject}-head-sparse.fif if overwrite=True (even if no_decimate=True) and by raising and specific error if overwrite=False , no_decimate=True but {subject}-head-medium.fif / {subject}-head-sparse.fif exist.
@vferat looks like one maintainer approved this but it's still in draft mode, what's the status here?
Sorry for the delay. There have been a lot of changes on my side since the PR was opened. I’ll have a look on Friday to check that everything works as expected.