mne-python icon indicating copy to clipboard operation
mne-python copied to clipboard

Fixes make_scalp_surfaces

Open vferat opened this issue 1 year ago • 2 comments

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 avatar Dec 12 '24 19:12 vferat

@vferat looks like one maintainer approved this but it's still in draft mode, what's the status here?

larsoner avatar Nov 13 '25 17:11 larsoner

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.

vferat avatar Dec 03 '25 16:12 vferat