Skip to content

Commit

Permalink
Correct timing of LXMX in part 2, fixes #1117
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentvanhees committed May 24, 2024
1 parent 913cf79 commit f211e58
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 1 deletion.
4 changes: 4 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
# CHANGES IN GGIR VERSION 3.1-1

- Part 2: Corrected calculation of LXhr and MXhr which had one hour offset when timing was after midnight, #1117

# CHANGES IN GGIR VERSION 3.1-0

- Minor issue fixes introduced in 3.0-10 related to handling nights without sustained inactivity bouts, handling recordings without midnight and storage of GGIR version in the part 4 output when there are no valid nights.
Expand Down
2 changes: 1 addition & 1 deletion R/g.analyse.perday.R
Original file line number Diff line number Diff line change
Expand Up @@ -422,7 +422,7 @@ g.analyse.perday = function(ndays, firstmidnighti, time, nfeatures,
exfi = collectfi[which(params_247[["winhr"]] == winhr_value)]
if (length(varnum) > (60 / ws3) * 60 * winhr_value * 1.2) { # Calculate values
# Time window for L5 & M5 analysis
t0_LFMF = 1 #start
t0_LFMF = 0 #start
# L5M5window[2] #end in 24 hour clock hours (if a value higher than 24 is chosen, it will take early hours of previous day to complete the 5 hour window
t1_LFMF = length(varnum) / (60 * (60 / ws3)) + (winhr_value - (params_247[["M5L5res"]] / 60))

Expand Down

0 comments on commit f211e58

Please sign in to comment.