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-47344: Update plotting in cameraGeom to add integer detector ID label #751

Merged
merged 1 commit into from
Nov 3, 2024

Conversation

laurenam
Copy link
Contributor

@laurenam laurenam commented Nov 2, 2024

No description provided.

Currently, the plots are only labeled with the detector's name
as returned by detector.getName().  Many users prefer identifying
detectors by their integer values as returned by detector.getId()
Let's have both!
@laurenam laurenam requested a review from suberlak November 2, 2024 02:23
Copy link

@suberlak suberlak 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 update!

@@ -1022,7 +1022,8 @@ def showCamera(camera, imageSource=FakeImageDataSource(), imageFactory=afwImage.
displayUtils.drawBBox(
bbox, borderWidth=0.5, ctype=ctype, display=display)
dims = bbox.getDimensions()
display.dot(ccd.getName(), bbox.getMinX() + dims.getX()/2, bbox.getMinY() + dims.getY()/2,
ccdLabel = "{}\n[{}]".format(ccd.getName(), ccd.getId())
Copy link

Choose a reason for hiding this comment

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

I guess it doesn't matter much, but was it on purpose that showCcd has {} [{}] and showCamera has {}\n[{}] ( the detId below rather than next to detName )?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed, it was. The one above is a plot "title", so just keeping it in one line seems preferable. For the focal plane labels, we don't have a lot of horizontal real estate, hence the newline.

@laurenam laurenam merged commit 0dd1f48 into main Nov 3, 2024
2 checks passed
@laurenam laurenam deleted the tickets/DM-47344 branch November 3, 2024 19:00
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.

2 participants