Skip to content

Conversation

@jsaffer
Copy link
Collaborator

@jsaffer jsaffer commented Mar 1, 2025

Added the calculation of the standard deviation of the effective area by weighting with squared weights. The default behavior of the function is unchanged, the return type is a single histograms with effective area binned in energy and cos(zenith). If the new argument return_stddev is set to True, a tuple of effective area and its uncertainty is returned.

jsaffer and others added 2 commits March 1, 2025 22:05
Added the calculation of the standard deviation of the effective area by weighting with squared weights. The default behavior of the function is unchanged, the return type is a single histograms with effective area binned in energy and cos(zenith). If the new argument return_stddev is set to True, a tuple of effective area and its uncertainty is returned.
@codecov
Copy link

codecov bot commented Mar 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (bedd1c5) to head (e13a474).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff            @@
##              main       #54   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           12        12           
  Lines          836       840    +4     
=========================================
+ Hits           836       840    +4     

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@github-actions
Copy link

github-actions bot commented Mar 1, 2025

Test Results

    6 files  ±0      6 suites  ±0   2m 33s ⏱️ ±0s
  638 tests ±0    413 ✅ ±0    225 💤 ±0  0 ❌ ±0 
3 828 runs  ±0  2 476 ✅ ±0  1 352 💤 ±0  0 ❌ ±0 

Results for commit e13a474. ± Comparison against base commit bedd1c5.

♻️ This comment has been updated with latest results.

jsaffer and others added 5 commits March 1, 2025 22:31
Making return_stddev a keyword-only argument to address FBT001 and FBT002 and changing from Tuple to tuple (UP006)
undo unintended change
Adding a test for the standard deviation of effective area
@jsaffer
Copy link
Collaborator Author

jsaffer commented Mar 1, 2025

I had to use a return type of NDArray[np.float64] | tuple[NDArray[np.float64], NDArray[np.float64]] because returning a tuple in any case, i.e. a one-element tuple in the default case, would break backward compatibility.

@jsaffer jsaffer added enhancement New feature or request python Pull requests that update Python code labels Mar 1, 2025
@kjmeagher kjmeagher merged commit a9745be into main Apr 7, 2025
13 checks passed
@kjmeagher kjmeagher deleted the Aeff_stddev branch April 7, 2025 19:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request python Pull requests that update Python code

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants