Skip to content

Commit c652ce0

Browse files
committed
Full tract background refactor AEW
All methods, including run, updated to function properly with tract backgrounds rather than warps. Task completes without error when run on three full visits, and output appears roughly correct.
1 parent 27b7f90 commit c652ce0

File tree

2 files changed

+253
-180
lines changed

2 files changed

+253
-180
lines changed

python/lsst/pipe/tasks/background.py

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -860,7 +860,7 @@ class TractBackgroundConfig(Config):
860860
)
861861
doSmooth = Field(dtype=bool, default=False, doc="Do smoothing?")
862862
smoothScale = Field(dtype=float, default=2.0, doc="Smoothing scale, as a multiple of the bin size")
863-
binning = Field(dtype=int, default=64, doc="Binning to use for warp background model (pixels)")
863+
binning = Field(dtype=int, default=200, doc="Binning to use for warp background model (pixels)")
864864

865865

866866
class TractBackground:
@@ -895,8 +895,6 @@ def __init__(self, config, values=None, numbers=None):
895895
----------
896896
config : `TractBackgroundConfig`
897897
Configuration for measuring tract backgrounds.
898-
transform : `lsst.afw.geom.TransformPoint2ToPoint2`
899-
Transformation from tract coordinates to warp coordinates.
900898
values : `lsst.afw.image.ImageF`
901899
Measured background values.
902900
numbers : `lsst.afw.image.ImageF`
@@ -1097,7 +1095,10 @@ def getStatsImage(self):
10971095
"""
10981096
values = self._values.clone()
10991097
values /= self._numbers
1100-
# This old logic doesn't work because everything outside the FP is bad
1098+
# TODO: this logic smoothes over bad parts of the image, including NaN
1099+
# values. But it doesn't work here because NaN pixels are always found
1100+
# at the image edges. Could ignore it, or devise an alternative.
1101+
# tract have no overlap with the visit?
11011102
# thresh = self.config.minFrac * (self.config.xBin) * (self.config.yBin)
11021103
# isBad = self._numbers.getArray() < thresh
11031104
# if self.config.doSmooth:

0 commit comments

Comments
 (0)