Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updating documentation to clarify full vs half-bandwidth and defaults in time_frequency.multitaper.py #11479

Merged
merged 9 commits into from
Feb 21, 2023
8 changes: 4 additions & 4 deletions mne/time_frequency/multitaper.py
Original file line number Diff line number Diff line change
Expand Up @@ -294,7 +294,7 @@ def _compute_mt_params(n_times, sfreq, bandwidth, low_bias, adaptive,
half_nbw = 4.
if half_nbw < 0.5:
raise ValueError(
'bandwidth value %s yields a normalized bandwidth of %s < 0.5, '
'bandwidth value %s yields a normalized half-bandwidth of %s < 0.5, '
'use a value of at least %s'
larsoner marked this conversation as resolved.
Show resolved Hide resolved
% (bandwidth, half_nbw, sfreq / n_times))

Expand Down Expand Up @@ -331,9 +331,9 @@ def psd_array_multitaper(x, sfreq, fmin=0.0, fmax=np.inf, bandwidth=None,
The sampling frequency.
%(fmin_fmax_psd)s
bandwidth : float
Half-bandwidth of the multi-taper window function in Hz. For a given
frequency, frequencies at ± half-bandwidth are smoothed together.
The default value is a half-bandwidth of 4.
Frequency bandwidth of the multi-taper window function in Hz. For a
given frequency, frequencies at ± bandwidth/2 are smoothed together.
The default value is a bandwidth of 8 * (sfreq / n_times).
tomdstone marked this conversation as resolved.
Show resolved Hide resolved
adaptive : bool
Use adaptive weights to combine the tapered spectra into PSD
(slow, use n_jobs >> 1 to speed up computation).
Expand Down