Fix sample rate handling and improve HTML report#3
Open
solomon23 wants to merge 2 commits intoAJolly:mainfrom
Open
Fix sample rate handling and improve HTML report#3solomon23 wants to merge 2 commits intoAJolly:mainfrom
solomon23 wants to merge 2 commits intoAJolly:mainfrom
Conversation
The spike detector assumed 1Hz sampling, but the O2Ring S records at 4-second intervals. This caused recording lengths to show ~1/4 of actual time and inflated all per-hour metrics by ~4x. Fix by resampling to 1Hz in load_data() when CSV timestamps indicate non-1s intervals. Also generate a matching 1Hz time axis for charts. Report improvements: - Add year to Date/Time column - Add editable Notes column (extracted from filename remarks) - Remove redundant Night Label column - Uncheck daytime sessions (6am-8pm) by default - Skip detector_results.csv from being analyzed as data - Add explicit white background for dark mode compatibility Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Owner
|
Thanks for yourr changes! can you check against the latest version? And your bot is wrong - the o2ring-s works on 1second resolution, not 4. The older o2ring works on 4 second resolution Hope the project is useful for you |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
load_data()when CSV timestamps indicate non-1s intervals. Works with any sample rate.detector_results.csvfrom analysis, add explicit white background for dark mode viewers.Screenshot
Test plan
_8h_26m.csvshould show ~8h 26m)🤖 Generated with Claude Code