Skip to content

Commit

Permalink
Merge pull request #265 from fooof-tools/peakh
Browse files Browse the repository at this point in the history
[DOC] - Update description of abs threshold units
  • Loading branch information
TomDonoghue authored Jun 29, 2023
2 parents 117cbc0 + 3205198 commit 12e085d
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 8 deletions.
6 changes: 4 additions & 2 deletions fooof/objs/fit.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions tutorials/plot_04-MoreFOOOF.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 12e085d

Please sign in to comment.