generated from childmindresearch/template-python-repository
-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Bugfix: Change _find_long_blocks to catch leading edge (#91)
* Bugfix: Change _find_long_blocks to catch leading edge Modified _find_long_blocks to use single pointer implementation to find chunks of 1s. Modified tests so that test_find_long_blocks now finds start of 1s in middle and at ending of below_threshold. Modified test_spt_window to simpler implementation to remove odd cases where random num generator of anglez caused unpredictable sleep detection at leading edge * Address PR comments Make functionality of unit test more obvious Fix redundant if statement logic * Update analytics.py Improve algorithm description. * Refactor and bugfix refactor the implementation of find_long_blocks and fill_short_blocks as these functions were duplicates. Now there is a single call, however we use 'above_threshold' and np.logical_not for find_long_blocks implementation Also fix the issue with fill_short_blocks that arose from indentation typo * Fix documentation Small changes to docstrings Define variable for the different epoch lengths explicitly Renam `_fill_false_blocks`
- Loading branch information
Showing
2 changed files
with
44 additions
and
74 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters