Skip to content

Version 0.17.13 - #200

Merged
LukasAdamowicz merged 5 commits into
mainfrom
development
May 19, 2026
Merged

LukasAdamowicz merged 5 commits into
mainfrom
development

Conversation

@LukasAdamowicz

Copy link
Copy Markdown
Collaborator

Changes

  • Adjust threshold wear to handle wear periods at the end of recordings better
  • Saving of epoch data for activity during sleep periods as well

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Version bump to 0.17.13 that improves wear-detection handling at the end of a recording (no longer drops the trailing partial windows) and extends activity epoch-data saving to include sleep periods in addition to wake periods. The corresponding shipping/wear test fixture is reworked to exercise more realistic end-of-recording cases.

Changes:

  • Wear detection: compute moving stats with trim=False, propagate the last valid non-wear value into the trailing partial windows, and clip resulting wear stop indices to time.size - 1.
  • Activity: add a 'state' field ('wake'/'sleep') to epoch_data, plumb time into _compute_sleep_activity_endpoints, and call _handle_epoch_data during sleep periods too.
  • Updated tests/preprocessing/conftest.py wear fixture and meson.build version to 0.17.13.

Reviewed changes

Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.

File Description
meson.build Version bumped to 0.17.13
src/skdh/preprocessing/wear_detection.py Use untrimmed moving windows, fill trailing NaN windows with last valid value, clip wear stops to recording length
src/skdh/activity/core.py Add state to epoch_data; pass time to _compute_sleep_activity_endpoints; record sleep-period epoch data
tests/preprocessing/conftest.py Updated wear fixture to add end-of-recording wear bouts and rewrote shipping-criteria masking

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/skdh/activity/core.py
Comment on lines +653 to +660
# handle saving the epoch data
self._handle_epoch_data(
n_wlen,
fs,
time[start:stop],
acc_metric,
'sleep',
)
Comment thread src/skdh/activity/core.py Resolved
@LukasAdamowicz
LukasAdamowicz merged commit da6b244 into main May 19, 2026
8 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

2 participants