Skip to content

Commit

Permalink
Add backwards-compatibility "decl" column
Browse files Browse the repository at this point in the history
Add `decl` as a duplicate of `dec` to sourceTable_tract,
CcdVisit, and Visit, with a comment about its future removal.
  • Loading branch information
parejkoj committed Jun 2, 2023
1 parent 811be50 commit e45c489
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 0 deletions.
10 changes: 10 additions & 0 deletions python/lsst/pipe/tasks/postprocess.py
Original file line number Diff line number Diff line change
Expand Up @@ -1462,6 +1462,11 @@ def run(self, visitSummaryRefs):
# Technically you should join to get the visit from the visit
# table.
ccdEntry = ccdEntry.rename(columns={"visit": "visitId"})

# RFC-924: Temporarily keep a duplicate "decl" entry for backwards
# compatibility. To be removed after September 2023.
ccdEntry["decl"] = ccdEntry.loc[:, "dec"]

ccdEntry['ccdVisitId'] = [
self.config.idGenerator.apply(
visitSummaryRef.dataId,
Expand Down Expand Up @@ -1567,6 +1572,11 @@ def run(self, visitSummaries):
raDec = visitInfo.getBoresightRaDec()
visitEntry["ra"] = raDec.getRa().asDegrees()
visitEntry["dec"] = raDec.getDec().asDegrees()

# RFC-924: Temporarily keep a duplicate "decl" entry for backwards
# compatibility. To be removed after September 2023.
visitEntry["decl"] = visitEntry.loc[:, "dec"]

visitEntry["skyRotation"] = visitInfo.getBoresightRotAngle().asDegrees()
azAlt = visitInfo.getBoresightAzAlt()
visitEntry["azimuth"] = azAlt.getLongitude().asDegrees()
Expand Down
8 changes: 8 additions & 0 deletions schemas/Object.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,14 @@ funcs:
functor: CoordColumn
args: coord_dec
dataset: meas

# RFC-924: Temporarily keep a duplicate "decl" entry for backwards
# compatibility. To be removed after September 2023.
decl:
functor: CoordColumn
args: coord_dec
dataset: meas

# raErr: not available yet DM-15180
# decErr: not available yet DM-15180
# Reference band is same for all measurements
Expand Down
6 changes: 6 additions & 0 deletions schemas/Source.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,12 @@ funcs:
# raErr: not available yet DM-15180
dec:
functor: DecColumn

# RFC-924: Temporarily keep a duplicate "decl" entry for backwards
# compatibility. To be removed after September 2023.
decl:
functor: DecColumn

# decErr: not available yet DM-15180
# ra_dec_Cov: not available yet
# One calibrated Calib flux is important:
Expand Down

0 comments on commit e45c489

Please sign in to comment.