-
Notifications
You must be signed in to change notification settings - Fork 8
Enable phase_center inputs to be SkyCoord #77
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
base: main
Are you sure you want to change the base?
Conversation
Good for representing images from unknown instruments.
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #77 +/- ##
=======================================
Coverage ? 15.28%
=======================================
Files ? 8
Lines ? 968
Branches ? 0
=======================================
Hits ? 148
Misses ? 820
Partials ? 0 ☔ View full report in Codecov by Sentry. |
|
Do not merge until #76 is merged. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Copilot reviewed 10 out of 12 changed files in this pull request and generated 1 comment.
Files not reviewed (2)
- changelog/76.feature.rst: Language not supported
- changelog/77.feature.rst: Language not supported
Comments suppressed due to low confidence (2)
xrayvision/visibility.py:484
- Directly comparing SkyCoord objects with '!=' may lead to unexpected results due to floating point precision. Consider using SkyCoord's is_equivalent() method or a comparison based on separation.
if self.phase_center != other.phase_center:
xrayvision/transform.py:164
- [nitpick] The custom attributes 'Tx' and 'Ty' on the SkyCoord object are non-standard and could be confusing. Consider clarifying their purpose or using more conventional attribute names in documentation.
y = generate_xy(m, phase_center.Ty, pixel_size=pixel_size[0]) # type: ignore
| stix_vis.phase_center = SkyCoord(Tx=stix_vis.phase_center[1], Ty=stix_vis.phase_center[0], frame=Projective) | ||
|
|
Copilot
AI
Apr 3, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Indexing a SkyCoord object as if it were a sequence may result in an error since phase_center is expected to be a scalar SkyCoord. Use the existing attributes (e.g. phase_center.Tx and phase_center.Ty) instead of indexing.
| stix_vis.phase_center = SkyCoord(Tx=stix_vis.phase_center[1], Ty=stix_vis.phase_center[0], frame=Projective) | |
| stix_vis.phase_center = SkyCoord(Tx=stix_vis.phase_center.Tx, Ty=stix_vis.phase_center.Ty, frame=Projective) |
This PR enables the
phase_centerinputs to theVisibilitiescalculating functions to be given as aSkyCoord. The result is that theVisibilitiesobject knows its phase center in a valid coordinate frame, and hence enable imaging routines to returnMaps in the same coordinate frame.