Skip to content

Commit

Permalink
WIP: Copy BEM surfaces by default (don't symlink) (#10531)
Browse files Browse the repository at this point in the history
  • Loading branch information
hoechenberger authored and larsoner committed Apr 15, 2022
1 parent 8cad81e commit f71bc72
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
2 changes: 2 additions & 0 deletions doc/changes/1.0.inc
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ Version 1.0.2 (unreleased)
--------------------------
- Fix bug where ``theme`` was not handled properly in :meth:`mne.io.Raw.plot` (:gh:`10500` by `Eric Larson`_)

- When creating BEM surfaces via :func:`mne.bem.make_watershed_bem` and :func:`mne.bem.make_flash_bem`, the ``copy`` parameter now defaults to ``True``. This means that instead of creating symbolic links inside the FreeSurfer subject's ``bem`` folder, we now create "actual" files. This should avoid troubles when sharing files across different operating systems and file systems (:gh:`10531` by `Richard Höchenberger`_)

.. _changes_1_0_1:

Version 1.0.1 (2022-04-08)
Expand Down
10 changes: 6 additions & 4 deletions mne/bem.py
Original file line number Diff line number Diff line change
Expand Up @@ -1018,7 +1018,7 @@ def _check_origin(origin, info, coord_frame='head', disp=False):
@verbose
def make_watershed_bem(subject, subjects_dir=None, overwrite=False,
volume='T1', atlas=False, gcaatlas=False, preflood=None,
show=False, copy=False, T1=None, brainmask='ws.mgz',
show=False, copy=True, T1=None, brainmask='ws.mgz',
verbose=None):
"""Create BEM surfaces using the FreeSurfer watershed algorithm.
Expand All @@ -1042,10 +1042,11 @@ def make_watershed_bem(subject, subjects_dir=None, overwrite=False,
.. versionadded:: 0.12
copy : bool
If True (default False), use copies instead of symlinks for surfaces
If True (default), use copies instead of symlinks for surfaces
(if they do not already exist).
.. versionadded:: 0.18
.. versionchanged:: 1.1 Use copies instead of symlinks.
T1 : bool | None
If True, pass the ``-T1`` flag.
By default (None), this takes the same value as ``gcaatlas``.
Expand Down Expand Up @@ -1837,7 +1838,7 @@ def convert_flash_mris(subject, flash30=True, convert=True, unwarp=False,

@verbose
def make_flash_bem(subject, overwrite=False, show=True, subjects_dir=None,
flash_path=None, copy=False, verbose=None):
flash_path=None, copy=True, verbose=None):
"""Create 3-Layer BEM model from prepared flash MRI images.
Parameters
Expand All @@ -1855,10 +1856,11 @@ def make_flash_bem(subject, overwrite=False, show=True, subjects_dir=None,
.. versionadded:: 0.13.0
copy : bool
If True (default False), use copies instead of symlinks for surfaces
If True (default), use copies instead of symlinks for surfaces
(if they do not already exist).
.. versionadded:: 0.18
.. versionchanged:: 1.1 Use copies instead of symlinks.
%(verbose)s
See Also
Expand Down

0 comments on commit f71bc72

Please sign in to comment.