Orchestrates the complete pipeline for a single ActTrust recording:
Arguments
- path
character(1). Path to the ActTrust.txtfile.- tz
character(1). Recording time zone. Passed toread_acttrust(). Default is"UTC".- wake_thresh
integer(1). Minimum wake-bout length (epochs) used to separate sleep periods incompute_waso(). Default is60.- gap_s
numeric(1). Gap threshold (seconds) forcheck_consistency(). Default is120.- offwrist_args
list. Additional arguments passed todetect_offwrist_bimodal(). Default is an empty list.- sleep_args
list. Additional arguments passed todetect_sleep_crespo(). Default is an empty list.- nap_args
list. Additional arguments passed todetect_naps_crespo(). Default is an empty list.
Value
A zeitr_result S3 object — a named list with:
subject_idcharacter— derived from the input filename stem.source_filecharacter— absolute path to the input file.datatibble— final epoch-level data frame with all state columns populated.nightstibble— per-night sleep statistics.issuestibble— timestamp consistency issues (0 rows if none).metadatalist— device and subject metadata from the file header.
Details
Read —
read_acttrust()Consistency check —
check_consistency()Prepare —
prepare_actigraphy()Off-wrist detection —
detect_offwrist_bimodal()Main sleep period detection —
detect_sleep_crespo()Nap detection —
detect_naps_crespo()WASO + nightly statistics —
compute_waso()
See also
run_pipeline_batch() for processing a directory of files.