Skip to content

Commit

Permalink
Prohibit SubtractBackgroundConfig.algorithm=None
Browse files Browse the repository at this point in the history
In the old code SubtractConfig.validate would automatically
change algorithm=None to "None". This seemed a strange thing
to do, and not a very good way to do it. Instead drop support for None.
  • Loading branch information
r-owen committed May 4, 2016
1 parent c73851c commit 2818519
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions python/lsst/meas/algorithms/subtractBackground.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ class SubtractBackgroundConfig(pexConfig.Config):
)
binSize = pexConfig.RangeField(
doc="how large a region of the sky should be used for each background point",
dtype=int, default=256, min=10,
dtype=int, default=256, min=1,
)
algorithm = pexConfig.ChoiceField(
doc="how to interpolate the background values. This maps to an enum; see afw::math::Background",
Expand Down Expand Up @@ -101,12 +101,6 @@ class SubtractBackgroundConfig(pexConfig.Config):
dtype=bool, default=True,
)

def validate(self):
pexConfig.Config.validate(self)
# Allow None to be used as an equivalent for "NONE", even though C++ expects the latter.
if self.algorithm is None:
self.algorithm = "NONE"


## \addtogroup LSST_task_documentation
## \{
Expand Down

0 comments on commit 2818519

Please sign in to comment.