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-28570: Take both width and height for cutouts #461

Merged
merged 2 commits into from Feb 4, 2021

Conversation

SimonKrughoff
Copy link
Contributor

No description provided.

Copy link
Contributor

@r-owen r-owen left a 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
Copy link
Contributor

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.
Copy link
Contributor

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).

@SimonKrughoff SimonKrughoff force-pushed the tickets/DM-28570 branch 2 times, most recently from 85cb4bc to 88d3832 Compare February 4, 2021 22:37
@SimonKrughoff SimonKrughoff merged commit 5ddf180 into master Feb 4, 2021
@SimonKrughoff SimonKrughoff deleted the tickets/DM-28570 branch February 4, 2021 23:51
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.

None yet

2 participants