Support uncertainty propagation for NDCube reprojection

Open
#876 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
25/100
Issue type
Feature
Clarity
Needs clarification
Activity status
Stale
Tech stack
python
Domain
data

Research direction

Start with NDCube's reproject function and inspect how it currently handles uncertainty, then review reproject's support for pixel areas or combined-pixel counts. Before coding, resolve whether to depend on upstream support or use the proposed approximation; done means an agreed uncertainty-propagation behavior is implemented and verified by relevant tests.

Written by the indexing model from the issue text.

Description

Discussion Upstream Fix Required
Describe the feature

During the SunPy Community Meeting on 2025-07-16, we discussed that NDCube's reproject function drops the uncertainty. @DanRyanIrish asked me to summarize here so we can continue the conversation. It would be good to handle uncertainty more robustly, but that requires caution and may require changes in reproject for full support. PUNCH specifically would benefit from propagating uncertainty during reprojection since we do many reprojections and utilize the uncertainty as a weighting factor when combining images.

Proposed solution

There are a couple options:

  1. The more correct path is to have reproject handle uncertainties or at least supply the information about pixel areas and number of pixels combined for the uncertainty propagation. Then, ndcube could utilize that reproject feature.
  2. The more hacky way is to simply reproject the uncertainty. It's not strictly correct but it's better than nothing and could be good enough in many uses cases.
Dominant language
Python
Stars
49
Forks
56
Avg merge
5h 54m
Merged PRs (30d)
9

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from sunpy/ndcube

All issues in sunpy/ndcube

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.