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

DM-39053: Always use the WCS from VisitInfo if available #455

Merged
merged 3 commits into from May 6, 2023

Conversation

isullivan
Copy link
Contributor

@isullivan isullivan commented May 4, 2023

Requires lsst/afw#687

Copy link
Member

@timj timj left a comment

Choose a reason for hiding this comment

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

Glad that this helps. I have a bit of a worry that this change means we might leak WCS keywords into the returned header but I'll try to look at that elsewhere.

try:
lsst.afw.geom.stripWcsMetadata(self.metadata)
except TypeError as e:
log.warning("Cannot create a valid WCS from metadata: %s", e.args[0])
Copy link
Member

Choose a reason for hiding this comment

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

This warning should no longer exist because this is stripping (which should always work) and not creating a WCS.

@@ -381,4 +383,6 @@ def attachComponentsFromMetadata(self, exposure):
info.setWcs(self.makeWcs(info.getVisitInfo(), info.getDetector()))
# We don't need to call stripMetadata() here because it has already
Copy link
Member

Choose a reason for hiding this comment

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

This comment should be removed.

@isullivan isullivan merged commit 42e83af into main May 6, 2023
3 checks passed
@isullivan isullivan deleted the tickets/DM-39053 branch May 6, 2023 03:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants