Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

sleep.get_total_sleep_time returns 0 instead of nan #57

Open
dado93 opened this issue Nov 7, 2023 · 1 comment
Open

sleep.get_total_sleep_time returns 0 instead of nan #57

dado93 opened this issue Nov 7, 2023 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@dado93
Copy link
Owner

dado93 commented Nov 7, 2023

The function pywearable.sleep.get_total_sleep_time returns 0 when all the columns of the sleepSummary are set to NaN. The function must return NaN in this case.

@dado93 dado93 added the bug Something isn't working label Nov 7, 2023
@dado93 dado93 self-assigned this Nov 7, 2023
@Vaeliss
Copy link
Collaborator

Vaeliss commented Nov 10, 2023

Another way to solve this would be to consider (instead of the sum of the sleep stages columns) only the column durationInMs of the sleep summary, which already by definition doesn't consider awake periods. In this case the sleep stages durations would be nan, but total sleep time wouldn't.

@dado93 dado93 added this to the Release 0.1 version milestone Jan 10, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants