24 from scipy
import ndimage
30 __all__ = [
"DcrModel",
"applyDcr",
"calculateDcr",
"calculateImageParallacticAngle"]
34 """A model of the true sky after correcting chromatic effects. 38 dcrNumSubfilters : `int` 39 Number of sub-filters used to model chromatic effects within a band. 40 modelImages : `list` of `lsst.afw.image.Image` 41 A list of masked images, each containing the model for one subfilter 45 The ``DcrModel`` contains an estimate of the true sky, at a higher 46 wavelength resolution than the input observations. It can be forward- 47 modeled to produce Differential Chromatic Refraction (DCR) matched 48 templates for a given ``Exposure``, and provides utilities for conditioning 49 the model in ``dcrAssembleCoadd`` to avoid oscillating solutions between 50 iterations of forward modeling or between the subfilters of the model. 53 def __init__(self, modelImages, filterInfo=None, psf=None, mask=None, variance=None):
62 def fromImage(cls, maskedImage, dcrNumSubfilters, filterInfo=None, psf=None):
63 """Initialize a DcrModel by dividing a coadd between the subfilters. 67 maskedImage : `lsst.afw.image.MaskedImage` 68 Input coadded image to divide equally between the subfilters. 69 dcrNumSubfilters : `int` 70 Number of sub-filters used to model chromatic effects within a band. 71 filterInfo : `lsst.afw.image.Filter`, optional 72 The filter definition, set in the current instruments' obs package. 73 Required for any calculation of DCR, including making matched templates. 74 psf : `lsst.afw.detection.Psf`, optional 75 Point spread function (PSF) of the model. 76 Required if the ``DcrModel`` will be persisted. 80 dcrModel : `lsst.pipe.tasks.DcrModel` 81 Best fit model of the true sky after correcting chromatic effects. 86 If there are any unmasked NAN values in ``maskedImage``. 90 model = maskedImage.image.clone()
91 mask = maskedImage.mask.clone()
97 variance = maskedImage.variance.clone()
98 variance /= dcrNumSubfilters
99 model /= dcrNumSubfilters
100 modelImages = [model, ]
101 for subfilter
in range(1, dcrNumSubfilters):
102 modelImages.append(model.clone())
103 return cls(modelImages, filterInfo, psf, mask, variance)
106 def fromDataRef(cls, dataRef, datasetType="dcrCoadd", numSubfilters=None, **kwargs):
107 """Load an existing DcrModel from a repository. 111 dataRef : `lsst.daf.persistence.ButlerDataRef` 112 Data reference defining the patch for coaddition and the 114 datasetType : `str`, optional 115 Name of the DcrModel in the registry {"dcrCoadd", "dcrCoadd_sub"} 116 numSubfilters : `int` 117 Number of sub-filters used to model chromatic effects within a band. 119 Additional keyword arguments to pass to look up the model in the data registry. 120 Common keywords and their types include: ``tract``:`str`, ``patch``:`str`, 121 ``bbox``:`lsst.afw.geom.Box2I` 125 dcrModel : `lsst.pipe.tasks.DcrModel` 126 Best fit model of the true sky after correcting chromatic effects. 133 for subfilter
in range(numSubfilters):
134 dcrCoadd = dataRef.get(datasetType, subfilter=subfilter,
135 numSubfilters=numSubfilters, **kwargs)
136 if filterInfo
is None:
137 filterInfo = dcrCoadd.getFilter()
139 psf = dcrCoadd.getPsf()
143 variance = dcrCoadd.variance
144 modelImages.append(dcrCoadd.image)
145 return cls(modelImages, filterInfo, psf, mask, variance)
148 """Return the number of subfilters. 152 dcrNumSubfilters : `int` 153 The number of DCR subfilters in the model. 158 """Iterate over the subfilters of the DCR model. 163 Index of the current ``subfilter`` within the full band. 164 Negative indices are allowed, and count in reverse order 165 from the highest ``subfilter``. 169 modelImage : `lsst.afw.image.Image` 170 The DCR model for the given ``subfilter``. 175 If the requested ``subfilter`` is greater or equal to the number 176 of subfilters in the model. 178 if np.abs(subfilter) >= len(self):
179 raise IndexError(
"subfilter out of bounds.")
183 """Update the model image for one subfilter. 188 Index of the current subfilter within the full band. 189 maskedImage : `lsst.afw.image.Image` 190 The DCR model to set for the given ``subfilter``. 195 If the requested ``subfilter`` is greater or equal to the number 196 of subfilters in the model. 198 If the bounding box of the new image does not match. 200 if np.abs(subfilter) >= len(self):
201 raise IndexError(
"subfilter out of bounds.")
202 if maskedImage.getBBox() != self.
bbox:
203 raise ValueError(
"The bounding box of a subfilter must not change.")
208 """Return the filter of the model. 212 filter : `lsst.afw.image.Filter` 213 The filter definition, set in the current instruments' obs package. 219 """Return the psf of the model. 223 psf : `lsst.afw.detection.Psf` 224 Point spread function (PSF) of the model. 230 """Return the common bounding box of each subfilter image. 234 bbox : `lsst.afw.geom.Box2I` 235 Bounding box of the DCR model. 237 return self[0].getBBox()
241 """Return the common mask of each subfilter image. 245 mask : `lsst.afw.image.Mask` 246 Mask plane of the DCR model. 252 """Return the common variance of each subfilter image. 256 variance : `lsst.afw.image.Image` 257 Variance plane of the DCR model. 262 """Calculate a reference image from the average of the subfilter images. 266 bbox : `lsst.afw.geom.Box2I`, optional 267 Sub-region of the coadd. Returns the entire image if `None`. 271 refImage : `numpy.ndarray` 272 The reference image with no chromatic effects applied. 274 bbox = bbox
or self.
bbox 275 return np.mean([model[bbox].array
for model
in self], axis=0)
277 def assign(self, dcrSubModel, bbox=None):
278 """Update a sub-region of the ``DcrModel`` with new values. 282 dcrSubModel : `lsst.pipe.tasks.DcrModel` 283 New model of the true scene after correcting chromatic effects. 284 bbox : `lsst.afw.geom.Box2I`, optional 285 Sub-region of the coadd. 286 Defaults to the bounding box of ``dcrSubModel``. 291 If the new model has a different number of subfilters. 293 if len(dcrSubModel) != len(self):
294 raise ValueError(
"The number of DCR subfilters must be the same " 295 "between the old and new models.")
296 bbox = bbox
or self.
bbox 297 for model, subModel
in zip(self, dcrSubModel):
298 model.assign(subModel[bbox], bbox)
301 visitInfo=None, bbox=None, wcs=None, mask=None,
302 splitSubfilters=True, splitThreshold=0., amplifyModel=1.):
303 """Create a DCR-matched template image for an exposure. 307 exposure : `lsst.afw.image.Exposure`, optional 308 The input exposure to build a matched template for. 309 May be omitted if all of the metadata is supplied separately 310 order : `int`, optional 311 Interpolation order of the DCR shift. 312 visitInfo : `lsst.afw.image.VisitInfo`, optional 313 Metadata for the exposure. Ignored if ``exposure`` is set. 314 bbox : `lsst.afw.geom.Box2I`, optional 315 Sub-region of the coadd. Ignored if ``exposure`` is set. 316 wcs : `lsst.afw.geom.SkyWcs`, optional 317 Coordinate system definition (wcs) for the exposure. 318 Ignored if ``exposure`` is set. 319 mask : `lsst.afw.image.Mask`, optional 320 reference mask to use for the template image. 321 splitSubfilters : `bool`, optional 322 Calculate DCR for two evenly-spaced wavelengths in each subfilter, 323 instead of at the midpoint. Default: True 324 splitThreshold : `float`, optional 325 Minimum DCR difference within a subfilter required to use ``splitSubfilters`` 326 amplifyModel : `float`, optional 327 Multiplication factor to amplify differences between model planes. 328 Used to speed convergence of iterative forward modeling. 332 templateImage : `lsst.afw.image.ImageF` 333 The DCR-matched template 338 If neither ``exposure`` or all of ``visitInfo``, ``bbox``, and ``wcs`` are set. 341 raise ValueError(
"'filterInfo' must be set for the DcrModel in order to calculate DCR.")
342 if exposure
is not None:
343 visitInfo = exposure.getInfo().getVisitInfo()
344 bbox = exposure.getBBox()
345 wcs = exposure.getInfo().getWcs()
346 elif visitInfo
is None or bbox
is None or wcs
is None:
347 raise ValueError(
"Either exposure or visitInfo, bbox, and wcs must be set.")
348 dcrShift =
calculateDcr(visitInfo, wcs, self.
filter, len(self), splitSubfilters=splitSubfilters)
349 templateImage = afwImage.ImageF(bbox)
351 for subfilter, dcr
in enumerate(dcrShift):
353 model = (self[subfilter][bbox].array - refModel)*amplifyModel + refModel
355 model = self[subfilter][bbox].array
356 templateImage.array +=
applyDcr(model, dcr, splitSubfilters=splitSubfilters,
357 splitThreshold=splitThreshold, order=order)
361 visitInfo=None, bbox=None, wcs=None, mask=None):
362 """Wrapper to create an exposure from a template image. 366 exposure : `lsst.afw.image.Exposure`, optional 367 The input exposure to build a matched template for. 368 May be omitted if all of the metadata is supplied separately 369 visitInfo : `lsst.afw.image.VisitInfo`, optional 370 Metadata for the exposure. Ignored if ``exposure`` is set. 371 bbox : `lsst.afw.geom.Box2I`, optional 372 Sub-region of the coadd. Ignored if ``exposure`` is set. 373 wcs : `lsst.afw.geom.SkyWcs`, optional 374 Coordinate system definition (wcs) for the exposure. 375 Ignored if ``exposure`` is set. 376 mask : `lsst.afw.image.Mask`, optional 377 reference mask to use for the template image. 381 templateExposure : `lsst.afw.image.exposureF` 382 The DCR-matched template 385 bbox = exposure.getBBox()
387 bbox=bbox, wcs=wcs, mask=mask)
388 maskedImage = afwImage.MaskedImageF(bbox)
389 maskedImage.image = templateImage[bbox]
390 maskedImage.mask = self.
mask[bbox]
391 maskedImage.variance = self.
variance[bbox]
392 templateExposure = afwImage.ExposureF(bbox, wcs)
393 templateExposure.setMaskedImage(maskedImage[bbox])
394 templateExposure.setPsf(self.
psf)
395 templateExposure.setFilter(self.
filter)
396 return templateExposure
399 """Average two iterations' solutions to reduce oscillations. 403 modelImages : `list` of `lsst.afw.image.Image` 404 The new DCR model images from the current iteration. 405 The values will be modified in place. 406 bbox : `lsst.afw.geom.Box2I` 407 Sub-region of the coadd 408 gain : `float`, optional 409 Relative weight to give the new solution when updating the model. 410 Defaults to 1.0, which gives equal weight to both solutions. 413 for model, newModel
in zip(self, modelImages):
415 newModel += model[bbox]
416 newModel /= 1. + gain
419 regularizationWidth=2):
420 """Restrict large variations in the model between iterations. 425 Index of the current subfilter within the full band. 426 newModel : `lsst.afw.image.Image` 427 The new DCR model for one subfilter from the current iteration. 428 Values in ``newModel`` that are extreme compared with the last 429 iteration are modified in place. 430 bbox : `lsst.afw.geom.Box2I` 432 regularizationFactor : `float` 433 Maximum relative change of the model allowed between iterations. 434 regularizationWidth : int, optional 435 Minimum radius of a region to include in regularization, in pixels. 437 refImage = self[subfilter][bbox].array
438 highThreshold = np.abs(refImage)*regularizationFactor
439 lowThreshold = refImage/regularizationFactor
440 newImage = newModel.array
442 regularizationWidth=regularizationWidth)
445 regularizationWidth=2, mask=None, convergenceMaskPlanes="DETECTED"):
446 """Restrict large variations in the model between subfilters. 450 modelImages : `list` of `lsst.afw.image.Image` 451 The new DCR model images from the current iteration. 452 The values will be modified in place. 453 bbox : `lsst.afw.geom.Box2I` 455 statsCtrl : `lsst.afw.math.StatisticsControl` 456 Statistics control object for coaddition. 457 regularizationFactor : `float` 458 Maximum relative change of the model allowed between subfilters. 459 regularizationWidth : `int`, optional 460 Minimum radius of a region to include in regularization, in pixels. 461 mask : `lsst.afw.image.Mask`, optional 462 Optional alternate mask 463 convergenceMaskPlanes : `list` of `str`, or `str`, optional 464 Mask planes to use to calculate convergence. 468 This implementation of frequency regularization restricts each subfilter 469 image to be a smoothly-varying function times a reference image. 473 maxDiff = np.sqrt(regularizationFactor)
474 noiseLevel = self.
calculateNoiseCutoff(modelImages[0], statsCtrl, bufferSize=5, mask=mask, bbox=bbox)
476 badPixels = np.isnan(referenceImage) | (referenceImage <= 0.)
477 if np.sum(~badPixels) == 0:
480 referenceImage[badPixels] = 0.
481 filterWidth = regularizationWidth
482 fwhm = 2.*filterWidth
485 smoothRef = ndimage.filters.gaussian_filter(referenceImage, filterWidth, mode=
'constant')
488 smoothRef += 3.*noiseLevel
490 lowThreshold = smoothRef/maxDiff
491 highThreshold = smoothRef*maxDiff
492 for model
in modelImages:
494 highThreshold=highThreshold,
495 lowThreshold=lowThreshold,
496 regularizationWidth=regularizationWidth)
497 smoothModel = ndimage.filters.gaussian_filter(model.array, filterWidth, mode=
'constant')
498 smoothModel += 3.*noiseLevel
499 relativeModel = smoothModel/smoothRef
502 relativeModel2 = ndimage.filters.gaussian_filter(relativeModel, filterWidth/alpha)
503 relativeModel += alpha*(relativeModel - relativeModel2)
504 model.array = relativeModel*referenceImage
507 convergenceMaskPlanes="DETECTED", mask=None, bbox=None):
508 """Helper function to calculate the background noise level of an image. 512 image : `lsst.afw.image.Image` 513 The input image to evaluate the background noise properties. 514 statsCtrl : `lsst.afw.math.StatisticsControl` 515 Statistics control object for coaddition. 517 Number of additional pixels to exclude 518 from the edges of the bounding box. 519 convergenceMaskPlanes : `list` of `str`, or `str` 520 Mask planes to use to calculate convergence. 521 mask : `lsst.afw.image.Mask`, Optional 522 Optional alternate mask 523 bbox : `lsst.afw.geom.Box2I`, optional 524 Sub-region of the masked image to calculate the noise level over. 528 noiseCutoff : `float` 529 The threshold value to treat pixels as noise in an image.. 534 mask = self.
mask[bbox]
535 bboxShrink = afwGeom.Box2I(bbox)
536 bboxShrink.grow(-bufferSize)
537 convergeMask = mask.getPlaneBitMask(convergenceMaskPlanes)
539 backgroundPixels = mask[bboxShrink].array & (statsCtrl.getAndMask() | convergeMask) == 0
540 noiseCutoff = np.std(image[bboxShrink].array[backgroundPixels])
544 """Restrict image values to be between upper and lower limits. 546 This method flags all pixels in an image that are outside of the given 547 threshold values. The threshold values are taken from a reference image, 548 so noisy pixels are likely to get flagged. In order to exclude those 549 noisy pixels, the array of flags is eroded and dilated, which removes 550 isolated pixels outside of the thresholds from the list of pixels to be 551 modified. Pixels that remain flagged after this operation have their 552 values set to the appropriate upper or lower threshold value. 556 image : `numpy.ndarray` 557 The image to apply the thresholds to. 558 The values will be modified in place. 559 highThreshold : `numpy.ndarray`, optional 560 Array of upper limit values for each pixel of ``image``. 561 lowThreshold : `numpy.ndarray`, optional 562 Array of lower limit values for each pixel of ``image``. 563 regularizationWidth : `int`, optional 564 Minimum radius of a region to include in regularization, in pixels. 569 filterStructure = ndimage.iterate_structure(ndimage.generate_binary_structure(2, 1),
571 if highThreshold
is not None:
572 highPixels = image > highThreshold
573 if regularizationWidth > 0:
575 highPixels = ndimage.morphology.binary_opening(highPixels, structure=filterStructure)
576 image[highPixels] = highThreshold[highPixels]
577 if lowThreshold
is not None:
578 lowPixels = image < lowThreshold
579 if regularizationWidth > 0:
581 lowPixels = ndimage.morphology.binary_opening(lowPixels, structure=filterStructure)
582 image[lowPixels] = lowThreshold[lowPixels]
585 def applyDcr(image, dcr, useInverse=False, splitSubfilters=False, splitThreshold=0.,
586 doPrefilter=True, order=3):
587 """Shift an image along the X and Y directions. 591 image : `numpy.ndarray` 592 The input image to shift. 594 Shift calculated with ``calculateDcr``. 595 Uses numpy axes ordering (Y, X). 596 If ``splitSubfilters`` is set, each element is itself a `tuple` 597 of two `float`, corresponding to the DCR shift at the two wavelengths. 598 Otherwise, each element is a `float` corresponding to the DCR shift at 599 the effective wavelength of the subfilter. 600 useInverse : `bool`, optional 601 Apply the shift in the opposite direction. Default: False 602 splitSubfilters : `bool`, optional 603 Calculate DCR for two evenly-spaced wavelengths in each subfilter, 604 instead of at the midpoint. Default: False 605 splitThreshold : `float`, optional 606 Minimum DCR difference within a subfilter required to use ``splitSubfilters`` 607 doPrefilter : `bool`, optional 608 Spline filter the image before shifting, if set. Filtering is required, 609 so only set to False if the image is already filtered. 610 Filtering takes ~20% of the time of shifting, so if `applyDcr` will be 611 called repeatedly on the same image it is more efficient to precalculate 613 order : `int`, optional 614 The order of the spline interpolation, default is 3. 618 shiftedImage : `numpy.ndarray` 619 A copy of the input image with the specified shift applied. 622 prefilteredImage = ndimage.spline_filter(image, order=order)
624 prefilteredImage = image
626 shiftAmp = np.max(np.abs([_dcr0 - _dcr1
for _dcr0, _dcr1
in zip(dcr[0], dcr[1])]))
627 if shiftAmp >= splitThreshold:
629 shift = [-1.*s
for s
in dcr[0]]
630 shift1 = [-1.*s
for s
in dcr[1]]
634 shiftedImage = ndimage.shift(prefilteredImage, shift, prefilter=
False, order=order)
635 shiftedImage += ndimage.shift(prefilteredImage, shift1, prefilter=
False, order=order)
641 dcr = (np.mean(dcr[0]), np.mean(dcr[1]))
643 shift = [-1.*s
for s
in dcr]
646 shiftedImage = ndimage.shift(prefilteredImage, shift, prefilter=
False, order=order)
650 def calculateDcr(visitInfo, wcs, filterInfo, dcrNumSubfilters, splitSubfilters=False):
651 """Calculate the shift in pixels of an exposure due to DCR. 655 visitInfo : `lsst.afw.image.VisitInfo` 656 Metadata for the exposure. 657 wcs : `lsst.afw.geom.SkyWcs` 658 Coordinate system definition (wcs) for the exposure. 659 filterInfo : `lsst.afw.image.Filter` 660 The filter definition, set in the current instruments' obs package. 661 dcrNumSubfilters : `int` 662 Number of sub-filters used to model chromatic effects within a band. 663 splitSubfilters : `bool`, optional 664 Calculate DCR for two evenly-spaced wavelengths in each subfilter, 665 instead of at the midpoint. Default: False 669 dcrShift : `tuple` of two `float` 670 The 2D shift due to DCR, in pixels. 671 Uses numpy axes ordering (Y, X). 675 weight = [0.75, 0.25]
676 lambdaEff = filterInfo.getFilterProperty().getLambdaEff()
679 diffRefractAmp0 = differentialRefraction(wavelength=wl0, wavelengthRef=lambdaEff,
680 elevation=visitInfo.getBoresightAzAlt().getLatitude(),
681 observatory=visitInfo.getObservatory(),
682 weather=visitInfo.getWeather())
683 diffRefractAmp1 = differentialRefraction(wavelength=wl1, wavelengthRef=lambdaEff,
684 elevation=visitInfo.getBoresightAzAlt().getLatitude(),
685 observatory=visitInfo.getObservatory(),
686 weather=visitInfo.getWeather())
688 diffRefractPix0 = diffRefractAmp0.asArcseconds()/wcs.getPixelScale().asArcseconds()
689 diffRefractPix1 = diffRefractAmp1.asArcseconds()/wcs.getPixelScale().asArcseconds()
690 diffRefractArr = [diffRefractPix0*weight[0] + diffRefractPix1*weight[1],
691 diffRefractPix0*weight[1] + diffRefractPix1*weight[0]]
692 shiftX = [diffRefractPix*np.sin(rotation.asRadians())
for diffRefractPix
in diffRefractArr]
693 shiftY = [diffRefractPix*np.cos(rotation.asRadians())
for diffRefractPix
in diffRefractArr]
694 dcrShift.append(((shiftY[0], shiftX[0]), (shiftY[1], shiftX[1])))
696 diffRefractAmp = (diffRefractAmp0 + diffRefractAmp1)/2.
697 diffRefractPix = diffRefractAmp.asArcseconds()/wcs.getPixelScale().asArcseconds()
698 shiftX = diffRefractPix*np.sin(rotation.asRadians())
699 shiftY = diffRefractPix*np.cos(rotation.asRadians())
700 dcrShift.append((shiftY, shiftX))
705 """Calculate the total sky rotation angle of an exposure. 709 visitInfo : `lsst.afw.image.VisitInfo` 710 Metadata for the exposure. 711 wcs : `lsst.afw.geom.SkyWcs` 712 Coordinate system definition (wcs) for the exposure. 717 The rotation of the image axis, East from North. 718 Equal to the parallactic angle plus any additional rotation of the 720 A rotation angle of 0 degrees is defined with 721 North along the +y axis and East along the +x axis. 722 A rotation angle of 90 degrees is defined with 723 North along the +x axis and East along the -y axis. 725 parAngle = visitInfo.getBoresightParAngle().asRadians()
726 cd = wcs.getCdMatrix()
728 cdAngle = (np.arctan2(-cd[0, 1], cd[0, 0]) + np.arctan2(cd[1, 0], cd[1, 1]))/2.
729 rotAngle = (cdAngle + parAngle)*radians
731 cdAngle = (np.arctan2(cd[0, 1], -cd[0, 0]) + np.arctan2(cd[1, 0], cd[1, 1]))/2.
732 rotAngle = (cdAngle - parAngle)*radians
737 """Iterate over the wavelength endpoints of subfilters. 741 filterInfo : `lsst.afw.image.Filter` 742 The filter definition, set in the current instruments' obs package. 743 dcrNumSubfilters : `int` 744 Number of sub-filters used to model chromatic effects within a band. 748 `tuple` of two `float` 749 The next set of wavelength endpoints for a subfilter, in nm. 751 lambdaMin = filterInfo.getFilterProperty().getLambdaMin()
752 lambdaMax = filterInfo.getFilterProperty().getLambdaMax()
753 wlStep = (lambdaMax - lambdaMin)/dcrNumSubfilters
754 for wl
in np.linspace(lambdaMin, lambdaMax, dcrNumSubfilters, endpoint=
False):
755 yield (wl, wl + wlStep)
def fromImage(cls, maskedImage, dcrNumSubfilters, filterInfo=None, psf=None)
def __setitem__(self, subfilter, maskedImage)
def calculateImageParallacticAngle(visitInfo, wcs)
def applyDcr(image, dcr, useInverse=False, splitSubfilters=False, splitThreshold=0., doPrefilter=True, order=3)
def regularizeModelIter(self, subfilter, newModel, bbox, regularizationFactor, regularizationWidth=2)
def __getitem__(self, subfilter)
def calculateNoiseCutoff(self, image, statsCtrl, bufferSize, convergenceMaskPlanes="DETECTED", mask=None, bbox=None)
def __init__(self, modelImages, filterInfo=None, psf=None, mask=None, variance=None)
def wavelengthGenerator(filterInfo, dcrNumSubfilters)
def applyImageThresholds(self, image, highThreshold=None, lowThreshold=None, regularizationWidth=2)
def buildMatchedExposure(self, exposure=None, visitInfo=None, bbox=None, wcs=None, mask=None)
def fromDataRef(cls, dataRef, datasetType="dcrCoadd", numSubfilters=None, kwargs)
def getReferenceImage(self, bbox=None)
def buildMatchedTemplate(self, exposure=None, order=3, visitInfo=None, bbox=None, wcs=None, mask=None, splitSubfilters=True, splitThreshold=0., amplifyModel=1.)
def assign(self, dcrSubModel, bbox=None)
def calculateDcr(visitInfo, wcs, filterInfo, dcrNumSubfilters, splitSubfilters=False)
def regularizeModelFreq(self, modelImages, bbox, statsCtrl, regularizationFactor, regularizationWidth=2, mask=None, convergenceMaskPlanes="DETECTED")
def conditionDcrModel(self, modelImages, bbox, gain=1.)