Skip to content

Commit ac42437

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 8cf1e69 commit ac42437

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
@@ -853,7 +853,7 @@ class TractBackgroundConfig(Config):
853853
)
854854
doSmooth = Field(dtype=bool, default=False, doc="Do smoothing?")
855855
smoothScale = Field(dtype=float, default=2.0, doc="Smoothing scale, as a multiple of the bin size")
856-
binning = Field(dtype=int, default=64, doc="Binning to use for warp background model (pixels)")
856+
binning = Field(dtype=int, default=200, doc="Binning to use for warp background model (pixels)")
857857

858858

859859
class TractBackground:
@@ -888,8 +888,6 @@ def __init__(self, config, values=None, numbers=None):
888888
----------
889889
config : `TractBackgroundConfig`
890890
Configuration for measuring tract backgrounds.
891-
transform : `lsst.afw.geom.TransformPoint2ToPoint2`
892-
Transformation from tract coordinates to warp coordinates.
893891
values : `lsst.afw.image.ImageF`
894892
Measured background values.
895893
numbers : `lsst.afw.image.ImageF`
@@ -1090,7 +1088,10 @@ def getStatsImage(self):
10901088
"""
10911089
values = self._values.clone()
10921090
values /= self._numbers
1093-
# This old logic doesn't work because everything outside the FP is bad
1091+
# TODO: this logic smoothes over bad parts of the image, including NaN
1092+
# values. But it doesn't work here because NaN pixels are always found
1093+
# at the image edges. Could ignore it, or devise an alternative.
1094+
# tract have no overlap with the visit?
10941095
# thresh = self.config.minFrac * (self.config.xBin) * (self.config.yBin)
10951096
# isBad = self._numbers.getArray() < thresh
10961097
# if self.config.doSmooth:

0 commit comments

Comments
 (0)