Skip to content

#553 update direction frame determination#556

Open
dmehring wants to merge 9 commits intomainfrom
553-xradioimagewrite_image-silently-does-nothing-for-casa-image
Open

#553 update direction frame determination#556
dmehring wants to merge 9 commits intomainfrom
553-xradioimagewrite_image-silently-does-nothing-for-casa-image

Conversation

@dmehring
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Updates CASA image writing to determine the direction coordinate system from either reference_direction.attrs.equinox or reference_direction.attrs.frame, and adds regression tests for the new behavior.

Changes:

  • Update CASA direction coordinate metadata generation to fall back to frame when equinox is missing and raise a clear error when neither is present.
  • Add unit tests validating CASA writes when equinox is absent and when both equinox and frame are missing.
  • Introduce a small test helper to build a minimal SKY image dataset for these coordinate-write tests.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
src/xradio/image/_util/_casacore/xds_to_casacore.py Adds frame fallback (and an explicit error) for determining CASA direction system during write.
tests/unit/image/test_image.py Adds new regression tests and a helper dataset builder for CASA direction-frame determination.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

dmehring and others added 4 commits March 20, 2026 17:12
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
@codecov
Copy link
Copy Markdown

codecov bot commented Mar 20, 2026

Codecov Report

❌ Patch coverage is 85.71429% with 2 lines in your changes missing coverage. Please review.
✅ All tests successful. No failed tests found.

Files with missing lines Patch % Lines
...rc/xradio/image/_util/_casacore/xds_to_casacore.py 85.71% 2 Missing ⚠️

📢 Thoughts on this report? Let us know!

@dmehring
Copy link
Copy Markdown
Collaborator Author

dmehring commented Mar 20, 2026

This fixes the ICRS issue illustrated by this data set and in general improves the xradio/astropy -> casacore direction frame mapping.

This cannot resolve the actual ticket for which this ticket was opened as the data_groups data_var mismatch happened upstream so that needs to be traced to its root cause before it can be addressed. The workaround is as shown in the ticket; add the necessary sky mapping to the base data group by hand.

@dmehring dmehring requested a review from Jan-Willem March 20, 2026 22:54
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.

xradio.image.write_image silently does nothing for casa image

2 participants