Assemble the amplifier region of a raw CCD image.
For most cameras this is a no-op: the raw image already is an assembled CCD image. However, it is useful for camera such as LSST for which each amplifier image is a separate image.
75 """!Assemble the amplifier region of a raw CCD image
77 For most cameras this is a no-op: the raw image already is an assembled CCD image.
78 However, it is useful for camera such as LSST for which each amplifier image is a separate image.
80 @param[in,out] destImage CCD image (lsst.afw.image.Image or MaskedImage);
81 the region amplifier.getRawAmplifier().getBBox() is overwritten with the raw amplifier image
82 @param[in] rawImage raw image (same type as destImage)
83 @param[in] amplifier amplifier geometry: lsst.afw.cameraGeom.Amplifier with raw amplifier info
85 @throw RuntimeError if:
86 - image types do not match
87 - amplifier has no raw amplifier info
89 if not amplifier.getHasRawInfo():
90 raise RuntimeError(
"amplifier must contain raw amplifier info")
91 if type(destImage.Factory) != type(rawImage.Factory):
92 raise RuntimeError(
"destImage type = %s != %s = rawImage type" % \
93 type(destImage.Factory).__name__, type(rawImage.Factory).__name__)
94 inBBox = amplifier.getRawBBox()
95 inView = rawImage.Factory(rawImage, inBBox,
False)
96 outBBox = amplifier.getRawBBox()
97 outBBox.shift(amplifier.getRawXYOffset())
98 outView = destImage.Factory(destImage, outBBox,
False)
def assembleAmplifierRawImage
Assemble the amplifier region of a raw CCD image.