Skip to content

Commit

Permalink
rename num_window arg to n_tapers
Browse files Browse the repository at this point in the history
  • Loading branch information
mwprestonjr committed Apr 16, 2024
1 parent 1ab922a commit acf6450
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions neurodsp/spectral/power.py
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ def compute_spectrum_medfilt(sig, fs, filt_len=1., f_range=None):
return freqs, spectrum


def compute_spectrum_multitaper(sig, fs, bandwidth=None, num_windows=None,
def compute_spectrum_multitaper(sig, fs, bandwidth=None, n_tapers=None,
low_bias=True, eigenvalue_weighting=True):
"""Compute the power spectral density using the multi-taper method.
Expand All @@ -273,7 +273,7 @@ def compute_spectrum_multitaper(sig, fs, bandwidth=None, num_windows=None,
Sampling rate, in Hz.
bandwidth : float
Frequency bandwidth of multi-taper window function.
num_windows : int.
n_tapers : int.
Number of slepian windows used to weight the signal.
low_bias : bool
If True, only use tapers with concentration ratio > 0.9. Default is
Expand All @@ -296,10 +296,10 @@ def compute_spectrum_multitaper(sig, fs, bandwidth=None, num_windows=None,
sig_len = sig.shape[sig.ndim - 1]

# check settings
nw, num_windows = check_mt_settings(sig_len, fs, bandwidth, num_windows)
nw, n_tapers = check_mt_settings(sig_len, fs, bandwidth, n_tapers)

# Create slepian sequences
slepian_sequences, ratios = dpss(sig_len, nw, num_windows,
slepian_sequences, ratios = dpss(sig_len, nw, n_tapers,
return_ratios=True)

# Drop tapers with low concentration
Expand Down

0 comments on commit acf6450

Please sign in to comment.