Skip to content

Commit

Permalink
Merge pull request #1043 from lsst/tickets/DM-49097
Browse files Browse the repository at this point in the history
DM-49097 : Create empty DataFrame rather than convert from Table
  • Loading branch information
Gerenjie authored Feb 22, 2025
2 parents a365f29 + 2ccfca4 commit 9f788e7
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion python/lsst/pipe/tasks/drpAssociationPipe.py
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,10 @@ def visitDetectorPair(dataRef):
unassociatedSsObjects = unassociatedSsObjects[ssObjInTractPatch]
nSsSrc = ssInTractPatch.sum()
nSsObj = ssObjInTractPatch.sum()
diaCat = ssoAssocResult.unAssocDiaSources.to_pandas()
if len(ssoAssocResult.unAssocDiaSources) > 0:
diaCat = ssoAssocResult.unAssocDiaSources.to_pandas()
else:
diaCat = pd.DataFrame(columns=ssoAssocResult.unAssocDiaSources.columns)

diaInTractPatch = self._trimToPatch(diaCat,
innerPatchBox,
Expand Down

0 comments on commit 9f788e7

Please sign in to comment.