Skip to content

Add error propagation estimates for BoxcarExtract and HorneExtract #286

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

harry353
Copy link

This changes how uncertainties are handled in:

  • BoxcarExtract.__call__
  • HorneExtract.__call__
  • HorneExtract._fit_gaussian_spatial_profile

as described in #282. Now they:

  • Work correctly with both standard deviation and variance uncertainties.
  • Pass the right uncertainty through to the extracted 1D spectrum.
  • Keep units consistent.
  • Handle NaNs and masked pixels better when fitting the Gaussian profile.

Also, I have added test scripts under the tests directory, as well as a .ipynb file for the Horne case with some examples.

@harry353
Copy link
Author

Also currently working on issue #281 as well

Copy link

codecov bot commented Aug 14, 2025

Codecov Report

❌ Patch coverage is 75.75758% with 32 lines in your changes missing coverage. Please review.
✅ Project coverage is 86.22%. Comparing base (0cfc970) to head (0f85d34).

Files with missing lines Patch % Lines
specreduce/extract.py 75.75% 32 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #286      +/-   ##
==========================================
- Coverage   87.11%   86.22%   -0.90%     
==========================================
  Files          15       15              
  Lines        1281     1394     +113     
==========================================
+ Hits         1116     1202      +86     
- Misses        165      192      +27     

☔ 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.

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.

1 participant