Skip to content

Commit

Permalink
Merge pull request #50 from lsst/tickets/DM-43771
Browse files Browse the repository at this point in the history
DM-43771: disable warping kernel caching and make sure we do PSF-evaluation caching.
  • Loading branch information
TallJimbo committed Apr 16, 2024
2 parents e5c59d9 + 3bfb96c commit dac1af8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 0 deletions.
1 change: 1 addition & 0 deletions python/lsst/drp/tasks/assemble_coadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -276,6 +276,7 @@ class AssembleCoaddConfig(
def setDefaults(self):
super().setDefaults()
self.badMaskPlanes = ["NO_DATA", "BAD", "SAT", "EDGE"]
self.coaddPsf.cacheSize = 0

def validate(self):
super().validate()
Expand Down
6 changes: 6 additions & 0 deletions python/lsst/drp/tasks/forcedPhotCoadd.py
Original file line number Diff line number Diff line change
Expand Up @@ -320,6 +320,12 @@ def run(self, measCat, exposure, refCat, refWcs, exposureId=None):
Catalog of forced measurement results
(`lsst.afw.table.SourceCatalog`).
"""
# We want to cache repeated PSF evaluations at the same point coming
# from different measurement plugins. We assume each algorithm tries
# to evaluate the PSF twice, which is more than enough since many don't
# evaluate it at all, and there's no *good* reason for any algorithm to
# evaluate it more than once.
exposure.psf.setCacheCapacity(2 * len(self.config.measurement.plugins.names))
self.measurement.run(measCat, exposure, refCat, refWcs, exposureId=exposureId)
if self.config.doApCorr:
self.applyApCorr.run(catalog=measCat, apCorrMap=exposure.getInfo().getApCorrMap())
Expand Down

0 comments on commit dac1af8

Please sign in to comment.