Details
-
Type:
Bug
-
Status: Done
-
Resolution: Done
-
Fix Version/s: None
-
Component/s: meas_base
-
Labels:None
-
Story Points:1
-
Epic Link:
-
Team:Data Release Production
-
Urgent?:No
Description
Erin Sheldon reports that the following snippet crashes:
from lsst.afw.image import ExposureF, MaskedImageF |
from lsst.meas.base import NoiseReplacerConfig, NoiseReplacer |
|
|
mi = MaskedImageF(20, 10) |
mi.set((1, 0x0, 0.1)) |
exposure = ExposureF(mi) |
|
config = NoiseReplacerConfig() |
config.noiseSource = 'variance' |
replacer = NoiseReplacer( |
config,
|
exposure=exposure, |
footprints={}, |
)
|
This reports AttributeError: 'VariancePlaneNoiseGenerator' object has no attribute 'std'.
The lines here https://github.com/lsst/meas_base/blob/61eb88f8e6ad679bbf4d7d3435e00684a9ab19a1/python/lsst/meas/base/noiseReplacer.py#L198-L200 seem to be the offenders.
This ticket will add a simple test for config.noiseSource='variance' and make sure it works.
OK all done, minor comments on PR.