Skip to content

Commit

Permalink
Merge branch 'master' into issue839_add_DFA_to_part6
Browse files Browse the repository at this point in the history
  • Loading branch information
vincentvanhees committed Feb 17, 2024
2 parents bbb80df + 0e78399 commit c7fc0d8
Show file tree
Hide file tree
Showing 3 changed files with 12 additions and 6 deletions.
10 changes: 5 additions & 5 deletions NEWS.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@

- Part 2 + 6: Revised and simplified IV and IS calculation which now ignores invalid timestamps and also comes with phi statistic (credits: Ian Meneghel Danilevicz). In part 2 we used to have 2 calculation, which is now replaced by just one and applied to all valid data points in the recordings. In part 6 this is repeated by for the time window as specified with parameter part6Window. Further, IVIS now uses argument threshold.lig as threshold to distinguish inactivity from active.

Part 1:
- Part 1:

- Improved readability and maintainability of the code #1027
- Improved readability and maintainability of the code #1027

- Improved processing speed for Axivity .cwa, GENEActiv .bin, and Movisens files
- Improved processing speed for Axivity .cwa, GENEActiv .bin, and Movisens files

- Made sure that g.readaccfile() reads timestamps in the correct timezone, configtz, for all monitor types
- Made sure that g.readaccfile() reads timestamps in the correct timezone, configtz, for all monitor types

- Note: there will be small differences in both metalong and metashort metrics calculated by this GGIR version, compared to prior versions. This is due to small improvements in the management of timestamps, calibration coefficients, and input data block boundaries.
- Note: there will be small differences in both metalong and metashort metrics calculated by this GGIR version, compared to prior versions. This is due to small improvements in the management of timestamps, calibration coefficients, and input data block boundaries.

# CHANGES IN GGIR VERSION 3.0-5

Expand Down
6 changes: 6 additions & 0 deletions R/g.analyse.perfile.R
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,12 @@ g.analyse.perfile = function(I, C, metrics_nav,
ds_names = ds_names[-cut]
daysummary = daysummary[,-cut]
}
# for a very small file, there could be just one row in daysummary[-cut,], so it gets coerced to a vector.
# But what we actually need is a 1-row matrix. So we need to transpose it.
if(is.vector(daysummary)) {
daysummary = t(daysummary)
}

# Person identification number
filesummary[vi] = file_summary$ID
# Identify which of the metrics are in g-units to aid deciding whether to multiply by 1000
Expand Down
2 changes: 1 addition & 1 deletion R/g.plot5.R
Original file line number Diff line number Diff line change
Expand Up @@ -454,7 +454,7 @@ g.plot5 = function(metadatadir = c(), dofirstpage = FALSE, viewingwindow = 1,
xaxislabels = c("noon","2pm", "4pm", "6pm", "8pm", "10pm", "midnight",
"2am", "4am", "6am", "8am", "10am", "noon")
}
if (length(nightsi) > 0 & nrow(summarysleep_tmp) > 0) {
if (length(nightsi) > 0 && nrow(summarysleep_tmp) > 0 && nrow(P2daysummary_tmp)) {
# Do not attempt to create a plot when there is no midnight in the data,
# because calculation of t1 will be complicated.
nplots = length(nightsi) + 1
Expand Down

0 comments on commit c7fc0d8

Please sign in to comment.