From 3205198ba1d78c6eb0217016113daa71fde444eb Mon Sep 17 00:00:00 2001 From: Tom Donoghue Date: Wed, 28 Jun 2023 15:36:08 -0700 Subject: [PATCH] update description of abs threshold units --- fooof/objs/fit.py | 6 ++++-- tutorials/plot_04-MoreFOOOF.py | 12 ++++++------ 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/fooof/objs/fit.py b/fooof/objs/fit.py index 438926081..7d7def0b8 100644 --- a/fooof/objs/fit.py +++ b/fooof/objs/fit.py @@ -97,9 +97,11 @@ class FOOOF(): max_n_peaks : int, optional, default: inf Maximum number of peaks to fit. min_peak_height : float, optional, default: 0 - Absolute threshold for detecting peaks, in units of the input data. + Absolute threshold for detecting peaks. + This threshold is defined in absolute units of the power spectrum (log power). peak_threshold : float, optional, default: 2.0 - Relative threshold for detecting peaks, in units of standard deviation of the input data. + Relative threshold for detecting peaks. + This threshold is defined in relative units of the power spectrum (standard deviation). aperiodic_mode : {'fixed', 'knee'} Which approach to take for fitting the aperiodic component. verbose : bool, optional, default: True diff --git a/tutorials/plot_04-MoreFOOOF.py b/tutorials/plot_04-MoreFOOOF.py index 3aef8557b..8b916fc48 100644 --- a/tutorials/plot_04-MoreFOOOF.py +++ b/tutorials/plot_04-MoreFOOOF.py @@ -79,20 +79,20 @@ # iteratively by height (over and above the aperiodic component), and so this approach will # extract (up to) the *n* largest peaks. # -# **peak_threshold (in units of standard deviation)** default: 2.0 +# **peak_threshold (relative threshold - standard deviation of power spectrum)** default: 2.0 # # The threshold, in terms of standard deviation of the aperiodic-removed power # spectrum, above which a data point must pass to be considered a candidate peak. # Once a candidate peak drops below this threshold, the peak search is halted (without # including the most recent candidate). # -# **min_peak_height (units of power - same as the input spectrum)** default: 0 +# **min_peak_height (absolute threshold - units of log power)** default: 0 # # The minimum height, above the aperiodic fit, that a peak must have to be extracted -# in the initial fit stage. Once a candidate peak drops below this threshold, the peak -# search is halted (without including the most recent candidate). Note that because -# this constraint is enforced during peak search, and prior to final peak fit, returned -# peaks are not guaranteed to surpass this value in height. +# in the initial fit stage. This threshold is defined in units of log power. Once a +# candidate peak drops below this threshold, the peak search is halted (without including +# the most recent candidate). Note that because this constraint is enforced during peak search, +# and prior to final peak fit, returned peaks are not guaranteed to surpass this value in height. # # There are two different height-related halting conditions for the peak searching. # By default, the relative (standard-deviation based) threshold is defined, whereas the