Skip to content

added handling of Roman WCS information#4

Open
perrygreenfield wants to merge 1 commit into
asdf-format:mainfrom
perrygreenfield:romanwcs
Open

added handling of Roman WCS information#4
perrygreenfield wants to merge 1 commit into
asdf-format:mainfrom
perrygreenfield:romanwcs

Conversation

@perrygreenfield

Copy link
Copy Markdown
Contributor

This PR adds the ability to create a FITS version of the Roman WCS using the SIP model, which currently is essentially identical to the GWCS version to floating point accuracy, and then transfers that SIP wcs model to ds9 when loading a Roman calibrated image.

If the changes are non-obvious, please explain how they work.
If this PR adds a new feature please include tests and documentation.
If this PR fixes an issue, please add closing keywords (eg 'fixes #XXX')
-->

No AI tools were used.

All AI usage must comply with our AI policy:
https://github.com/asdf-format/.github/blob/main/AI_POLICY.md
-->

Comment thread src/pds9/plugin.py
node = af.tree
return extract_asdf_array(node, alist, af)
im = extract_asdf_array(node, alist, af)
if 'roman' in af.tree:

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Maybe the follow-up mission-specific defaults can modify this logic so:

  • for roman files look in roman.meta.wcs
  • for other files, search for a gwcs instance

Comment thread src/pds9/plugin.py
messagebox.showerror("ASDF Path Error", f"Specified ADSF path component '{value}' not in file")
return
gwcs = node
gwcs = tagged_tree_to_custom_tree(gwcs, ctx)

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Is this tagged_tree_to_custom_tree needed? I would think this gwcs should be a WCS instance at this point.

Comment thread src/pds9/plugin.py
"""
This currently only works for roman data
"""
import sys

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Suggested change
import sys

@braingram braingram left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

LGTM. Left a few comments/nitpicks.

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