Class ExposureFitsReader¶
Defined in File ExposureFitsReader.h
Class Documentation¶
-
class
ExposureFitsReader
¶ A FITS reader class for Exposures and their components.
All ExposureFitsReader methods provide strong exception safety, but exceptions thrown by the internal fits::Fits object itself may change its status variable or HDU pointer; ExposureFitsReader guards against this by resetting those before any use of the Fits object.
Unnamed Group
-
std::string
readImageDType
() const¶ Read a string describing the pixel type of the on-disk image plane.
- Return
A string of the form
[u](int|float)<bits>
(e.g. “uint16”, “float64”).
-
std::string
readMaskDType
() const¶
-
std::string
readVarianceDType
() const¶
Unnamed Group
-
template<typename
ImagePixelT
>
Image<ImagePixelT>readImage
(lsst::geom::Box2I const &bbox = lsst::geom::Box2I(), ImageOrigin origin = PARENT, bool allowUnsafe = false)¶ Read the image plane.
In Python, this templated method is wrapped with an additional
dtype
argument to provide the type to read. This defaults to the type of the on-disk image.- Parameters
bbox
: A bounding box used to defined a subimage, or an empty box (default) to read the whole image.origin
: Coordinate system convention for the given box.allowUnsafe
: Permit reading into the requested pixel type even when on-disk values may overflow or truncate.
-
template<typename
ImagePixelT
>
ndarray::Array<ImagePixelT, 2, 2>readImageArray
(lsst::geom::Box2I const &bbox = lsst::geom::Box2I(), ImageOrigin origin = PARENT, bool allowUnsafe = false)¶
Unnamed Group
-
template<typename
VariancePixelT
>
Image<VariancePixelT>readVariance
(lsst::geom::Box2I const &bbox = lsst::geom::Box2I(), ImageOrigin origin = PARENT, bool allowUnsafe = false)¶ Read the variance plane.
In Python, this templated method is wrapped with an additional
dtype
argument to provide the type to read. This defaults to the type of the on-disk image.- Parameters
bbox
: A bounding box used to defined a subimage, or an empty box (default) to read the whole image.origin
: Coordinate system convention for the given box.allowUnsafe
: Permit reading into the requested pixel type even when on-disk values may overflow or truncate.
-
template<typename
VariancePixelT
>
ndarray::Array<VariancePixelT, 2, 2>readVarianceArray
(lsst::geom::Box2I const &bbox = lsst::geom::Box2I(), ImageOrigin origin = PARENT, bool allowUnsafe = false)¶
Public Functions
-
ExposureFitsReader
(std::string const &fileName)¶ Construct a FITS reader object.
- Parameters
fileName
: Name of a file to open.
-
ExposureFitsReader
(fits::MemFileManager &manager)¶ Construct a FITS reader object.
- Parameters
manager
: Memory block containing a FITS file.
-
ExposureFitsReader
(fits::Fits *fitsFile)¶ Construct a FITS reader object.
- Parameters
fitsFile
: Pointer to a CFITSIO file object. Lifetime will not be managed by the Reader object.
-
ExposureFitsReader
(ExposureFitsReader const&)¶
-
ExposureFitsReader
(ExposureFitsReader&&)¶
-
ExposureFitsReader &
operator=
(ExposureFitsReader const&)¶
-
ExposureFitsReader &
operator=
(ExposureFitsReader&&)¶
-
~ExposureFitsReader
()¶
-
lsst::geom::Box2I
readBBox
(ImageOrigin origin = PARENT)¶ Read the bounding box of the on-disk image.
- Parameters
origin
: Coordinate system convention for the returned box. If LOCAL, the returned box will always have a minimum of (0, 0).
-
lsst::geom::Point2I
readXY0
(lsst::geom::Box2I const &bbox = lsst::geom::Box2I(), ImageOrigin origin = PARENT)¶ Read the image origin from the on-disk image or a subimage thereof.
- Parameters
bbox
: A bounding box used to defined a subimage, or an emptyorigin
: Coordinate system convention for the given box. Ignored ifbbox
is empty.
-
std::shared_ptr<daf::base::PropertyList>
readMetadata
()¶ Read the flexible metadata associated with the Exposure.
FITS header keys used to construct other Exposure components will be stripped.
-
std::shared_ptr<PhotoCalib>
readPhotoCalib
()¶ Read the Exposure’s photometric calibration.
-
std::shared_ptr<afw::geom::polygon::Polygon>
readValidPolygon
()¶ Read the polygon describing the region of validity for the Exposure.
-
std::shared_ptr<CoaddInputs>
readCoaddInputs
()¶ Read the Exposure’s coadd input catalogs.
-
std::shared_ptr<TransmissionCurve>
readTransmissionCurve
()¶ Read the Exposure’s transmission curve.
-
std::shared_ptr<cameraGeom::Detector>
readDetector
()¶ Read the Exposure’s detector.
-
std::map<std::string, std::shared_ptr<table::io::Persistable>>
readExtraComponents
()¶ Read the Exposure’s non-standard components.
-
std::shared_ptr<ExposureInfo>
readExposureInfo
()¶ Read the ExposureInfo containing all non-image components.
-
template<typename
MaskPixelT
>
Mask<MaskPixelT>readMask
(lsst::geom::Box2I const &bbox = lsst::geom::Box2I(), ImageOrigin origin = PARENT, bool conformMasks = false, bool allowUnsafe = false)¶ Read the mask plane.
In Python, this templated method is wrapped with an additional
dtype
argument to provide the type to read. This defaults to the type of the on-disk image.- Parameters
bbox
: A bounding box used to defined a subimage, or an empty box (default) to read the whole image.origin
: Coordinate system convention for the given box.conformMasks
: If True, conform the global mask dict to match this file.allowUnsafe
: Permit reading into the requested pixel type even when on-disk values may overflow or truncate.
-
template<typename
MaskPixelT
>
ndarray::Array<MaskPixelT, 2, 2>readMaskArray
(lsst::geom::Box2I const &bbox = lsst::geom::Box2I(), ImageOrigin origin = PARENT, bool allowUnsafe = false)¶ Read the mask plane.
In Python, this templated method is wrapped with an additional
dtype
argument to provide the type to read. This defaults to the type of the on-disk image.- Parameters
bbox
: A bounding box used to defined a subimage, or an empty box (default) to read the whole image.origin
: Coordinate system convention for the given box.allowUnsafe
: Permit reading into the requested pixel type even when on-disk values may overflow or truncate.
-
template<typename
ImagePixelT
, typenameMaskPixelT
= MaskPixel, typenameVariancePixelT
= VariancePixel>
MaskedImage<ImagePixelT, MaskPixelT, VariancePixelT>readMaskedImage
(lsst::geom::Box2I const &bbox = lsst::geom::Box2I(), ImageOrigin origin = PARENT, bool conformMasks = false, bool allowUnsafe = false)¶ Read the MaskedImage.
In Python, this templated method is wrapped with an additional
dtype
argument to provide the type to read (for the image plane). This defaults to the type of the on-disk image.- Parameters
bbox
: A bounding box used to defined a subimage, or an empty box (default) to read the whole image.origin
: Coordinate system convention for the given box.conformMasks
: If True, conform the global mask dict to match this file.allowUnsafe
: Permit reading into the requested pixel type even when on-disk values may overflow or truncate.
-
template<typename
ImagePixelT
, typenameMaskPixelT
= MaskPixel, typenameVariancePixelT
= VariancePixel>
Exposure<ImagePixelT, MaskPixelT, VariancePixelT>read
(lsst::geom::Box2I const &bbox = lsst::geom::Box2I(), ImageOrigin origin = PARENT, bool conformMasks = false, bool allowUnsafe = false)¶ Read the full Exposure.
In Python, this templated method is wrapped with an additional
dtype
argument to provide the type to read (for the image plane). This defaults to the type of the on-disk image.- Parameters
bbox
: A bounding box used to defined a subimage, or an empty box (default) to read the whole image.origin
: Coordinate system convention for the given box.conformMasks
: If True, conform the global mask dict to match this file.allowUnsafe
: Permit reading into the requested pixel type even when on-disk values may overflow or truncate.
-
std::string
getFileName
() const¶ Return the name of the file this reader targets.
-
std::string