Learn R Programming

GENEAcore (version 1.2.0)

detect_nonmovement: Detect Non-movement

Description

Detect Non-movement

Usage

detect_nonmovement(
  binfile,
  binfile_path,
  output_folder,
  still_seconds = 120,
  sd_threshold = 0.013,
  temp_seconds = 240,
  border_seconds = 300,
  long_still_seconds = 120 * 60,
  delta_temp_threshold = -0.7,
  posture_changes_max = 2,
  non_move_duration_max = 12 * 60 * 60
)

Value

List of sphere points, non-movement events and non-wear events.

Arguments

binfile

Text lines read from an open connection to a bin file.

binfile_path

Path to the bin file to be processed.

output_folder

Path to the folder containing GENEAcore run outputs and Measurement Period Information (MPI) files.

still_seconds

The number of seconds included in the rolling standard deviation calculation of non-movement from 1Hz downsampled data.

sd_threshold

The threshold applied to the rolling standard deviation of mean acceleration standard deviation of 1Hz downsampled data to determine non-movement.

temp_seconds

The number of seconds included in the rolling temperature difference calculation for non-wear, which also determines the shortest detection duration.

border_seconds

The maximum number of seconds between non-movement events for them to be combined into the same period.

long_still_seconds

The number of seconds for any single non-movement event beyond which the whole period is classed as non-wear.

delta_temp_threshold

The threshold applied to the rolling temperature difference to determine non-wear.

posture_changes_max

The maximum number of adjoining non-movement events that make up a single period of non-wear less than the maximum non-move duration.

non_move_duration_max

The number of seconds beyond which non-movement events are automatically classed as non-wear.

Details

Function to detect non-movement events, non-wear events and sphere points from a 1Hz downsampled bin file.

Examples

Run this code
binfile_path <- system.file("extdata/10Hz_calibration_file_20Nov25.bin", package = "GENEAcore")
con <- file(binfile_path, "r")
binfile <- readLines(con, skipNul = TRUE)
close(con)
output_folder <- tempdir()
MPI <- create_MPI(binfile, binfile_path, output_folder)
MPI <- detect_nonmovement(binfile, binfile_path, output_folder)

Run the code above in your browser using DataLab