trimToMatchCalibBBox¶
- lsst.ip.isr.trimToMatchCalibBBox(rawMaskedImage, calibMaskedImage)¶
Compute number of edge trim pixels to match the calibration data.
Use the dimension difference between the raw exposure and the calibration exposure to compute the edge trim pixels. This trim is applied symmetrically, with the same number of pixels masked on each side.
- Parameters:
- rawMaskedImage
lsst.afw.image.MaskedImage Image to trim.
- calibMaskedImage
lsst.afw.image.MaskedImage Calibration image to draw new bounding box from.
- rawMaskedImage
- Returns:
- replacementMaskedImage
lsst.afw.image.MaskedImage rawMaskedImagetrimmed to the appropriate size.
- replacementMaskedImage
- Raises:
- RuntimeError
Raised if
rawMaskedImagecannot be symmetrically trimmed to matchcalibMaskedImage.