Skip to content

Conversation

@hpparvi
Copy link
Contributor

@hpparvi hpparvi commented Jan 9, 2026

This PR adds uncertainty propagation to BoxcarExtract so that uncertainties from 2D input images are properly propagated to the extracted 1D spectrum. The approach supports VarianceUncertainty, StdDevUncertainty, and InverseVariance uncertainty types, and the PR includes a full set of tests for the functionality.

… various uncertainty types (`VarianceUncertainty`, `StdDevUncertainty`, `InverseVariance`), and added associated unit tests.
@hpparvi hpparvi linked an issue Jan 9, 2026 that may be closed by this pull request
@codecov
Copy link

codecov bot commented Jan 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 89.76%. Comparing base (b3bebfc) to head (2126702).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #295      +/-   ##
==========================================
+ Coverage   89.67%   89.76%   +0.09%     
==========================================
  Files          17       17              
  Lines        1801     1817      +16     
==========================================
+ Hits         1615     1631      +16     
  Misses        186      186              

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

@tepickering
Copy link
Contributor

it looks like this and #296 have overlapping changes. at first glance it looks like #296 is based off the changes here which means either this should be merged first or just ignore this one and do everything in #296. it also looks like this and #296 mostly supercedes #286. we will want to reconcile that and see what we can still incorporate from there.

@hpparvi
Copy link
Contributor Author

hpparvi commented Jan 12, 2026

The two PRs don't have overlapping changes, even though they both change the same files. I revised the Boxcar extraction first and decided to revise the Horne extraction in a separate PR to keep the PRs easy to review. However, this was before I realised how minimal the changes to the Horne extraction would be... I can combine the Horne extraction PR with this one if you prefer, or we can merge the two PRs separately.

And yes, these two supersede #286. I've been looking into the PR and think we can probably incorporate at least some of the tests. However, I'd prefer to see what we can do here after we have merged these two PRs.

- Cleaned up the related unit tests a bit.
Copy link
Contributor

@tepickering tepickering left a comment

Choose a reason for hiding this comment

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

my bad not looking close enough to see the changes were actually not overlapping. the way github displayed the diffs made them look so similar. which implies there may be some redundancy that could be refactored out at some point. at any rate, these changes are good to go so merge at will.

@hpparvi hpparvi merged commit e2baedb into astropy:main Jan 13, 2026
11 of 12 checks passed
@hpparvi hpparvi deleted the boxcar_extract_errors branch January 13, 2026 19:48
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Include error propagation to spectrum extraction

2 participants