-
Notifications
You must be signed in to change notification settings - Fork 62
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue811 sleep efficiency #890
Conversation
Codecov Report
❗ Your organization needs to install the Codecov GitHub app to enable full functionality. @@ Coverage Diff @@
## master #890 +/- ##
==========================================
+ Coverage 78.12% 78.13% +0.01%
==========================================
Files 91 91
Lines 12094 12097 +3
==========================================
+ Hits 9448 9452 +4
+ Misses 2646 2645 -1
|
R/g.part4.R
Outdated
# calculate: sleep latency: | ||
nightsummary[sumi, 25] = round(nightsummary[sumi, 3] - nightsummary[sumi, 7], | ||
digits = 7) #sleeponset - guider_onset | ||
# sleep efficiency: | ||
nightsummary[sumi, 26] = round(nightsummary[sumi, 14]/nightsummary[sumi, 9], digits = 5) #accumulated nocturnal sleep / guider | ||
if (params_sleep[["relyonguider_SleepEfficiency"]]) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The term "relyonguider_SleepEfficiency" feels inaccurate because for the beginning of the night we will rely on guider (sleeplog) for latency estimates in both scenarios. For the end of the night we will fully rely on guider in the existing method and rely partially in the new method because the guider is used to identify wakeup time.
So, I think the distinction is not to rely on guider or not. Instead, maybe use sleepefficiency.metric
with numbers 1, 2,... to indicate how it is calculated?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Further, changelog version needs to refer to version 2.10-3 as 2.10-2 is already out.
Closes #811 => added new parameter
relyonguider_SleepEfficiency
to handle how to calculate sleep efficiency in part 4 (note this is not applied in part 5 where sleep efficiency would always be sleep time / spt). Ifrelyonguider_SleepEfficiency = FALSE
(default), then the algorithm do NOT use the user-provided wake up time and the denominator is spt+latency (as proposed here). Ifrelyonguider_SleepEfficiency = TRUE
, then the denominator is the guider_spt as in previous GGIR versions.Checklist before merging:
inst/NEWS.Rd
with a user-readable summary. Please, include references to relevant issues or PR discussions.DESCRIPTION
andCITATION.cff
files.