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-24337: Change raw formatters to use base API changes #220

Merged
merged 2 commits into from Apr 3, 2020

Conversation

timj
Copy link
Member

@timj timj commented Apr 3, 2020

Rather than separate calls for different types of components we now have a generic readComponent method.

timj added 2 commits April 3, 2020 13:13
Instead of separate methods for reading image components
and info components, now have unified interface for any
component.
Copy link
Collaborator

@parejkoj parejkoj left a comment

Choose a reason for hiding this comment

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

Thanks for the added test. I think you can remove the parameters arg.

@@ -271,46 +271,34 @@ def makeFilter(self):
"""
return lsst.afw.image.Filter(self.observationInfo.physical_filter)

def readImageComponent(self, component):
"""Read the image, mask, or variance component of an Exposure.
def readComponent(self, component, parameters=None):
Copy link
Collaborator

Choose a reason for hiding this comment

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

I don't see parameters used anywhere in the method.

Copy link
Member Author

Choose a reason for hiding this comment

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

Correct. The base class requires the argument though since the butler may pass parameters in. Parameters are not used by any of the raw formatter code so this is a long standing issue. I made a comment on the Jira ticket. At some point we need to decide what parameters make sense for raw formatter (maybe only bounding box) and complain if any others turn up. Currently the storage class defines the allowed parameters and that might lead to a special RawExposure storage class that defines a different set.

@timj timj merged commit 74b054e into master Apr 3, 2020
@timj timj deleted the tickets/DM-24337 branch April 3, 2020 23:24
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