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

WIP: Add function to irregularly rebin data in N dimensions #109

Merged
merged 10 commits into from
May 14, 2024

Conversation

DanRyanIrish
Copy link
Contributor

@DanRyanIrish DanRyanIrish commented May 2, 2024

To Do:

  • Make function accept an NDCube instance, strip the data and mask, and return the rebinned data and mask arrays.
  • Make function propagate uncertainties
  • Interpolate all coordinate grids
  • Construct new WCS using gwcs and ndcube TableCoordinates from adapted coordinate values
  • Think how to handle axis-aware sliceable metadata
  • Make function return same NDCube type as input cube.

Copy link

codecov bot commented May 2, 2024

Codecov Report

Attention: Patch coverage is 16.78832% with 114 lines in your changes are missing coverage. Please review.

Project coverage is 26.65%. Comparing base (d44a1c8) to head (bd428a0).

Files Patch % Lines
stixpy/coordinates/transforms.py 18.29% 67 Missing ⚠️
stixpy/calibration/visibility.py 6.06% 31 Missing ⚠️
stixpy/map/stix.py 0.00% 7 Missing ⚠️
stixpy/product/sources/science.py 37.50% 5 Missing ⚠️
stixpy/calibration/energy.py 33.33% 2 Missing ⚠️
stixpy/io/readers.py 33.33% 2 Missing ⚠️
Additional details and impacted files
@@              Coverage Diff              @@
##           ndcubify     #109       +/-   ##
=============================================
- Coverage     66.33%   26.65%   -39.69%     
=============================================
  Files            31       31               
  Lines          1821     1887       +66     
=============================================
- Hits           1208      503      -705     
- Misses          613     1384      +771     

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

@DanRyanIrish DanRyanIrish marked this pull request as draft May 2, 2024 17:27
paolomassa and others added 2 commits May 3, 2024 22:16
Calibration fixes

- Fixed ELUT correction
- Implemented ELUT correction for count erros
- Defined Energy Edge Masks
- Implemented background subtraction in the demo

---------

Co-authored-by: Shane Maloney <[email protected]>
* Make STIXFrame work nicely with `Map`.
* Apply suggestions from code review
* Fix docs and STIX map axis labels
* Change logs and docs

---------
Co-authored-by: DanRyanIrish <[email protected]>
samaloney and others added 2 commits May 8, 2024 14:23
* If time range incompases many time use mean
* If only one time bin interpolate betweeen two nearest bins
* Add correct calculation of STIX pointing in HPC to imaging demo.
* Add changelog for PR 112.
@DanRyanIrish
Copy link
Contributor Author

Regarding the top-level checkpoint on handling sliceable metadata, once this PR is merged into ndcube and released, we could use ndcube.Meta and VisMeta included in the xrayvision Visibility PR as parent classes for a STIXVisMeta class. We could then implement a STIXVisMeta.rebin method that does a certain number of general, but well-defined things to the visibilities metadata on rebinning, e.g. adding the detector string labels together so we can see which detectors are included in a rebinned bin.

@DanRyanIrish
Copy link
Contributor Author

@samaloney Could you merge/backport #106 and #107 into the TCDSolar ndcubify branch to make the diff more readable?

@samaloney samaloney merged commit bd428a0 into TCDSolar:ndcubify May 14, 2024
4 of 10 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.

3 participants