Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
19 changes: 0 additions & 19 deletions mne/_fiff/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,22 +7,3 @@

# All imports should be done directly to submodules, so we don't import
# anything here or use lazy_loader.

# This warn import (made private as _warn) is just for the temporary
# _io_dep_getattr and can be removed in 1.6 along with _dep_msg and _io_dep_getattr.
from ..utils import warn as _warn


_dep_msg = (
"is deprecated will be removed in 1.6, use documented public API instead. "
"If no appropriate public API exists, please open an issue on GitHub."
)


def _io_dep_getattr(name, mod):
import importlib

fiff_mod = importlib.import_module(f"mne._fiff.{mod}")
obj = getattr(fiff_mod, name)
_warn(f"mne.io.{mod}.{name} {_dep_msg}", FutureWarning)
return obj
27 changes: 0 additions & 27 deletions mne/commands/tests/test_commands.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
mne_flash_bem,
mne_kit2fiff,
mne_make_scalp_surfaces,
mne_maxfilter,
mne_prepare_bem_model,
mne_report,
mne_setup_forward_model,
Expand Down Expand Up @@ -206,32 +205,6 @@ def test_make_scalp_surfaces(tmp_path, monkeypatch):
assert "SUBJECTS_DIR" not in os.environ


def test_maxfilter():
"""Test mne maxfilter."""
check_usage(mne_maxfilter)
with ArgvSetter(
(
"-i",
raw_fname,
"--st",
"--movecomp",
"--linefreq",
"60",
"--trans",
raw_fname,
)
) as out:
with pytest.warns(RuntimeWarning, match="Don't use"):
os.environ["_MNE_MAXFILTER_TEST"] = "true"
try:
mne_maxfilter.run()
finally:
del os.environ["_MNE_MAXFILTER_TEST"]
out = out.stdout.getvalue()
for check in ("maxfilter", "-trans", "-movecomp"):
assert check in out, check


@pytest.mark.slowtest
@testing.requires_testing_data
def test_report(tmp_path):
Expand Down
67 changes: 6 additions & 61 deletions mne/gui/_gui.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,31 +3,24 @@
# License: BSD-3-Clause
# Copyright the MNE-Python contributors.

from ..utils import get_config, verbose, warn
from ..utils import get_config, verbose


@verbose
def coregistration(
*,
tabbed=None,
split=None,
width=None,
height=None,
inst=None,
subject=None,
subjects_dir=None,
guess_mri_subject=None,
height=None,
head_opacity=None,
head_high_res=None,
trans=None,
scrollable=None,
orient_to_surface=None,
scale_by_distance=None,
mark_inside=None,
interaction=None,
scale=None,
advanced_rendering=None,
head_inside=None,
fullscreen=None,
show=True,
block=False,
Expand All @@ -45,29 +38,20 @@ def coregistration(

Parameters
----------
tabbed : bool
Combine the data source panel and the coregistration panel into a
single panel with tabs.
split : bool
Split the main panels with a movable splitter (good for QT4 but
unnecessary for wx backend).
width : int | None
Specify the width for window (in logical pixels).
Default is None, which uses ``MNE_COREG_WINDOW_WIDTH`` config value
(which defaults to 800).
height : int | None
Specify a height for window (in logical pixels).
Default is None, which uses ``MNE_COREG_WINDOW_WIDTH`` config value
(which defaults to 400).
inst : None | str
Path to an instance file containing the digitizer data. Compatible for
Raw, Epochs, and Evoked files.
subject : None | str
Name of the mri subject.
%(subjects_dir)s
guess_mri_subject : bool
When selecting a new head shape file, guess the subject's name based
on the filename and change the MRI subject accordingly (default True).
height : int | None
Specify a height for window (in logical pixels).
Default is None, which uses ``MNE_COREG_WINDOW_WIDTH`` config value
(which defaults to 400).
head_opacity : float | None
The opacity of the head surface in the range [0., 1.].
Default is None, which uses ``MNE_COREG_HEAD_OPACITY`` config value
Expand All @@ -78,8 +62,6 @@ def coregistration(
(which defaults to True).
trans : path-like | None
The transform file to use.
scrollable : bool
Make the coregistration panel vertically scrollable (default True).
orient_to_surface : bool | None
If True (default), orient EEG electrode and head shape points
to the head surface.
Expand All @@ -102,21 +84,6 @@ def coregistration(
.. versionchanged:: 1.0
Default interaction mode if ``None`` and no config setting found
changed from ``'trackball'`` to ``'terrain'``.
scale : float | None
The scaling for the scene.

.. versionadded:: 0.16
advanced_rendering : bool
Use advanced OpenGL rendering techniques (default True).
For some renderers (such as MESA software) this can cause rendering
bugs.

.. versionadded:: 0.18
head_inside : bool
If True (default), add opaque inner scalp head surface to help occlude
points behind the head.

.. versionadded:: 0.23
%(fullscreen)s
Default is None, which uses ``MNE_COREG_FULLSCREEN`` config value
(which defaults to False).
Expand All @@ -143,28 +110,6 @@ def coregistration(

.. youtube:: ALV5qqMHLlQ
"""
unsupported_params = {
"tabbed": tabbed,
"split": split,
"scrollable": scrollable,
"head_inside": head_inside,
"guess_mri_subject": guess_mri_subject,
"scale": scale,
"advanced_rendering": advanced_rendering,
}
for key, val in unsupported_params.items():
if isinstance(val, tuple):
to_raise = val[0] != val[1]
else:
to_raise = val is not None
if to_raise:
warn(
f"The parameter {key} is deprecated and will be removed in 1.7, do "
"not pass a value for it",
FutureWarning,
)
del tabbed, split, scrollable, head_inside, guess_mri_subject, scale
del advanced_rendering
config = get_config()
if head_high_res is None:
head_high_res = config.get("MNE_COREG_HEAD_HIGH_RES", "true") == "true"
Expand Down
9 changes: 0 additions & 9 deletions mne/io/constants.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,6 @@
# License: BSD-3-Clause
# Copyright the MNE-Python contributors.

from .._fiff import _io_dep_getattr
from .._fiff.constants import FIFF

__all__ = ["FIFF"]


def __getattr__(name):
try:
return globals()[name]
except KeyError:
pass
return _io_dep_getattr(name, "constants")
11 changes: 0 additions & 11 deletions mne/io/meas_info.py

This file was deleted.

9 changes: 0 additions & 9 deletions mne/io/pick.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
# Copyright the MNE-Python contributors.


from .._fiff import _io_dep_getattr
from .._fiff.pick import (
_DATA_CH_TYPES_ORDER_DEFAULT,
_DATA_CH_TYPES_SPLIT,
Expand All @@ -18,11 +17,3 @@
"_DATA_CH_TYPES_ORDER_DEFAULT",
"_DATA_CH_TYPES_SPLIT",
]


def __getattr__(name):
try:
return globals()[name]
except KeyError:
pass
return _io_dep_getattr(name, "pick")
11 changes: 0 additions & 11 deletions mne/io/proj.py

This file was deleted.

11 changes: 0 additions & 11 deletions mne/io/reference.py

This file was deleted.

11 changes: 0 additions & 11 deletions mne/io/tag.py

This file was deleted.

30 changes: 0 additions & 30 deletions mne/io/tests/test_deprecation.py

This file was deleted.

11 changes: 0 additions & 11 deletions mne/io/utils.py

This file was deleted.

11 changes: 0 additions & 11 deletions mne/io/write.py

This file was deleted.

2 changes: 0 additions & 2 deletions mne/preprocessing/__init__.pyi
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ __all__ = [
"annotate_movement",
"annotate_muscle_zscore",
"annotate_nan",
"apply_maxfilter",
"compute_average_dev_head_t",
"compute_bridged_electrodes",
"compute_current_source_density",
Expand Down Expand Up @@ -77,7 +76,6 @@ from .ica import (
)
from .infomax_ import infomax
from .interpolate import equalize_bads, interpolate_bridged_electrodes
from .maxfilter import apply_maxfilter
from .maxwell import (
compute_maxwell_basis,
find_bad_channels_maxwell,
Expand Down
Loading