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-28570: Take both width and height for cutouts #461
Conversation
62d3bf8
to
d5dd861
Compare
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.
This looks like a useful update. I have two minor suggestions for your consideration.
@@ -104,10 +104,11 @@ def run(self, in_table, calexp): | |||
pt = geom.SpherePoint(geom.Angle(ra, geom.degrees), | |||
geom.Angle(dec, geom.degrees)) | |||
pix = wcs.skyToPixel(pt) | |||
size = rec['size'].value | |||
width = rec['xspan'].value | |||
height = rec['yspan'].value |
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.
Please consider using xspan
and yspan
for variable names, in order to make it more obvious where they come from.
I can see arguments both ways. If you prefer what you have then by all means keep it.
@@ -45,7 +45,7 @@ class CalexpCutoutTaskConfig(pipeBase.PipelineTaskConfig, | |||
|
|||
class CalexpCutoutTask(pipeBase.PipelineTask): | |||
"""Task for computing cutouts on a specific calexp given | |||
positions and sizes of the stamps. | |||
positions, widths, and heights of the stamps. |
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.
I strongly suggest adding the words xspan and yspan here, to make it clearer which table columns are needed. For example:
given position, xspan (width), and yspan (height).
85cb4bc
to
88d3832
Compare
88d3832
to
082d6b4
Compare
No description provided.