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: Optional[Persistable] = None)

Bases: AbstractStamp

Single 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_imlsst.afw.image.MaskedImageF

The actual pixel values for the postage stamp

sky_positionlsst.geom.SpherePoint

Position of the center of the stamp. Note the user must keep track of the coordinate system

centroid_positionlsst.geom.Point2D

Position of the center of the stamp in pixels

blend_centroid_positionsnumpy.ndarray

Positions of the centroids (in pixels) for sources blended with the central source

defocal_typestr

Defocal state of the stamp. “extra” or “intra” are allowed values.

defocal_distancefloat

Defocal offset of the detector in mm. If the detector was not actually shifted, this should be the equivalent detector offset.

detector_namestr

CCD where the donut is found

cam_namestr

Camera name for the stamp image. “LSSTCam” or “LSSTComCam” are available camera names currently.

bandpassstr

The bandpass for the stamp image.

archive_elementafwTable.io.Persistable, optional

Archive element (e.g. Transform or WCS) associated with this stamp. (the default is None.)

wep_imlsst.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

archive_element

Methods Summary

calcFieldXY()

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.

getCamera()

Get the proper camera object for the donuts.

getLinearWCS()

Get the linear WCS for the stamp.

makeMask(instrument[, opticalModel, dilate, ...])

Create the mask for the image.

Attributes Documentation

archive_element: Optional[Persistable] = None

Methods Documentation

calcFieldXY()

Calculate the X, Y field position of the centroid in degrees.

Returns:
float

Field x position in degrees.

float

Field 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_imlsst.afw.image.MaskedImage

Pixel data to pass to the constructor

metadatalsst.daf.base.PropertyList

PropertyList containing the information needed by the constructor.

indexint

Index into the lists in metadata

archive_elementafwTable.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

getCamera()

Get the proper camera object for the donuts.

Returns:
lsst.afw.cameraGeom.Camera

Camera object for the exposures.

Raises:
ValueError

The camera is not supported.

getLinearWCS()

Get the linear WCS for the stamp.

Returns:
lsst.afw.geom.SkyWcs

Linear WCS for the stamp.

makeMask(instrument, opticalModel='offAxis', dilate=0, dilateBlends=0)

Create the mask for the image.

Note the mask is returned in the original coordinate system of the info that came from the butler (i.e. the DVCS, and the CWFSs are rotated with respect to the science sensors). See sitcomtn-003.lsst.io for more information.

Also 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.