Extraction#
- class lsst.dax.images.cutout.Extraction(cutout: Image | Mask | MaskedImage | Exposure | HDUList, sky_stencil: SkyStencil, pixel_stencil: PixelStencil, metadata: PropertyList, origin_ref: DatasetRef)#
Bases:
objectA struct that aggregates the results of extracting subimages in the image cutout backend.
Attributes Summary
The image cutout itself.
Additional FITS metadata about the cutout process.
Fully-resolved reference to the dataset the cutout is from.
A pixel-coordinate representation of the stencil.
The original sky-coordinate stencil.
Methods Summary
mask([name])Set the bitmask to show the approximate coverage of nonrectangular stencils.
write_fits(path[, logger])Write the cutout to a FITS file.
Attributes Documentation
- cutout: Image | Mask | MaskedImage | Exposure | HDUList = <dataclasses._MISSING_TYPE object>#
The image cutout itself.
- metadata: PropertyList = <dataclasses._MISSING_TYPE object>#
Additional FITS metadata about the cutout process.
This should be merged with
cutout.getMetadata()on write, for types that carry their own metadata.
- origin_ref: DatasetRef = <dataclasses._MISSING_TYPE object>#
Fully-resolved reference to the dataset the cutout is from.
- pixel_stencil: PixelStencil = <dataclasses._MISSING_TYPE object>#
A pixel-coordinate representation of the stencil.
- sky_stencil: SkyStencil = <dataclasses._MISSING_TYPE object>#
The original sky-coordinate stencil.
Methods Documentation
- mask(name: str = 'STENCIL') None#
Set the bitmask to show the approximate coverage of nonrectangular stencils.
Parameters#
- name
str, optional Name of the mask plane to add and set.
Notes#
This method modifies
cutoutin place if it is aMask,MaskedImage, orExposure. It does nothing ifcutoutis anImage.- name
- write_fits(path: str, logger: Logger | None = None) None#
Write the cutout to a FITS file.
Parameters#
- path
str Local path to the file.
- logger
logging.Logger, optional Logger to use for timing messages. If
None, a default logger will be used.
Notes#
If
cutoutis anExposure, this will mergemetadatainto the cutout’s attached metadata. In other cases,metadatais written to the primary header without modifyingcutout.- path