Beispiel #1
0
 def testConditionDcrModelNoChangeHighGain(self):
     """Conditioning should not change the model if it equals the reference.
     """
     modelImages = self.makeTestImages()
     dcrModels = DcrModel(modelImages=modelImages, mask=self.mask)
     newModels = [model.clone() for model in dcrModels]
     dcrModels.conditionDcrModel(newModels, self.bbox, gain=3.)
     for refModel, newModel in zip(dcrModels, newModels):
         self.assertFloatsAlmostEqual(refModel.array, newModel.array)
 def testConditionDcrModelNoChangeHighGain(self):
     """Conditioning should not change the model if it equals the reference.
     """
     modelImages = self.makeTestImages()
     dcrModels = DcrModel(modelImages=modelImages, mask=self.mask)
     newModels = [model.clone() for model in dcrModels]
     dcrModels.conditionDcrModel(newModels, self.bbox, gain=3.)
     for refModel, newModel in zip(dcrModels, newModels):
         self.assertFloatsAlmostEqual(refModel.array, newModel.array)
Beispiel #3
0
 def testConditionDcrModelNoChange(self):
     """Conditioning should not change the model if it equals the reference.
     """
     modelImages = self.makeTestImages()
     dcrModels = DcrModel(modelImages=modelImages,
                          mask=self.mask,
                          effectiveWavelength=self.effectiveWavelength,
                          bandwidth=self.bandwidth)
     newModels = [model.clone() for model in dcrModels]
     dcrModels.conditionDcrModel(newModels, self.bbox, gain=1.)
     for refModel, newModel in zip(dcrModels, newModels):
         self.assertFloatsAlmostEqual(refModel.array, newModel.array)
Beispiel #4
0
 def testConditionDcrModelWithChange(self):
     """Verify conditioning when the model changes by a known amount.
     """
     modelImages = self.makeTestImages()
     dcrModels = DcrModel(modelImages=modelImages, mask=self.mask)
     newModels = [model.clone() for model in dcrModels]
     for model in newModels:
         model.array[:] *= 3.
     dcrModels.conditionDcrModel(newModels, self.bbox, gain=1.)
     for refModel, newModel in zip(dcrModels, newModels):
         refModel.array[:] *= 2.
         self.assertFloatsAlmostEqual(refModel.array, newModel.array)
 def testConditionDcrModelWithChange(self):
     """Verify conditioning when the model changes by a known amount.
     """
     modelImages = self.makeTestImages()
     dcrModels = DcrModel(modelImages=modelImages, mask=self.mask)
     newModels = [model.clone() for model in dcrModels]
     for model in newModels:
         model.array[:] *= 3.
     dcrModels.conditionDcrModel(newModels, self.bbox, gain=1.)
     for refModel, newModel in zip(dcrModels, newModels):
         refModel.array[:] *= 2.
         self.assertFloatsAlmostEqual(refModel.array, newModel.array)