Skip to content

Commit

Permalink
passing relative_prominence in rem_detect() (#151)
Browse files Browse the repository at this point in the history
Co-authored-by: Paul ROUJANSKY <paul.roujansky@bioserenity.com>
  • Loading branch information
paulroujansky and Paul ROUJANSKY authored Sep 30, 2023
1 parent 9d9fb74 commit 9608fa4
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion yasa/detection.py
Original file line number Diff line number Diff line change
Expand Up @@ -2330,6 +2330,7 @@ def rem_detect(
include=4,
amplitude=(50, 325),
duration=(0.3, 1.2),
relative_prominence=0.8,
freq_rem=(0.5, 5),
remove_outliers=False,
verbose=False,
Expand Down Expand Up @@ -2387,6 +2388,9 @@ def rem_detect(
duration : tuple or list
The minimum and maximum duration of the REMs.
Default is 0.3 to 1.2 seconds.
relative_prominence : float
Relative prominence used to detect the peaks. The actual prominence is computed
by multiplying relative prominence by the minimal amplitude. Default is 0.8.
freq_rem : tuple or list
Frequency range of REMs. Default is 0.5 to 5 Hz.
remove_outliers : boolean
Expand Down Expand Up @@ -2493,7 +2497,7 @@ def rem_detect(
negp,
height=(hmin, hmax),
distance=(duration[0] * sf),
prominence=(0.8 * hmin),
prominence=(relative_prominence * hmin),
wlen=(duration[1] * sf),
)

Expand Down

0 comments on commit 9608fa4

Please sign in to comment.