DonutStamp#
- class lsst.ts.wep.task.DonutStamp(stamp_im, sky_position, centroid_position, blend_centroid_positions, defocal_type, defocal_distance, detector_name, cam_name, bandpass, donut_id, archive_element=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 stampsky_position (
lsst.geom.SpherePoint) – Position of the center of the stamp. Note the user must keep track of the coordinate systemcentroid_position (
lsst.geom.Point2D) – Position of the center of the stamp in pixelsblend_centroid_positions (
numpy.ndarray) – Positions of the centroids (in pixels) for sources blended with the central sourcedefocal_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 foundcam_name (
str) – Camera name for the stamp image. “LSSTCam” or “LSSTComCam” are available camera names currently.bandpass (
str) – The bandpass for the stamp image.donut_id (
str) – The donut id defined at detection stage.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
-
blend_centroid_positions:
ndarray= <dataclasses._MISSING_TYPE object>#
-
centroid_position:
Point2D= <dataclasses._MISSING_TYPE object>#
-
sky_position:
SpherePoint= <dataclasses._MISSING_TYPE object>#
-
stamp_im:
MaskedImageF= <dataclasses._MISSING_TYPE object>#
Methods Documentation
- calcFieldXY()#
Calculate the X, Y field position of the centroid in degrees.
Note the coordinate system is DVCS!
- 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 constructormetadata (
lsst.daf.base.PropertyList) – PropertyList containing the information needed by the constructor.index (
int) – Index into the lists inmetadataarchive_element (
afwTable.io.Persistable, optional) – Archive element (e.g. Transform or WCS) associated with this stamp. (the default is None.)
- Returns:
An instance of this class
- Return type:
- getCamera()#
Get the proper camera object for the donuts.
- Returns:
Camera object for the exposures.
- Return type:
lsst.afw.cameraGeom.Camera- Raises:
ValueError – The camera is not supported.
- getLinearWCS()#
Get the linear WCS for the stamp.
- Returns:
Linear WCS for the stamp.
- Return type:
lsst.afw.geom.SkyWcs
- 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:
instrument (Instrument) – Instrument to use.
opticalModel (str, 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.
dilate (int, optional) – How many times to dilate the central mask. This adds a boundary of that many pixels to the mask. (the default is 0)
dilateBlends (int, optional) – How many times to dilate the blend mask.
- Return type: