Image¶
- class lsst.ts.wep.Image(image: ndarray, fieldAngle: ndarray | tuple | list, defocalType: DefocalType | str, bandLabel: BandLabel | str = BandLabel.REF, planeType: PlaneType | str = PlaneType.Image, blendOffsets: ndarray | tuple | list | None = None, mask: ndarray | None = None, maskBlends: ndarray | None = None, maskBackground: ndarray | None = None, defocalOffset: float | None = None, batoidOffsetValue: float | None = None)¶
Bases:
object
Class to hold a donut image along with metadata.
All quantities in this object are assumed to be in the global camera coordinate system (CCS). See https://sitcomtn-003.lsst.io for details.
I specify the “global” coordinate system because corner wavefront sensor images from the butler are rotated by some multiple of 90 degrees with respect to the global coordinate system. These images should be de-rotated before being stored in this object.
- Parameters:
- imagenp.ndarray
The square numpy array containing the donut image.
- fieldAnglenp.ndarray or tuple or list
The field angle of the donut, in degrees. The field angle is the angle to the source, measured from the optical axis. See the note on coordinate systems above.
- defocalTypeDefocalType or str
Whether the image is intra- or extra-focal. Can be specified using a DefocalType Enum or the corresponding string.
- bandLabelBandLabel or str, optional
Photometric band for the exposure. Can be specified using a BandLabel Enum or the corresponding string. If None, BandLabel.REF is used. The empty string “” also maps to BandLabel.REF. (the default is BandLabel.REF)
- planeTypePlaneType or str, optional
Whether the image is on the image plane or the pupil plane. Can be specified using a PlaneType Enum, or the corresponding string. (the default is PlaneType.Image)
- blendOffsetsnp.ndarray or tuple or list, optional
Positions of blended donuts relative to central donut, in pixels. Must be provided in the format [[dx1, dy1], [dx2, dy2], …]. Note these shifts must be in the global CCS (see the note on coordinate systems above). (the default is an empty array, i.e. no blends)
- masknp.ndarray, optional
The image source mask that is 1 for source pixels and 0 otherwise. Mask creation is meant to be handled by the ImageMapper class. (the default is None)
- maskBlendsnp.ndarray, optional
The image blend mask that is 1 for blend pixels and 0 otherwise. Mask creation is meant to be handled by the ImageMapper class. (the default is None)
- maskBackgroundnp.ndarray, optional
The image background mask that is 1 for background pixels and 0 otherwise. Mask creation is meant to be handled by the ImageMapper class. (the default is None)
- defocalOffsetfloat, optional
The defocal offset of the detector when this image was taken (or the equivalent offset if some other element, such as M2, was offset). If not None, this value will override the default value in the instrument when using the ImageMapper. (the default is None)
- batoidOffsetValuefloat, optional
The offset of batoidOffsetOptic used to calculate off-axis coefficients. If not None, this value will override the default value in the instrument when using the ImageMapper. (the default is None)
Attributes Summary
The BandLabel Enum of the image.
Offset of batoidOffsetOptic used to calculate off-axis coefficients.
The blend offsets array for the image.
Defocal offset of the detector when this image was taken.
Return the DefocalType Enum of the image.
The field angle in degrees.
The donut image array.
The image source mask.
The image background mask.
The image source mask.
Return (self.mask, self.maskBlends, self.maskBackground).
The PlaneType Enum of the image.
Methods Summary
copy
()Return a copy of the DonutImage object.
Attributes Documentation
- bandLabel¶
The BandLabel Enum of the image.
- batoidOffsetValue¶
Offset of batoidOffsetOptic used to calculate off-axis coefficients.
If not None, this value will override the default value in the instrument when using the ImageMapper.
- blendOffsets¶
The blend offsets array for the image.
- defocalOffset¶
Defocal offset of the detector when this image was taken.
If some other element was offset, such as M2, this is the equivalent detector offset. If not None, this value will override the default value in the instrument when using the ImageMapper.
- defocalType¶
Return the DefocalType Enum of the image.
- fieldAngle¶
The field angle in degrees.
- image¶
The donut image array.
- mask¶
The image source mask.
This mask has value 1 for source pixels and value 0 for other pixels.
- maskBackground¶
The image background mask.
This mask has value 1 for background pixels and value 0 for other pixels.
- maskBlends¶
The image source mask.
This mask has value 1 for blend pixels and value 0 for other pixels.
- masks¶
Return (self.mask, self.maskBlends, self.maskBackground).
- planeType¶
The PlaneType Enum of the image.
Methods Documentation