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

Make STIXFrame work nicely with sunpy Maps #90

Merged
merged 8 commits into from
Apr 30, 2024

Conversation

samaloney
Copy link
Member

Often want/need to do analysis in the STIX frame (really low counts) so need to support repojection and plotting etc. This PR aims to facilitate the creation of maps in the STIXImaging frame and support all the plotting, reprojections etc. Heavily based on what in sunpy coordinates.

  • Register new frame and wcs mapping to astropy
  • Update STIXImage to include observer and rsun

@samaloney
Copy link
Member Author

Well after some serious rabbit holing, mostly on the plotting side finally made some progress. Still lots to fix, improve (transforms are slow due to repeated fido search and fetch calls) and look into (I don't know why the limb is behind, indicated by the dotted line, the Sun).

image

Copy link

codecov bot commented Apr 27, 2024

Codecov Report

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

Project coverage is 66.33%. Comparing base (73f8d02) to head (079da8c).

Files Patch % Lines
stixpy/coordinates/frames.py 96.42% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #90      +/-   ##
==========================================
+ Coverage   64.25%   66.33%   +2.07%     
==========================================
  Files          29       31       +2     
  Lines        1757     1821      +64     
==========================================
+ Hits         1129     1208      +79     
+ Misses        628      613      -15     

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

changelog/90.feature.rst Outdated Show resolved Hide resolved
stixpy/map/stix.py Outdated Show resolved Hide resolved
stixpy/map/stix.py Outdated Show resolved Hide resolved
stixpy/coordinates/frames.py Show resolved Hide resolved
examples/imaging_demo.py Outdated Show resolved Hide resolved
stixpy/coordinates/frames.py Show resolved Hide resolved
stixpy/coordinates/frames.py Outdated Show resolved Hide resolved
stixpy/coordinates/tests/test_frames.py Show resolved Hide resolved
stixpy/coordinates/tests/test_transforms.py Outdated Show resolved Hide resolved
# def spatial_units(self):
# return SpatialPair(u.arcsec, u.arcsec)

def plot(self, **kwargs):
Copy link
Contributor

Choose a reason for hiding this comment

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

FYI for future NDCube-backed Maps, this will have to be moved into a STIXPlotter object which is attached to the STIXMap. It won't change the user-facing API though. However, no action needed on this for now.

@samaloney samaloney changed the title WIP making STIXFrame work nicely with Map. Make STIXFrame work nicely with sunpy Maps Apr 29, 2024
@samaloney samaloney marked this pull request as ready for review April 29, 2024 11:30
@samaloney
Copy link
Member Author

Current plot

image

@samaloney samaloney merged commit d44a1c8 into TCDSolar:main Apr 30, 2024
13 checks passed
samaloney added a commit to paolomassa/stixpy that referenced this pull request May 3, 2024
* Make STIXFrame work nicely with `Map`.
* Apply suggestions from code review
* Fix docs and STIX map axis labels
* Plot axis

---------

Co-authored-by: DanRyanIrish <[email protected]>
@samaloney samaloney deleted the feat-stix-frame-wcs branch May 15, 2024 14:34
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.

2 participants