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-29017: Update visitSummary catalogs to use detector id as index. #477

Merged
merged 1 commit into from Mar 3, 2021

Conversation

erykoff
Copy link
Contributor

@erykoff erykoff commented Mar 3, 2021

No description provided.

Copy link
Contributor

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

Two comments that may not require any actual changes.

@@ -1041,7 +1043,7 @@ def _combineExposureMetadata(self, visit, dataRefs, isGen3=True):

rec['physical_filter'] = filterLabel.physicalLabel if filterLabel.hasPhysicalLabel() else ""
rec['band'] = filterLabel.bandLabel if filterLabel.hasBandLabel() else ""
rec['detector_id'] = detector.getId()
rec['id'] = detector.getId()
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't know that it makes any real difference, but you can also do rec.setId(detector.getId()) here, since every Catalog has id.

@@ -1058,6 +1060,12 @@ def _combineExposureMetadata(self, visit, dataRefs, isGen3=True):
rec['raCorners'][:] = [sph.getRa().asDegrees() for sph in sph_pts]
rec['decCorners'][:] = [sph.getDec().asDegrees() for sph in sph_pts]

metadata = dafBase.PropertyList()
metadata.add("COMMENT", "Catalog id is detector id, sorted.")
metadata.add("COMMENT", "Only detectors with data have entries.")
Copy link
Contributor

Choose a reason for hiding this comment

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

I guess this latter comment is true in this case because we're iterating over dataRefs. It wasn't entirely obvious to me at first.

@erykoff erykoff merged commit 7832a3a into master Mar 3, 2021
@erykoff erykoff deleted the tickets/DM-29017 branch March 3, 2021 23:27
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