Instruments and measurements · What you can do here
Process accelerometer data for sleep and activity
Extract physical activity, rest-activity rhythms, and sleep estimates from raw wrist or hip accelerometer files using GGIR, configured for your study cohort.
What this involves
Processing raw triaxial accelerometry data requires converting raw gravitational acceleration into reproducible behavioural metrics. GGIR is the reference pipeline used across major cohorts, including the UK Biobank, to process raw sensor formats such as Axivity .cwa, GENEActiv .bin, ActiGraph .gt3x, and generic three-axis CSV files. It carries out sensor auto-calibration, detects non-wear periods, and derives physical activity and sleep metrics without relying on proprietary manufacturer algorithms.
Deriving valid measures requires aligning the processing arguments to your study design. Default acceleration cut-points reflect adult wrist-worn protocols; applying them to hip wear, paediatric cohorts, or older adults alters classification. Sleep estimation relies on wrist angle changes and sustained inactivity (the HDCZA heuristic) unless an external sleep diary is supplied to guide the sleep period time window. Metrics such as ENMO describe acceleration magnitudes, while MX metrics and the intensity gradient characterise movement intensity independent of cut-points.
The platform executes GGIR directly on dedicated computational infrastructure, handling parallel execution across recordings without local software installation. Because calibration and initial metric calculations are stored in milestone files, subsequent parameter updates—such as refining intensity thresholds or wear-time criteria—can be recalculated rapidly from downstream parts without recomputing raw signal metrics.
How it goes
- 1Ingestion and Job ConfigurationSpecify local paths or URLs for raw Axivity, GENEActiv, or ActiGraph recordings. Set recording parameters including the device time zone, participant identifier extraction mode, sensor wear location, and any sleep log references before starting the GGIR background run.
- 2Signal Calibration and Metric GenerationGGIR Part 1 loads raw three-axis acceleration, performs autocalibration against local gravity, checks data quality, and calculates the Euclidean norm minus one (ENMO) metric across the recording.
- 3Non-Wear Detection and Data Quality ScreeningGGIR Part 2 detects non-wear periods, flags calibration errors above 0.01 g, and generates day-level summaries and data quality reports tracking file validity and wear duration.
- 4Sleep Window and Sustained Inactivity DetectionGGIR Parts 3 and 4 identify the sleep period time (SPT) window and sustained inactivity bouts using either the heuristic algorithm (HDCZA) based on arm angle changes or an external sleep diary.
- 5Physical Activity and Person-Level SummariesGGIR Part 5 integrates waking and sleep periods to compute overall physical activity time, bouted and unbouted moderate-to-vigorous physical activity (MVPA), L5/M10 circadian variables, and weekday-weighted averages.
- 6Downstream Analysis and Threshold RerunsSummary CSV tables are retrieved for analysis in R or Python. If cut-points or classification rules need adjustment, downstream parts rerun against existing Part 1 milestone files without repeating the raw signal extraction.
Start it here
Ask in plain language. The agent works on a Linux machine of its own — it installs and runs what the job needs, keeps every file, and reads the results back with the numbers explained. Nothing to set up, and a long run continues after you close the page.
What to watch for
- Using default wrist-worn adult cut-points (40, 100, and 400 mg ENMO) for hip placements, children, or older adults will distort activity classifications.
- Omitting the device time zone forces day boundaries to follow UTC, causing discrepancies during daylight-saving shifts.
- Setting an incorrect participant ID extraction method (idloc) can silently merge recordings from different participants or split single recordings.
- Failing to inspect the calibration error in Part 2 reports can hide sensor drift or calibration errors exceeding 0.01 g.
- Confusing unweighted valid-day averages (_pla) with 5:2 weekday-to-weekend weighted averages (_wei) produces inconsistent population-level summaries.
- Treating GGIR sleep window estimates as polysomnography overinterprets the data, as the heuristic tracks rest-activity timing without staging sleep architecture.
What it runs
Questions
Do I need to install anything to process accelerometer data for sleep and activity?
No. The research agent does this work on a Linux machine of its own — it runs GGIR there, keeps the files, and reads the results back to you. Long runs continue if you close the page.
Can I process data without an accompanying sleep diary?
Yes. If no diary is provided via the loglocation parameter, GGIR applies the HDCZA heuristic, which estimates the sleep period time window using arm angle alterations and sustained inactivity bouts.
What happens if I need to change my MVPA cut-points after running the data?
You do not need to reprocess the raw accelerometry. Because initial metric extraction is preserved in milestone files, you can rerun Parts 2 to 5 (or Part 5 alone) using your new threshold arguments with overwrite set to true.
Which raw recording formats can be processed?
The pipeline accepts Axivity .cwa, GENEActiv .bin, ActiGraph .gt3x, their corresponding CSV exports, and any standard CSV containing raw three-axis acceleration data.
Can step counts or biobank machine learning classifications be derived here?
No. Packages such as stepcount and biobankAccelerometerAnalysis fall under academic-only licences that exclude commercial platforms. GGIR intensity thresholds, MX metrics, and sleep window estimates are used instead.
Written from the method the research agent follows for this work and the documentation of the tools listed above. Statements citing a figure that does not appear there are removed before publication. Corollary is a non-commercial research demonstration; results are not for clinical use.