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

add class to compute statistics on the fly #75

Merged
merged 5 commits into from
Sep 12, 2023

Conversation

vmarandon
Copy link
Contributor

Class to compute statistics on the fly using the Welford's algorithm (mean, variance, min, max).

@codecov
Copy link

codecov bot commented Sep 8, 2023

Codecov Report

Patch coverage: 100.00% and project coverage change: +2.53% 🎉

Comparison is base (0c65774) 3.08% compared to head (130ae53) 5.61%.

Additional details and impacted files
@@            Coverage Diff            @@
##           master     #75      +/-   ##
=========================================
+ Coverage    3.08%   5.61%   +2.53%     
=========================================
  Files          36      37       +1     
  Lines        3571    3667      +96     
=========================================
+ Hits          110     206      +96     
  Misses       3461    3461              
Files Changed Coverage Δ
src/nectarchain/utils/stats.py 100.00% <100.00%> (ø)

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@jlenain jlenain left a comment

Choose a reason for hiding this comment

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

Hi @vmarandon ,
Thanks a lot for this! I have one nitpicking request: instead of hardcoding the expected signal shape (number of channels, pixels, time stamps), I would suggest to rely on a single place for it, through ctapipe_io_nectarcam (I use to make the same comment in past PRs).

src/nectarchain/tests/test_stats.py Outdated Show resolved Hide resolved
src/nectarchain/tests/test_stats.py Outdated Show resolved Hide resolved
src/nectarchain/utils/stats.py Outdated Show resolved Hide resolved
src/nectarchain/utils/stats.py Outdated Show resolved Hide resolved
src/nectarchain/utils/stats.py Show resolved Hide resolved
…ples) to use the one from ctapipe_io_nectarcam.constants.py
@jlenain jlenain merged commit 39b677b into cta-observatory:master Sep 12, 2023
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants