Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions python/lsst/ip/diffim/getTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -96,8 +96,15 @@ class GetTemplateConfig(pipeBase.PipelineTaskConfig,
)

def setDefaults(self):
self.warp.warpingKernelName = 'lanczos5'
self.coaddPsf.warpingKernelName = 'lanczos5'
# Use a smaller cache: per SeparableKernel.computeCache, this should
# give a warping error of a fraction of a count (these must match).
self.warp.cacheSize = 100000
self.coaddPsf.cacheSize = self.warp.cacheSize
# The WCS for LSST should be smoothly varying, so we can use a longer
# interpolation length for WCS evaluations.
self.warp.interpLength = 100
self.warp.warpingKernelName = 'lanczos3'
self.coaddPsf.warpingKernelName = self.warp.warpingKernelName


class GetTemplateTask(pipeBase.PipelineTask):
Expand Down
4 changes: 2 additions & 2 deletions tests/test_getTemplate.py
Original file line number Diff line number Diff line change
Expand Up @@ -197,7 +197,7 @@ def _checkPixels(self, template, config, box):
# Variance plane ==2 in the original image, but the warped images will
# have some structure due to the warping.
self.assertImagesAlmostEqual(template.variance, self.exposure[expectedBox].variance,
rtol=0.5, msg="variance planes differ")
rtol=0.55, msg="variance planes differ")
# Not checking the mask, as warping changes the sizes of the masks.

def testRunOneTractInput(self):
Expand Down Expand Up @@ -265,7 +265,7 @@ def testMissingPatches(self):
no_data = (result.template.mask.array & result.template.mask.getPlaneBitMask("NO_DATA")) != 0
self.assertTrue(all(np.isnan(result.template.image.array[no_data])))
self.assertTrue(all(np.isnan(result.template.variance.array[no_data])))
self.assertEqual(no_data.sum(), 22118)
self.assertEqual(no_data.sum(), 21548)


def setup_module(module):
Expand Down