Skip to content

Commit

Permalink
MRG, MAINT: 0.22 deprecations (mne-tools#8301)
Browse files Browse the repository at this point in the history
* MAINT: 0.22 deprecations

* FIX: Missed

* FIX: Refs
  • Loading branch information
larsoner authored Sep 25, 2020
1 parent 7c1233b commit ecf6392
Show file tree
Hide file tree
Showing 39 changed files with 81 additions and 921 deletions.
4 changes: 2 additions & 2 deletions doc/changes/0.15.inc
Original file line number Diff line number Diff line change
Expand Up @@ -244,11 +244,11 @@ API

- Deprecate ``plot_trans`` in favor of :func:`mne.viz.plot_alignment` and add ``bem`` parameter for plotting conductor model by `Jaakko Leppakangas`_

- :func:`mne.beamformer.tf_lcmv` now has a ``raw`` parameter to accommodate epochs objects that already have data loaded with ``preload=True``, with :meth:`mne.Epochs.load_data`, or that are read from disk, by `Eric Larson`_
- ``mne.beamformer.tf_lcmv`` now has a ``raw`` parameter to accommodate epochs objects that already have data loaded with ``preload=True``, with :meth:`mne.Epochs.load_data`, or that are read from disk, by `Eric Larson`_

- :func:`mne.time_frequency.psd_welch` and :func:`mne.time_frequency.psd_array_welch` now use a Hamming window (instead of a Hann window) by `Clemens Brunner`_

- ``picks`` parameter in ``mne.beamformer.lcmv``, ``mne.beamformer.lcmv_epochs``, ``mne.beamformer.lcmv_raw``, :func:`mne.beamformer.tf_lcmv` and :func:`mne.beamformer.rap_music` is now deprecated and will be removed in 0.16, by `Britta Westner`_, `Alex Gramfort`_, and `Denis Engemann`_.
- ``picks`` parameter in ``mne.beamformer.lcmv``, ``mne.beamformer.lcmv_epochs``, ``mne.beamformer.lcmv_raw``, ``mne.beamformer.tf_lcmv`` and :func:`mne.beamformer.rap_music` is now deprecated and will be removed in 0.16, by `Britta Westner`_, `Alex Gramfort`_, and `Denis Engemann`_.

- The keyword argument ``frequencies`` has been deprecated in favor of ``freqs`` in various time-frequency functions, e.g. :func:`mne.time_frequency.tfr_array_morlet`, by `Eric Larson`_

Expand Down
2 changes: 1 addition & 1 deletion doc/changes/0.19.inc
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ Bug

- Fix bug in :meth:`mne.SourceMorph.apply` where the default was errantly ``mri_space=False`` instead of ``mri_space=None`` (as documented), by `Eric Larson`_

- Fix :meth:`mne.VolVectorSourceEstimate.normal` and :func:`mne.minimum_norm.apply_inverse` to only allow normal extraction/orientation for surface and discrete source spaces by `Eric Larson`_
- Fix ``mne.VolVectorSourceEstimate.normal`` and :func:`mne.minimum_norm.apply_inverse` to only allow normal extraction/orientation for surface and discrete source spaces by `Eric Larson`_

- Fix :meth:`mne.io.Raw.set_annotations` for ``meas_date`` previous to 1970 by `Joan Massich`_

Expand Down
4 changes: 2 additions & 2 deletions doc/changes/0.20.inc
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ Bug

- Allow :func:`mne.channels.read_dig_hpts` to accept point categories (eg. EEG) to be specified in upper case by `Alex Gramfort`_.

- Fix a bug in :meth:`mne.MixedSourceEstimate.plot_surface` that prevented plotting in latest PySurfer by `Christian O'Reilly`_.
- Fix a bug in ``mne.MixedSourceEstimate.plot_surface`` that prevented plotting in latest PySurfer by `Christian O'Reilly`_.

- Fix ``method='eLORETA'`` in :func:`mne.minimum_norm.apply_inverse`, by `Eric Larson`_:

Expand All @@ -171,7 +171,7 @@ Bug

- Fix bug in :func:`mne.compute_covariance` and :func:`mne.compute_raw_covariance` where biased normalization (based on degrees of freedom) was used and ``cov.nfree`` was not set properly by `Eric Larson`_

- Fix :func:`mne.VectorSourceEstimate.normal` to account for cortical patch statistics using ``use_cps=True`` by `Eric Larson`_
- Fix ``mne.VectorSourceEstimate.normal`` to account for cortical patch statistics using ``use_cps=True`` by `Eric Larson`_

- Fix ``pick_ori='normal'`` for :func:`mne.minimum_norm.apply_inverse` when the inverse was computed with ``loose=1.`` and the forward solution was not in surface orientation, by `Eric Larson`_

Expand Down
1 change: 0 additions & 1 deletion doc/python_reference.rst
Original file line number Diff line number Diff line change
Expand Up @@ -742,7 +742,6 @@ Inverse Solutions
apply_dics_epochs
rap_music
tf_dics
tf_lcmv
make_lcmv_resolution_matrix

.. currentmodule:: mne
Expand Down
17 changes: 0 additions & 17 deletions mne/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -122,23 +122,6 @@
from . import viz
from . import decoding

from .utils import deprecated_alias
deprecated_alias(
'spatial_src_connectivity', spatial_src_adjacency)
deprecated_alias(
'spatial_tris_connectivity', spatial_tris_adjacency)
deprecated_alias(
'spatial_dist_connectivity', spatial_dist_adjacency)
deprecated_alias(
'spatial_inter_hemi_connectivity', spatial_inter_hemi_adjacency)
deprecated_alias(
'spatio_temporal_src_connectivity', spatio_temporal_src_adjacency)
deprecated_alias(
'spatio_temporal_tris_connectivity', spatio_temporal_tris_adjacency)
deprecated_alias(
'spatio_temporal_dist_connectivity', spatio_temporal_dist_adjacency)
del deprecated_alias

# initialize logging
set_log_level(None, False)
set_log_file()
2 changes: 1 addition & 1 deletion mne/beamformer/__init__.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"""Beamformers for source localization."""

from ._lcmv import (make_lcmv, apply_lcmv, apply_lcmv_epochs, apply_lcmv_raw,
tf_lcmv, apply_lcmv_cov)
apply_lcmv_cov)
from ._dics import (make_dics, apply_dics, apply_dics_epochs, apply_dics_csd,
tf_dics)
from ._rap_music import rap_music
Expand Down
15 changes: 3 additions & 12 deletions mne/beamformer/_dics.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
def make_dics(info, forward, csd, reg=0.05, noise_csd=None, label=None,
pick_ori=None, rank=None, weight_norm=None,
reduce_rank=False, depth=1., real_filter=False,
inversion='matrix', normalize_fwd=None, verbose=None):
inversion='matrix', verbose=None):
"""Compute a Dynamic Imaging of Coherent Sources (DICS) spatial filter.
This is a beamformer filter that can be used to estimate the source power
Expand Down Expand Up @@ -76,8 +76,6 @@ def make_dics(info, forward, csd, reg=0.05, noise_csd=None, label=None,
.. versionchanged:: 0.21
Default changed to ``'matrix'``.
normalize_fwd : bool
Deprecated, use ``depth`` instead.
%(verbose)s
Returns
Expand Down Expand Up @@ -158,10 +156,6 @@ def make_dics(info, forward, csd, reg=0.05, noise_csd=None, label=None,
----------
.. footbibliography::
""" # noqa: E501
if normalize_fwd is not None:
warn('normalize_fwd is deprecated and will be removed in 0.22, use '
'depth instead', DeprecationWarning)
depth = 1. if normalize_fwd else 0.
rank = _check_rank(rank)
_check_option('pick_ori', pick_ori, [None, 'normal', 'max-power'])
_check_option('inversion', inversion, ['single', 'matrix'])
Expand Down Expand Up @@ -484,7 +478,7 @@ def tf_dics(epochs, forward, noise_csds, tmin, tmax, tstep, win_lengths,
mt_adaptive=False, mt_low_bias=True, cwt_n_cycles=7, decim=1,
reg=0.05, label=None, pick_ori=None, rank=None, inversion='single',
weight_norm=None, depth=1., real_filter=False,
reduce_rank=False, normalize_fwd=None, verbose=None):
reduce_rank=False, verbose=None):
"""5D time-frequency beamforming based on DICS.
Calculate source power in time-frequency windows using a spatial filter
Expand Down Expand Up @@ -605,8 +599,6 @@ def tf_dics(epochs, forward, noise_csds, tmin, tmax, tstep, win_lengths,
If ``True``, take only the real part of the cross-spectral-density
matrices to compute real filters. Defaults to ``False``.
%(reduce_rank)s
normalize_fwd : bool
Deprecated, use ``depth`` instead.
%(verbose)s
Returns
Expand All @@ -622,7 +614,7 @@ def tf_dics(epochs, forward, noise_csds, tmin, tmax, tstep, win_lengths,
DICS.
An alternative to using noise CSDs is to normalize the forward solution
(``normalize_fwd``) or the beamformer weights (``weight_norm``). In
(``depth``) or the beamformer weights (``weight_norm``). In
this case, ``noise_csds`` may be set to ``None``.
References
Expand Down Expand Up @@ -752,7 +744,6 @@ def tf_dics(epochs, forward, noise_csds, tmin, tmax, tstep, win_lengths,
label=label, pick_ori=pick_ori,
rank=rank, inversion=inversion,
weight_norm=weight_norm, depth=depth,
normalize_fwd=normalize_fwd,
reduce_rank=reduce_rank,
real_filter=real_filter, verbose=False)
stc, _ = apply_dics_csd(csd, filters, verbose=False)
Expand Down
Loading

0 comments on commit ecf6392

Please sign in to comment.