Skip to content

Commit

Permalink
Explicitly specify "L" for 64 bit int
Browse files Browse the repository at this point in the history
  • Loading branch information
fred3m authored and mrawls committed Sep 23, 2016
1 parent a5a4635 commit c6f99bd
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions python/lsst/pipe/tasks/mocks/mockCoadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -121,8 +121,8 @@ def __init__(self, **kwds):
self.makeSubtask("mockObject")
self.makeSubtask("mockObservation")
self.schema = lsst.afw.table.SimpleTable.makeMinimalSchema()
self.objectIdKey = self.schema.addField("objectId", type=int, doc="foreign key to truth catalog")
self.exposureIdKey = self.schema.addField("exposureId", type=int,
self.objectIdKey = self.schema.addField("objectId", type="L", doc="foreign key to truth catalog")
self.exposureIdKey = self.schema.addField("exposureId", type="L",
doc="foreign key to observation catalog")
self.centroidInBBoxKey = self.schema.addField(
"centroidInBBox", type="Flag",
Expand Down Expand Up @@ -197,8 +197,8 @@ def buildInputImages(self, butler, obsCatalog=None, truthCatalog=None, tract=0):
if status:
simSrcRecord = simSrcCatalog.addNew()
simSrcRecord.setCoord(truthRecord.getCoord())
simSrcRecord.setI(self.objectIdKey, truthRecord.getId())
simSrcRecord.setI(self.exposureIdKey, obsRecord.getId())
simSrcRecord.setL(self.objectIdKey, truthRecord.getId())
simSrcRecord.setL(self.exposureIdKey, obsRecord.getId())
simSrcRecord.setFlag(self.centroidInBBoxKey, obsRecord.contains(truthRecord.getCoord()))
simSrcRecord.setFlag(self.partialOverlapKey, status == 1)
self.log.info(" added object {id}".format(id=truthRecord.getId()))
Expand Down
2 changes: 1 addition & 1 deletion tests/testCoadds.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ def testCoaddPsf(self, tract=0):
partialOverlapKey = simSrcSchema.find("partialOverlap").key
simSrcByObject = {}
for simSrcRecord in simSrcCat:
simSrcByObject.setdefault(simSrcRecord.getI(objectIdKey), []).append(simSrcRecord)
simSrcByObject.setdefault(simSrcRecord.getL(objectIdKey), []).append(simSrcRecord)
pureObjectIds = set() # set will contain objects that never appear on edges
for objectId, simSrcRecords in simSrcByObject.items():
inAnyImages = False
Expand Down

0 comments on commit c6f99bd

Please sign in to comment.