Skip to content

Commit

Permalink
Properly reserve memory for refcat conversion.
Browse files Browse the repository at this point in the history
  • Loading branch information
erykoff committed Apr 26, 2022
1 parent 2f5a083 commit b1808c2
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion python/lsst/meas/algorithms/loadReferenceObjects.py
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ def convertToNanojansky(catalog, log, doConvert=True):
if doConvert:
newSchema = mapper.getOutputSchema()
output = afwTable.SimpleCatalog(newSchema)
output.reserve(len(catalog))
output.extend(catalog, mapper=mapper)
for field in output_fields:
output[field.getName()] *= 1e9
Expand Down Expand Up @@ -758,7 +759,7 @@ class ReferenceObjectLoader(ReferenceObjectLoaderBase):
dataIds : iterable of `lsst.daf.butler.DataCoordinate`
An iterable object of data IDs that point to reference catalogs
in a gen 3 repository.
refCats : iterable of `lsst.daf.butler.DeferedDatasetHandle`
refCats : iterable of `lsst.daf.butler.DeferredDatasetHandle`
Handles to load refCats on demand
log : `lsst.log.Log`, `logging.Logger` or `None`, optional
Logger object used to write out messages. If `None` a default
Expand Down

0 comments on commit b1808c2

Please sign in to comment.