Repository: mne-tools/mne-python

Issue:
Default arguments of `raw.plot_psd()` changed
### Description of the problem

It seems like the default arguments of `raw.plot_psd()` changed in MNE 1.2 (see example below).

### Steps to reproduce

```Python
import mne
from mne.datasets import sample

fname = sample.data_path() / "MEG" / "sample" / "sample_audvis_raw.fif"
raw = mne.io.read_raw(fname).pick_types(eeg=True).load_data()
raw.plot_psd(fmax=60)
```


### Link to data

_No response_

### Expected results

Result from MNE < 1.2:

![raw-plot_psd-1 1](https://user-images.githubusercontent.com/4377312/204534595-54a35167-ba05-4365-8fcb-b5b582d689d6.png)

### Actual results

Result from MNE >= 1.2 (including `main`):

![raw-plot_psd-main](https://user-images.githubusercontent.com/4377312/204534677-6130f0bf-fb33-4e64-afcc-c8fd0eefabee.png)

### Additional information

Platform:         macOS-11.7.1-x86_64-i386-64bit
Python:           3.10.8 (main, Oct 13 2022, 10:18:28) [Clang 13.0.0 (clang-1300.0.29.30)]
Executable:       /Users/clemens/Projects/mne-python/.direnv/python-3.10.8/bin/python
CPU:              i386: 8 cores
Memory:           Unavailable (requires "psutil" package)
mne:              1.3.dev0
numpy:            1.23.5 {unknown linalg bindings (threadpoolctl module not found: No module named 'threadpoolctl')}
scipy:            1.9.3
matplotlib:       3.6.2 {backend=MacOSX}


Discussion:
on `main` I see `Effective window size : 0.426 (s)` and on 1.1 I see `Effective window size : 3.410 (s)`.  Should be fairly easy to track down, I'll work on it.

Resolving patch:
diff --git a/mne/time_frequency/spectrum.py b/mne/time_frequency/spectrum.py
--- a/mne/time_frequency/spectrum.py
+++ b/mne/time_frequency/spectrum.py
@@ -94,6 +94,7 @@ def plot_psd(self, fmin=0, fmax=np.inf, tmin=None, tmax=None, picks=None,
         """
         from ..io import BaseRaw
 
+        method = _validate_method(method, type(self).__name__)
         self._set_legacy_nfft_default(tmin, tmax, method, method_kw)
         # triage reject_by_annotation
         rba = dict()
@@ -149,6 +150,7 @@ def plot_psd_topo(self, tmin=None, tmax=None, fmin=0, fmax=100, proj=False,
         fig : instance of matplotlib.figure.Figure
             Figure distributing one image per channel across sensor topography.
         """
+        method = _validate_method(method, type(self).__name__)
         self._set_legacy_nfft_default(tmin, tmax, method, method_kw)
 
         spectrum = self.compute_psd(
@@ -253,10 +255,7 @@ def __init__(self, inst, method, fmin, fmax, tmin, tmax, picks,
                 f'frequency of the data ({0.5 * inst.info["sfreq"]} Hz).')
         # method
         self._inst_type = type(inst)
-        if method == 'auto':
-            method = ('welch' if self._get_instance_type_string() == 'Raw'
-                      else 'multitaper')
-        _check_option('method', method, ('welch', 'multitaper'))
+        method = _validate_method(method, self._get_instance_type_string())
 
         # triage method and kwargs. partial() doesn't check validity of kwargs,
         # so we do it manually to save compute time if any are invalid.
@@ -1188,3 +1187,11 @@ def _compute_n_welch_segments(n_times, method_kw):
     # compute expected number of segments
     step = n_per_seg - n_overlap
     return (n_times - n_overlap) // step
+
+
+def _validate_method(method, instance_type):
+    """Convert 'auto' to a real method name, and validate."""
+    if method == 'auto':
+        method = 'welch' if instance_type.startswith('Raw') else 'multitaper'
+    _check_option('method', method, ('welch', 'multitaper'))
+    return method


Test patch: