Changelog
All notable changes to this project will be documented in this file.
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
[2.3.2] - 2026-07-07
Added
- Diary context mapping:
Exposures.context(df, diary)annotates the 1-second activity series with booleancontext__<name>columns derived from a diary of[start, end, context, activities]intervals. Supports overlapping contexts, per-interval activity gating, and multiple intervals per context (unioned into one column).
Changed
- The daily
validflag is nowwalk >= 5 min(waswalk + stairs >= 10 min). Stairs on a thigh sensor is a mounting/reference-angle-sensitive split of walking, so the walk+stairs sum can stay above threshold on a day where genuine walking was suppressed by an orientation artifact (the movement leaks into falsestairs). Walk-only is a stricter, harder-to-fool data-quality floor. Behaviour change: windows previously marked valid on stairs alone are now invalid. Exposures.windowis now typedstr(wasstr | timedelta) and defaults to'1D'(was'1d'); use uppercase pandas offset aliases ('1D','7D') — lowercase'd'is deprecated in pandas 3.0.Exposures.contextnow takes a full diary —context(df, diary)— and returns a copy of the activity DataFrame with onecontext__<name>column per context, replacing the earlier experimental single-context(df, intervals, context, activities)signature.- Diary validation is strict:
Exposures.contextraises clearValueErrors forNaTtimestamps, null/non-string/empty context values, malformed or unknown-labelactivities, a missingactivitycolumn, timezone mismatches between the diary and the activity index, and pre-existingcontext__column collisions. Surrounding whitespace in context names is normalized. - Datetime-to-integer conversions in
ActivitiesandFeaturesare now resolution-agnostic, correct for non-nanoseconddatetime64indices (e.g.[ms]parquet under pandas ≥ 2).
Fixed
- Thigh
row(rowing) is no longer emitted for an inverted device or feet-up lying.get_rowhad a lower inclination bound (87.5°) but no upper bound, soinclination = arccos(x)values from~90°up to180°(i.e.xnegative, device upside-down) with any leg motion were misclassified as rowing — the only class with a lower but no upper inclination bound — and folded into MVPA. A configurableinclination_upper(default110.0in the shipped config) now caps it; excluded windows fall through tosit/lie(every class abovesitis gated below87.5°, so no MVPA leak). Backwards compatible: theget_rowparameter defaults to180.0(a no-op) when a caller does not supply it. Exposuresdaily/weekly windows now bucket on local calendar days across DST transitions (a fall-back day is one 25-hour window, spring-forward one 23-hour window, all labelled at local midnight). Previously the window string was coerced to atimedeltain__post_init__; under pandas ≥ 3.0 that resolves to a fixed 24-hour tick, which drifted daily boundaries off local midnight and duplicated the fall-back date. The string is now passed straight topd.Grouper(a calendar<Day>offset on all supported pandas versions).- Declared the missing
scipyruntime dependency (imported byfeaturesandclassifications.thigh). Fresh installs previously relied onscipyarriving transitively and failed toimport actimotuswithout it. - Sampling-frequency detection and SENS timestamp export were off by a factor of 10³–10⁶ when the datetime index used a non-nanosecond resolution; conversions now use
.as_unit('ms')/.dt.total_seconds().
[2.3.1] - 2026-02-03
Changed
- Trunk reference angle calculation: Updated the calculation logic to prevent errors when values fall outside the valid arccos domain. Inputs are now strictly clipped to the [-1, 1] range (radians) to ensure numerical stability.
- Refined activity mapping: Updated the fused activities mapping logic.
Standing: No longer categorized as sedentary or LPA; it is now tracked as a standalone category.Kneeling: Now mapped as sedentary.
Fixed
- Exposures plot: Improved handling of timeline data to ensure consistent rendering and scaling.
- Project maintenance: Cleaned and optimized
pyproject.tomland.gitignore.
2.3.0 - 2026-01-03
Added
- New activity type: fast-walking.
- Timeline visualization plot for Exposures.
- Option to fuse activity types into merged exposures.
- Initial data quality checks for Activities/Exposures (flags invalid data when combined duration of climbing + walking is less than 10 minutes in a specific window).
- Support for custom configuration of activity detection thresholds.
- Experimental: Context initialization for Exposures (diary handling).
- Initial project documentation.
Changed
- Renamed package from
acti-motustoactimotus. - Updated Exposures generation logic to include fast-walking and other new categories.
- Improved feature extraction robustness regarding data gaps (handling missing data in raw accelerometer time series).
- Updated default configuration thresholds for activities.
- Adjusted orientation correction: Non-wear data is no longer flipped when flipping detection is enabled.
- Implemented new custom gravitational calibration algorithm.
- Updated docstrings.
Removed
- Dependency:
scikit-digital-healthlibrary.
2.2.0 - 2025-09-10
Added
- Auto-calibration support using the Scikit Digital Health library.
- Parser for Sens binary files.
- Configuration option to set custom activity thresholds (for thigh and trunk sensors).
Changed
- Unified terminology: consistently use "compute" instead of generate/extract/etc.
- Updated wear-time detection algorithm (ongoing debugging).
- Renamed activity "move" → "shuffle".
- Updated default activity thresholds based on recent validation studies (use LEGACY_CONFIG for Acti4 threshold compatibility).
- Improved flipping detection functions to handle edge cases more robustly by refining detection thresholds.
Fixed
- Corrected bug where non-wear time was not counted properly in the Exposures report.
- Added default stairs threshold when no data-based threshold is available.
- Fixed return values for inside-out flip detection for trunk sensors.
- Corrected chunking procedure: only acceleration axes are propagated (removed unintended overlapping column).
- Improved inside-out flipping detection for thigh sensors, reducing false positives and increasing accuracy.
Removed
- Default logger.
- Multithreaded processing.