Skip to content

Commit 12e085d

Browse files
authored
Merge pull request #265 from fooof-tools/peakh
[DOC] - Update description of abs threshold units
2 parents 117cbc0 + 3205198 commit 12e085d

File tree

2 files changed

+10
-8
lines changed

2 files changed

+10
-8
lines changed

fooof/objs/fit.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -97,9 +97,11 @@ class FOOOF():
9797
max_n_peaks : int, optional, default: inf
9898
Maximum number of peaks to fit.
9999
min_peak_height : float, optional, default: 0
100-
Absolute threshold for detecting peaks, in units of the input data.
100+
Absolute threshold for detecting peaks.
101+
This threshold is defined in absolute units of the power spectrum (log power).
101102
peak_threshold : float, optional, default: 2.0
102-
Relative threshold for detecting peaks, in units of standard deviation of the input data.
103+
Relative threshold for detecting peaks.
104+
This threshold is defined in relative units of the power spectrum (standard deviation).
103105
aperiodic_mode : {'fixed', 'knee'}
104106
Which approach to take for fitting the aperiodic component.
105107
verbose : bool, optional, default: True

tutorials/plot_04-MoreFOOOF.py

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -79,20 +79,20 @@
7979
# iteratively by height (over and above the aperiodic component), and so this approach will
8080
# extract (up to) the *n* largest peaks.
8181
#
82-
# **peak_threshold (in units of standard deviation)** default: 2.0
82+
# **peak_threshold (relative threshold - standard deviation of power spectrum)** default: 2.0
8383
#
8484
# The threshold, in terms of standard deviation of the aperiodic-removed power
8585
# spectrum, above which a data point must pass to be considered a candidate peak.
8686
# Once a candidate peak drops below this threshold, the peak search is halted (without
8787
# including the most recent candidate).
8888
#
89-
# **min_peak_height (units of power - same as the input spectrum)** default: 0
89+
# **min_peak_height (absolute threshold - units of log power)** default: 0
9090
#
9191
# The minimum height, above the aperiodic fit, that a peak must have to be extracted
92-
# in the initial fit stage. Once a candidate peak drops below this threshold, the peak
93-
# search is halted (without including the most recent candidate). Note that because
94-
# this constraint is enforced during peak search, and prior to final peak fit, returned
95-
# peaks are not guaranteed to surpass this value in height.
92+
# in the initial fit stage. This threshold is defined in units of log power. Once a
93+
# candidate peak drops below this threshold, the peak search is halted (without including
94+
# the most recent candidate). Note that because this constraint is enforced during peak search,
95+
# and prior to final peak fit, returned peaks are not guaranteed to surpass this value in height.
9696
#
9797
# There are two different height-related halting conditions for the peak searching.
9898
# By default, the relative (standard-deviation based) threshold is defined, whereas the

0 commit comments

Comments
 (0)