|
16 | 16 | "\n", |
17 | 17 | "## Installation\n", |
18 | 18 | "\n", |
19 | | - "> ### ⚠️ Important Note for macOS Users\n", |
| 19 | + "> ### \u26a0\ufe0f Important Note for macOS Users\n", |
20 | 20 | ">\n", |
21 | 21 | "> **wristpy** depends on `libomp`, a system-level dependency that is not always installed by default on macOS. Install it via:\n", |
22 | 22 | ">\n", |
|
53 | 53 | "- ***Data imputation*** In the special case when dealing with the Actigraph `idle_sleep_mode == enabled`, the gaps in acceleration are filled in after calibration, to avoid biasing the calibration phase.\n", |
54 | 54 | "- **Metrics Calculation**: Calculates various activity metrics on the calibrated data, namely ENMO (Euclidean norm, minus one), MAD (mean amplitude deviation)<sup><a href=\"#ref1\">1</a></sup>, Actigraph activity counts<sup><a href=\"#ref2\">2</a></sup>, MIMS (monitor-independent movement summary) unit<sup><a href=\"#ref3\">3</a></sup>, and angle-Z (angle of acceleration relative to the *x-y* axis).\n", |
55 | 55 | "- **Non-wear detection**: We find periods of non-wear based on the acceleration data. Specifically, the standard deviation of the acceleration values in a given time window, along each axis, is used as a threshold to decide `wear` or `not wear`. Additionally, we can use the temperature sensor, when available, to augment the acceleration data. This is used in the CTA (combined temperature and acceleration) algorithm<sup><a href=\"#ref4\">4</a></sup>, and in the `skdh` DETACH algorithm<sup><a href=\"#ref5\">5</a></sup>. Furthermore, ensemble classification of non-wear periods is possible by providing a list (of any length) of non-wear algorithm options.\n", |
56 | | - "- **Sleep Detection**: Using the HDCZ<sup><a href=\"#ref6\">6</a></sup> and HSPT<sup><a href=\"#ref7\">7</a></sup> algorithms to analyze changes in arm angle we are able to find periods of sleep. We find the sleep onset–wakeup times for all sleep windows detected. Any sleep periods that overlap with detected non-wear times are removed, and any remaining sleep periods shorter than 15 minutes (default value) are removed. Additionally, the SIB (sustained inactivity bouts) and the SPT (sleep period time) windows are provided as part of the output to aid in sleep metric post-processing.\n", |
| 56 | + "- **Sleep Detection**: Using the HDCZ<sup><a href=\"#ref6\">6</a></sup> and HSPT<sup><a href=\"#ref7\">7</a></sup> algorithms to analyze changes in arm angle we are able to find periods of sleep. We find the sleep onset\u2013wakeup times for all sleep windows detected. Any sleep periods that overlap with detected non-wear times are removed, and any remaining sleep periods shorter than 15 minutes (default value) are removed. Additionally, the SIB (sustained inactivity bouts) and the SPT (sleep period time) windows are provided as part of the output to aid in sleep metric post-processing.\n", |
57 | 57 | "- **Physical activity levels**: Using the chosen physical activity metric (aggregated into time bins, 5-second default) we compute activity levels into the following categories: [`inactive`, `light`, `moderate`, `vigorous`]. The threshold values can be defined by the user, while the default values are chosen based on the specific activity metric and the values found in the literature <sup><a href=\"#ref8\">8</a></sup><sup><a href=\"#ref9\">9</a></sup><sup><a href=\"#ref10\">10</a></sup>.\n", |
58 | 58 | "- **Data output**: The output results can be saved in `.csv` or `.parquet` data formats, with the run-time configuration parameters saved in a `.json` dictionary.\n", |
59 | 59 | "\n", |
|
63 | 63 | "\n", |
64 | 64 | "| Format | Manufacturer | Device | Implementation status |\n", |
65 | 65 | "| --- | --- | --- | --- |\n", |
66 | | - "| GT3X | Actigraph | wGT3X-BT | ✅ |\n", |
67 | | - "| BIN | GENEActiv | GENEActiv | ✅ |\n", |
| 66 | + "| GT3X | Actigraph | wGT3X-BT | \u2705 |\n", |
| 67 | + "| BIN | GENEActiv | GENEActiv | \u2705 |\n", |
68 | 68 | "\n", |
69 | 69 | "## Command Line Tutorial \n", |
70 | 70 | "\n", |
|
783 | 783 | "\n", |
784 | 784 | "## Physical Activity Metrics Explained\n", |
785 | 785 | "\n", |
786 | | - "### *ENMO— Euclidean Norm Minus One* \n", |
| 786 | + "### *ENMO\u2014 Euclidean Norm Minus One* \n", |
787 | 787 | "ENMO quantifies movement intensity from calibrated 3-axis acceleration by taking the vector magnitude and subtracting 1 g (gravity). Values below zero are set to 0 (they mostly reflect noise or tiny calibration errors). \n", |
788 | 788 | "\n", |
789 | 789 | "**References:** \n", |
790 | | - "- van Hees, V. T., Gorzelniak, L., Dean León, E. C., Eder, M., Pias, M., Taherian, S., Ekelund, U., Renström, F., Franks, P. W., Horsch, A., & Brage, S. (2013). Separating movement and gravity components in an acceleration signal and implications for the assessment of human daily physical activity. *PLoS ONE, 8*(4), e61691. https://doi.org/10.1371/journal.pone.0061691 \n", |
791 | | - "- Hildebrand, M., van Hees, V. T., Hansen, B. H., & Ekelund, U. (2014). Age group comparability of raw accelerometer output from wrist- and hip-worn monitors. *Medicine & Science in Sports & Exercise, 46*(9), 1816–1824. https://doi.org/10.1249/MSS.0000000000000289 \n", |
| 790 | + "- van Hees, V. T., Gorzelniak, L., Dean Le\u00f3n, E. C., Eder, M., Pias, M., Taherian, S., Ekelund, U., Renstr\u00f6m, F., Franks, P. W., Horsch, A., & Brage, S. (2013). Separating movement and gravity components in an acceleration signal and implications for the assessment of human daily physical activity. *PLoS ONE, 8*(4), e61691. https://doi.org/10.1371/journal.pone.0061691 \n", |
| 791 | + "- Hildebrand, M., van Hees, V. T., Hansen, B. H., & Ekelund, U. (2014). Age group comparability of raw accelerometer output from wrist- and hip-worn monitors. *Medicine & Science in Sports & Exercise, 46*(9), 1816\u20131824. https://doi.org/10.1249/MSS.0000000000000289 \n", |
792 | 792 | "\n", |
793 | 793 | "\n", |
794 | | - "### *MAD — Mean Amplitude Deviation*\n", |
795 | | - "MAD summarizes how much the acceleration magnitude fluctuates within an epoch. Specifically it’s the mean of the absolute deviations from the epoch’s mean acceleration magnitude. It correlates well with energy expenditure and is orientation-independent.\n", |
| 794 | + "### *MAD \u2014 Mean Amplitude Deviation*\n", |
| 795 | + "MAD summarizes how much the acceleration magnitude fluctuates within an epoch. Specifically it\u2019s the mean of the absolute deviations from the epoch\u2019s mean acceleration magnitude. It correlates well with energy expenditure and is orientation-independent.\n", |
796 | 796 | "\n", |
797 | 797 | "**Reference:** \n", |
798 | | - "- Vähä-Ypyä, H., Vasankari, T., Husu, P., Suni, J., & Sievänen, H. (2015). A universal, accurate intensity-based classification of different physical activities using raw data of accelerometer. *Clinical Physiology and Functional Imaging, 35*(1), 64–70. https://doi.org/10.1111/cpf.12127 \n", |
| 798 | + "- V\u00e4h\u00e4-Ypy\u00e4, H., Vasankari, T., Husu, P., Suni, J., & Siev\u00e4nen, H. (2015). A universal, accurate intensity-based classification of different physical activities using raw data of accelerometer. *Clinical Physiology and Functional Imaging, 35*(1), 64\u201370. https://doi.org/10.1111/cpf.12127 \n", |
799 | 799 | "\n", |
800 | 800 | "\n", |
801 | | - "### *MIMS — Monitor-Independent Summary Units*\n", |
802 | | - "MIMS is a standardized, device-agnostic summary unit. The pipeline interpolates to a fixed frequency (100 Hz), extrapolates values outside device range, band-pass filters, integrates area-under-the-curve per axis over each epoch, then combines axes (sum or vector magnitude) with small-value truncation. It’s designed to be comparable across devices and studies. This metric is computationally intensive and will run significantly slower than the other algorithms.\n", |
| 801 | + "### *MIMS \u2014 Monitor-Independent Summary Units*\n", |
| 802 | + "MIMS is a standardized, device-agnostic summary unit. The pipeline interpolates to a fixed frequency (100 Hz), extrapolates values outside device range, band-pass filters, integrates area-under-the-curve per axis over each epoch, then combines axes (sum or vector magnitude) with small-value truncation. It\u2019s designed to be comparable across devices and studies. This metric is computationally intensive and will run significantly slower than the other algorithms.\n", |
803 | 803 | "\n", |
804 | 804 | "**Reference:** \n", |
805 | | - "- John, D., Tang, Q., Albinali, F., & Intille, S. (2019). An open-source monitor-independent movement summary for accelerometer data processing. *Journal for the Measurement of Physical Behaviour, 2*(4), 268–281. https://doi.org/10.1123/jmpb.2019-0011 \n", |
| 805 | + "- John, D., Tang, Q., Albinali, F., & Intille, S. (2019). An open-source monitor-independent movement summary for accelerometer data processing. *Journal for the Measurement of Physical Behaviour, 2*(4), 268\u2013281. https://doi.org/10.1123/jmpb.2019-0011 \n", |
806 | 806 | "\n", |
807 | 807 | "\n", |
808 | 808 | "### *ActiGraph Activity Counts (ag_counts)*\n", |
809 | | - "This reproduces the open ActiGraph counts method: resample to 30 Hz, apply the published IIR band-pass filter, scale to device units, threshold, downsample to 10 Hz, and sum within each epoch. The three axes are finally combined to yield epoch-level “counts.”\n", |
| 809 | + "This reproduces the open ActiGraph counts method: resample to 30 Hz, apply the published IIR band-pass filter, scale to device units, threshold, downsample to 10 Hz, and sum within each epoch. The three axes are finally combined to yield epoch-level \u201ccounts.\u201d\n", |
810 | 810 | "\n", |
811 | 811 | "**Reference:** \n", |
812 | 812 | "- Neishabouri, A., Wilson, K. E., Williams, D. K., Keadle, S. K., Sampson, J., John, D., & Staudenmayer, J. (2022). Quantification of acceleration as activity counts in ActiGraph wearable. *Scientific Reports, 12*(1), 11169. https://doi.org/10.1038/s41598-022-16003-x \n", |
|
831 | 831 | "source": [ |
832 | 832 | "## References\n", |
833 | 833 | "\n", |
834 | | - "<span id=\"ref1\">[1]</span> Vähä-Ypyä H, Vasankari T, Husu P, Suni J, Sievänen H. A universal, accurate intensity-based classification of different physical activities using raw data of accelerometer. *Clin Physiol Funct Imaging*. 2015;35(1):64-70. doi: <https://doi.org/10.1111/cpf.12127>. PMID: 24393233.\n", |
| 834 | + "<span id=\"ref1\">[1]</span> V\u00e4h\u00e4-Ypy\u00e4 H, Vasankari T, Husu P, Suni J, Siev\u00e4nen H. A universal, accurate intensity-based classification of different physical activities using raw data of accelerometer. *Clin Physiol Funct Imaging*. 2015;35(1):64-70. doi: <https://doi.org/10.1111/cpf.12127>. PMID: 24393233.\n", |
835 | 835 | "\n", |
836 | 836 | "<span id=\"ref2\">[2]</span> Neishabouri A, Wilson KE, Williams DK, et al. Quantification of acceleration as activity counts in ActiGraph wearable. *Sci Rep*. 2022;12(1). doi: <https://doi.org/10.1038/s41598-022-16003-x>.\n", |
837 | 837 | "\n", |
838 | | - "<span id=\"ref3\">[3]</span> John D, Tang Q, Albinali F, Intille S. An Open-Source Monitor-Independent Movement Summary for Accelerometer Data Processing. *Journal for the Measurement of Physical Behaviour*. 2019;2(4):268–281.\n", |
| 838 | + "<span id=\"ref3\">[3]</span> John D, Tang Q, Albinali F, Intille S. An Open-Source Monitor-Independent Movement Summary for Accelerometer Data Processing. *Journal for the Measurement of Physical Behaviour*. 2019;2(4):268\u2013281.\n", |
839 | 839 | "\n", |
840 | 840 | "<span id=\"ref4\">[4]</span> Zhou S, Hill RA, Morgan K, et al. Classification of accelerometer wear and non-wear events in seconds for monitoring free-living physical activity. *BMJ Open*. 2015;5:e007447. doi: <https://doi.org/10.1136/bmjopen-2014-007447>.\n", |
841 | 841 | "\n", |
|
845 | 845 | "\n", |
846 | 846 | "<span id=\"ref7\">[7]</span> van Hees VT, et al. A Novel, Open Access Method to Assess Sleep Duration Using a Wrist-Worn Accelerometer. *PLoS One*. 2015;10:e0142533. doi: <https://doi.org/10.1371/journal.pone.0142533>.\n", |
847 | 847 | "\n", |
848 | | - "<span id=\"ref8\">[8]</span> Hildebrand M, et al. Age group comparability of raw accelerometer output from wrist- and hip-worn monitors. *Med Sci Sports Exerc*. 2014;46(9):1816–1824. doi: <https://doi.org/10.1249/mss.0000000000000289>.\n", |
| 848 | + "<span id=\"ref8\">[8]</span> Hildebrand M, et al. Age group comparability of raw accelerometer output from wrist- and hip-worn monitors. *Med Sci Sports Exerc*. 2014;46(9):1816\u20131824. doi: <https://doi.org/10.1249/mss.0000000000000289>.\n", |
849 | 849 | "\n", |
850 | | - "<span id=\"ref9\">[9]</span> Treuth MS, Schmitz K, Catellier DJ, et al. Defining accelerometer thresholds for activity intensities in adolescent girls. *Med Sci Sports Exerc*. 2004;36(7):1259–1266. PMID: 15235335; PMCID: PMC2423321.\n", |
| 850 | + "<span id=\"ref9\">[9]</span> Treuth MS, Schmitz K, Catellier DJ, et al. Defining accelerometer thresholds for activity intensities in adolescent girls. *Med Sci Sports Exerc*. 2004;36(7):1259\u20131266. PMID: 15235335; PMCID: PMC2423321.\n", |
851 | 851 | "\n", |
852 | | - "<span id=\"ref10\">[10]</span> Aittasalo M, Vähä-Ypyä H, Vasankari T, et al. Mean amplitude deviation calculated from raw acceleration data: a novel method for classifying the intensity of adolescents’ physical activity irrespective of accelerometer brand. *BMC Sports Sci Med Rehabil*. 2015;7:18. doi: <https://doi.org/10.1186/s13102-015-0010-0>.\n" |
| 852 | + "<span id=\"ref10\">[10]</span> Aittasalo M, V\u00e4h\u00e4-Ypy\u00e4 H, Vasankari T, et al. Mean amplitude deviation calculated from raw acceleration data: a novel method for classifying the intensity of adolescents\u2019 physical activity irrespective of accelerometer brand. *BMC Sports Sci Med Rehabil*. 2015;7:18. doi: <https://doi.org/10.1186/s13102-015-0010-0>.\n" |
853 | 853 | ] |
854 | 854 | }, |
855 | 855 | { |
|
0 commit comments