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

Add generic imaging frame. #76

Open
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

DanRyanIrish
Copy link
Contributor

This PR adds a generic imaging frame via a new coordinates module. This intention is that this frame would be used instead of HPC, which is currently used and is likely incorrect depending on the instrument which produced the visibilities.

Copy link

codecov bot commented Nov 15, 2024

Codecov Report

Attention: Patch coverage is 94.00000% with 3 lines in your changes missing coverage. Please review.

Please upload report for BASE (main@ea833d9). Learn more about missing BASE report.

Files with missing lines Patch % Lines
xrayvision/coordinates/frames.py 94.00% 3 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #76   +/-   ##
=======================================
  Coverage        ?   89.69%           
=======================================
  Files           ?        8           
  Lines           ?      941           
  Branches        ?        0           
=======================================
  Hits            ?      844           
  Misses          ?       97           
  Partials        ?        0           

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

Good for representing images from unknown instruments.
@DanRyanIrish
Copy link
Contributor Author

@samaloney could I get a review on this?

xrayvision/coordinates/frames.py Show resolved Hide resolved
xrayvision/coordinates/frames.py Show resolved Hide resolved
Comment on lines 115 to 120
PROJECTIVE_CTYPE_TO_UCD1 = {
"SXLT": "custom:pos.projective.lat",
"SXLN": "custom:pos.projective.lon",
"SXRZ": "custom:pos.projective.z",
}
astropy.wcs.wcsapi.fitswcs.CTYPE_TO_UCD1.update(PROJECTIVE_CTYPE_TO_UCD1)
Copy link
Member

Choose a reason for hiding this comment

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

This needs to be updated to match the CTYPE above but I think this part can be removed - have you made a plot with and without this included?

This is what I see
image

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Argh. Why is this? The representation is set to arcsec in L22-23 and L27-28. Where else does this need to be fixed?

Copy link
Member

Choose a reason for hiding this comment

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

I think this is expected given the current code - specifically the ctype to UCD mapping might work now?

xrayvision/coordinates/frames.py Outdated Show resolved Hide resolved
xrayvision/coordinates/frames.py Outdated Show resolved Hide resolved
@DanRyanIrish
Copy link
Contributor Author

@samaloney Is this now ready to merge?

Without Ty/Tx, it causes conflicts when using STIXImaging.
THerefore getting changing from Ty/Tx to lat/lon is a bigger
change then shiould be done here.
@DanRyanIrish
Copy link
Contributor Author

@samaloney I think all your comments have been resolved.

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