DonutStamp¶
- class lsst.ts.wep.task.DonutStamp(stamp_im: MaskedImageF, sky_position: SpherePoint, centroid_position: Point2D, blend_centroid_positions: ndarray, defocal_type: str, defocal_distance: float, detector_name: str, cam_name: str, bandpass: str, archive_element: Persistable | None = None)¶
Bases:
AbstractStampSingle donut stamp
Note all of the top-level stamp information is in the data visualization coordinate system (DVCS), while the information packaged in self.wep_im is in the global camera coordinate system (CCS). See https://sitcomtn-003.lsst.io and the Image docstring for more information.
Parameters¶
- stamp_im
lsst.afw.image.MaskedImageF The actual pixel values for the postage stamp
- sky_position
lsst.geom.SpherePoint Position of the center of the stamp. Note the user must keep track of the coordinate system
- centroid_position
lsst.geom.Point2D Position of the center of the stamp in pixels
- blend_centroid_positions
numpy.ndarray Positions of the centroids (in pixels) for sources blended with the central source
- defocal_type
str Defocal state of the stamp. “extra” or “intra” are allowed values.
- defocal_distance
float Defocal offset of the detector in mm. If the detector was not actually shifted, this should be the equivalent detector offset.
- detector_name
str CCD where the donut is found
- cam_name
str Camera name for the stamp image. “LSSTCam” or “LSSTComCam” are available camera names currently.
- bandpass
str The bandpass for the stamp image.
- archive_element
afwTable.io.Persistable, optional Archive element (e.g. Transform or WCS) associated with this stamp. (the default is None.)
- wep_im
lsst.ts.wep.image.Image ts.wep Image object used for mask creation, wavefront estimation, etc. The information contained in this object has been transformed to the camera coordinate system (CCS), with the CWFSs rotated to the same orientation as the science sensors. It is this object that will be used to interface with the wavefront estimator.
Attributes Summary
Methods Summary
Calculate the X, Y field position of the centroid in degrees.
factory(stamp_im, metadata, index[, ...])This method is needed to service the FITS reader.
Get the proper camera object for the donuts.
Get the linear WCS for the stamp.
makeMask(instrument[, opticalModel, dilate, ...])Create the mask for the image.
Attributes Documentation
- archive_element: Persistable | None = None¶
Methods Documentation
- calcFieldXY()¶
Calculate the X, Y field position of the centroid in degrees.
Returns¶
floatField x position in degrees.
floatField y position in degrees.
- classmethod factory(stamp_im, metadata, index, archive_element=None)¶
This method is needed to service the FITS reader. We need a standard interface to construct objects like this. Parameters needed to construct this object are passed in via a metadata dictionary and then passed to the constructor of this class. They should each point to lists of values.
Parameters¶
- stamp_im
lsst.afw.image.MaskedImage Pixel data to pass to the constructor
- metadata
lsst.daf.base.PropertyList PropertyList containing the information needed by the constructor.
- index
int Index into the lists in
metadata- archive_element
afwTable.io.Persistable, optional Archive element (e.g. Transform or WCS) associated with this stamp. (the default is None.)
Returns¶
- DonutStamp
An instance of this class
- stamp_im
- getCamera()¶
Get the proper camera object for the donuts.
Returns¶
lsst.afw.cameraGeom.CameraCamera object for the exposures.
Raises¶
ValueErrorThe camera is not supported.
- getLinearWCS()¶
Get the linear WCS for the stamp.
Returns¶
lsst.afw.geom.SkyWcsLinear WCS for the stamp.
- makeMask(instrument, opticalModel='offAxis', dilate=0, dilateBlends=0)¶
Create the mask for the image.
Note that technically the image masks depend on the optical aberrations, but this function assumes the aberrations are zero.
Parameters¶
- instrumentInstrument
Instrument to use.
- opticalModelstr, optional
The optical model to use for mapping between the image and pupil planes. Can be “onAxis”, or “offAxis”. onAxis is an analytic model appropriate for donuts near the optical axis. It is valid for both slow and fast optical systems. The offAxis model is a numerically-fit model that is valid for fast optical systems at wide field angles. offAxis requires an accurate Batoid model.
- dilateint, optional
How many times to dilate the central mask. This adds a boundary of that many pixels to the mask. (the default is 0)
- dilateBlendsint, optional
How many times to dilate the blend mask.
- stamp_im