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

Add an option to label ccd serial number on the showVisitSkyMap.py plot #2

Merged
merged 1 commit into from Jul 14, 2016

Conversation

piehlsam
Copy link
Contributor

No description provided.

@piehlsam piehlsam force-pushed the tickets/DM-6903 branch 3 times, most recently from 26ed165 to cc135b7 Compare July 14, 2016 16:25
if showCcds:
minPoint = afwGeom.Point2D(min(ra), min(dec))
maxPoint = afwGeom.Point2D(max(ra), max(dec))
currentBbox = afwGeom.Box2D(minPoint, maxPoint)

Choose a reason for hiding this comment

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

Is this currentBbox the same as the bbox a few lines earlier? If so, maybe no need to create a new one?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The earlier bbox is a Box2I, which has integer values for the corners. The
right ascension and declination are then returned from the function
bboxToRaDec. It seems when the program runs, the bbox loaded from each ccd
have the same integer values for their corners, making it impossible to
check overlaps with the bbox instances. The currentBbox is a Box2D (with
double values for the corners), which are constructed using the extracted
Ra and Dec values from the bbox, which we can then use to check overlaps.

Maybe the currentBbox should be renamed to make this less obscure?

On Thu, Jul 14, 2016 at 11:36 AM, hchiang2 notifications@github.com wrote:

In examples/showVisitSkyMap.py
#2 (comment):

@@ -71,6 +72,16 @@ def main(rootDir, tract, visits, ccds=None, ccdKey='ccd', showPatch=False, saveF
decs += dec
color = ('r', 'b', 'c', 'g', 'm')[i_v%5]
pyplot.fill(ra, dec, fill=True, alpha=0.2, color=color, edgecolor=color)

  •                if showCcds:
    
  •                    minPoint = afwGeom.Point2D(min(ra), min(dec))
    
  •                    maxPoint = afwGeom.Point2D(max(ra), max(dec))
    
  •                    currentBbox = afwGeom.Box2D(minPoint, maxPoint)
    

Is this currentBbox the same as the bbox a few lines earlier? If so,
maybe no need to create a new one?


You are receiving this because you authored the thread.
Reply to this email directly, view it on GitHub
https://github.com/lsst/skymap/pull/2/files/cc135b780f85a91e62a67c306157966969dc51ce#r70838680,
or mute the thread
https://github.com/notifications/unsubscribe/ATEgY4Kt7f9DGQXYKLkHulYip6MUkjAaks5qVmWJgaJpZM4JLgRS
.

Sam Piehl

Choose a reason for hiding this comment

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

Ah, I see. If I understand correctly, the previous bbox is in the pixel frame so you see same integers for all CCDs.

@piehlsam piehlsam merged commit 0d94c76 into master Jul 14, 2016
@ktlim ktlim deleted the tickets/DM-6903 branch August 25, 2018 05:56
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