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-25746: filterName in APDB needs to be one of g, r, i, z, or y #92

Merged
merged 1 commit into from
Jul 1, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 2 additions & 1 deletion python/lsst/ap/association/mapApData.py
Original file line number Diff line number Diff line change
Expand Up @@ -232,7 +232,8 @@ def run(self, inputCatalog, exposure, return_pandas=False):
midPointTaiMJD = visit_info.getDate().get(system=DateTime.MJD)
filterId = exposure.getFilter().getId()
# canonical name should always be the abstract filter (in Gen 3 sense)
filterName = exposure.getFilter().getCanonicalName()
# TODO DM-21333: Remove [0] (first character only) workaround
filterName = exposure.getFilter().getCanonicalName()[0]
wcs = exposure.getWcs()

photoCalib = exposure.getPhotoCalib()
Expand Down
3 changes: 2 additions & 1 deletion tests/test_association_task.py
Original file line number Diff line number Diff line change
Expand Up @@ -323,7 +323,8 @@ def _run_association_and_retrieve_objects(self, create_objects=False):
dia_source=dia_source,
flux=10000,
fluxErr=100,
filterName=self.exposure.getFilter().getCanonicalName(),
# TODO DM-21333: Remove [0] (first character only) workaround
filterName=self.exposure.getFilter().getCanonicalName()[0],
filterId=self.exposure.getFilter().getId(),
ccdVisitId=self.exposure.getInfo().getVisitInfo().getExposureId(),
midPointTai=self.exposure.getInfo().getVisitInfo().getDate().get(system=dafBase.DateTime.MJD))
Expand Down
6 changes: 4 additions & 2 deletions tests/test_packageAlerts.py
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,8 @@ def makeDiaSources(nSources, diaObjectIds, exposure):
"diaSourceId": idx,
"pixelId": htmIdx,
"midPointTai": midPointTaiMJD + 1.0 * idx,
"filterName": exposure.getFilter().getCanonicalName(),
# TODO DM-21333: Remove [0] (first character only) workaround
"filterName": exposure.getFilter().getCanonicalName()[0],
"filterId": 0,
"psNdata": 0,
"trailNdata": 0,
Expand Down Expand Up @@ -197,7 +198,8 @@ def makeDiaForcedSources(nSources, diaObjectIds, exposure):
"ccdVisitId": ccdVisitId + idx,
"diaObjectId": objId,
"midPointTai": midPointTaiMJD + 1.0 * idx,
"filterName": exposure.getFilter().getCanonicalName(),
# TODO DM-21333: Remove [0] (first character only) workaround
"filterName": exposure.getFilter().getCanonicalName()[0],
"flags": 0})

return pd.DataFrame(data=data)
Expand Down