Namespace lsst::afw::image¶
-
namespace
image
Typedefs
-
typedef std::int32_t
MaskPixel
default type for Masks and MaskedImage Masks
-
typedef float
VariancePixel
default type for MaskedImage variance images
Enums
-
enum
ImageOrigin
Values:
-
PARENT
-
LOCAL
-
-
enum
xOrY
Values:
-
X
-
Y
-
-
enum
RotType
Type of rotation.
Values:
-
UNKNOWN
Rotation angle is unknown. Note: if there is no instrument rotator then it is better to compute SKY or HORIZON and use that rotation type rather than specify UNKNOWN.
-
SKY
Position angle of focal plane +Y, measured from N through E. At 0 degrees, +Y is along N and +X is along E/W depending on handedness. At 90 degrees, +Y is along E and +X is along S/N depending on handedness.
-
HORIZON
Position angle of focal plane +Y, measured from +Alt through +Az. At 0 degrees, +Y is along +Alt and +X is along +/-Az, depending on handedness. At 90 degrees, +Y is along +Az and +X is along -/+Alt, depending on handedness.
-
MOUNT
The position sent to the instrument rotator; the details depend on the rotator.
-
Functions
-
double
abMagFromFlux
(double flux) Compute AB magnitude from flux in Janskys.
-
double
abMagErrFromFluxErr
(double fluxErr, double flux) Compute AB magnitude error from flux and flux error in Janskys.
-
double
fluxFromABMag
(double mag) Compute flux in Janskys from AB magnitude.
-
double
fluxErrFromABMagErr
(double magErr, double mag) Compute flux error in Janskys from AB magnitude error and AB magnitude.
-
template<typename
T
>
ndarray::Array<T, 1>abMagFromFlux
(ndarray::Array<T const, 1> const &flux) Compute AB magnitude from flux in Janskys.
-
template<typename
T
>
ndarray::Array<T, 1>abMagErrFromFluxErr
(ndarray::Array<T const, 1> const &fluxErr, ndarray::Array<T const, 1> const &flux) Compute AB magnitude error from flux and flux error in Janskys.
-
template<typename
T
>
ndarray::Array<T, 1>fluxFromABMag
(ndarray::Array<T const, 1> const &mag) Compute flux in Janskys from AB magnitude.
-
template<typename
T
>
ndarray::Array<T, 1>fluxErrFromABMagErr
(ndarray::Array<T const, 1> const &magErr, ndarray::Array<T const, 1> const &mag) Compute flux error in Janskys from AB magnitude error and AB magnitude.
-
A function to return an Exposure of the correct type (cf. std::make_pair)
-
template<typename
LhsPixelT
, typenameRhsPixelT
>
Image<LhsPixelT> &operator+=
(Image<LhsPixelT> &lhs, Image<RhsPixelT> const &rhs) Add lhs to Image rhs (i.e. pixel-by-pixel addition) where types are different.
-
template<typename
LhsPixelT
, typenameRhsPixelT
>
Image<LhsPixelT> &operator-=
(Image<LhsPixelT> &lhs, Image<RhsPixelT> const &rhs) Subtract lhs from Image rhs (i.e. pixel-by-pixel subtraction) where types are different.
-
template<typename
LhsPixelT
, typenameRhsPixelT
>
Image<LhsPixelT> &operator*=
(Image<LhsPixelT> &lhs, Image<RhsPixelT> const &rhs) Multiply lhs by Image rhs (i.e. pixel-by-pixel multiplication) where types are different.
-
template<typename
LhsPixelT
, typenameRhsPixelT
>
Image<LhsPixelT> &operator/=
(Image<LhsPixelT> &lhs, Image<RhsPixelT> const &rhs) Divide lhs by Image rhs (i.e. pixel-by-pixel division) where types are different.
-
template<typename
PixelT
>
voidswap
(DecoratedImage<PixelT> &a, DecoratedImage<PixelT> &b)
-
lsst::geom::Box2I
bboxFromMetadata
(daf::base::PropertySet &metadata) Determine the image bounding box from its metadata (FITS header)
Note that this modifies the metadata, stripping the WCS headers that provide the xy0.
-
template<typename
T1
, typenameT2
>
boolimagesOverlap
(ImageBase<T1> const &image1, ImageBase<T2> const &image2) Return true if the pixels for two images or masks overlap in memory.
-
template<typename
LhsT
>
voidfor_each_pixel
(Image<LhsT> &lhs, pixelOp0<LhsT> const &func) - Parameters
lhs
: Image to setfunc
: functor to call
Set each pixel in an Image<LhsT> to func()
-
template<typename
LhsT
>
voidfor_each_pixel
(Image<LhsT> &lhs, pixelOp1<LhsT> const &func) - Parameters
lhs
: Image to setfunc
: functor to call
Set each pixel in an Image<LhsT> to func(lhs)
-
template<typename
LhsT
>
voidfor_each_pixel
(Image<LhsT> &lhs, pixelOp1XY<LhsT> const &func) - Parameters
lhs
: Image to setfunc
: functor to call
Set each pixel in an Image<LhsT> to func(x, y, lhs)
(x, y) allow for lhs.getXY0()
-
template<typename
LhsT
, typenameRhsT
>
voidfor_each_pixel
(Image<LhsT> &lhs, Image<RhsT> const &rhs, pixelOp1<RhsT> const &func) -
Set each pixel in an Image<LhsT> to func(rhs), getting the rhs from an Image<RhsT>
-
template<typename
LhsT
, typenameRhsT
>
voidfor_each_pixel
(Image<LhsT> &lhs, Image<RhsT> const &rhs, pixelOp2<LhsT, RhsT> const &func) -
Set each pixel in an Image<LhsT> to func(lhs, rhs), getting the rhs from an Image<RhsT>
-
template<typename
LhsT
, typenameRhsT
>
voidfor_each_pixel
(Image<LhsT> &lhs, Image<RhsT> const &rhs, pixelOp2XY<LhsT, RhsT> const &func) -
Set each pixel in an Image<LhsT> to func(x, y, lhs, rhs), getting the rhs from an Image<RhsT>
(x, y) allow for lhs.getXY0()
-
template<typename
Image1T
, typenameImage2T
>
doubleinnerProduct
(Image1T const &lhs, Image2T const &rhs, int const border = 0) Calculate the inner product of two images
- Return
The inner product
- Parameters
lhs
: first imagerhs
: Other image to dot with firstborder
: number of pixels to ignore around the edge
- Exceptions
lsst::pex::exceptions::LengthError
: if all the images aren’t the same size
Overload operator+()
We require two of these, one for image+slice (this one) and one for slice+image (next one down)
- Parameters
img
: The Imageslc
: The ImageSlice
Overload operator+()
We require two of these, one for image+slice (previous one) and one for slice+image (this)
- Parameters
slc
: The ImageSliceimg
: The Image
-
template<typename
PixelT
>
voidoperator+=
(Image<PixelT> &img, ImageSlice<PixelT> const &slc) Overload operator+=()
We’ll only allow ‘image += slice’. It doesn’t make sense to add an image to a slice.
- Parameters
[inout] img
: The Image[in] slc
: The ImageSlice
Overload operator-()
We’ll only allow ‘image - slice’, as ‘slice - image’ doesn’t make sense.
- Parameters
img
: The Imageslc
: The ImageSlice
-
template<typename
PixelT
>
voidoperator-=
(Image<PixelT> &img, ImageSlice<PixelT> const &slc) Overload operator-=()
Only ‘image -= slice’ is defined. ‘slice -= image’ wouldn’t make sense.
- Parameters
[inout] img
: The Image[in] slc
: The ImageSlice
Overload operator*()
We’ll define both ‘image*slice’ (this one) and ‘slice*image’ (next one down).
- Parameters
img
: The Imageslc
: The ImageSlice
Overload operator*()
We’ll define both ‘image*slice’ (this one) and ‘slice*image’ (next one down).
- Parameters
slc
: The Imageimg
: The ImageSlice
-
template<typename
PixelT
>
voidoperator*=
(Image<PixelT> &img, ImageSlice<PixelT> const &slc) Overload operator*=()
Only ‘image *= slice’ is defined, as ‘slice *= image’ doesn’t make sense.
- Parameters
[inout] img
: The Image[in] slc
: The ImageSlice
Overload operator/()
Only ‘image / slice’ is defined, as ‘slice / image’ doesn’t make sense.
- Parameters
img
: The Imageslc
: The ImageSlice
-
template<typename
PixelT
>
voidoperator/=
(Image<PixelT> &img, ImageSlice<PixelT> const &slc) Overload operator/=()
Only ‘image /= slice’ is defined, as ‘slice /= image’ doesn’t make sense.
- Parameters
[inout] img
: The Image[in] slc
: The ImageSlice
-
double
indexToPosition
(double ind) - Parameters
ind
: image index
Convert image index to image position
The LSST indexing convention is:
the index of the bottom left pixel is 0,0
the position of the center of the bottom left pixel is PixelZeroPos, PixelZeroPos
- Return
image position
-
int
positionToIndex
(double pos) - Parameters
pos
: image position
Convert image position to nearest integer index
The LSST indexing convention is:
the index of the bottom left pixel is 0,0
the position of the center of the bottom left pixel is PixelZeroPos, PixelZeroPos
- Return
nearest integer index
-
int
positionToIndex
(double &residual, double pos) - Parameters
residual
: fractional part of indexpos
: image position
Convert image position to index (nearest integer and fractional parts)
The LSST indexing convention is:
the index of the bottom left pixel is 0,0
the position of the center of the bottom left pixel is PixelZeroPos, PixelZeroPos
Note: in python this is called positionToIndexAndResidual
- Return
nearest integer index
-
std::pair<int, double>
positionToIndex
(double const pos, bool) - Parameters
pos
: image position
Convert image position to index (nearest integer and fractional parts)
- Return
std::pair(nearest integer index, fractional part)
- Parameters
image
: imagemask
: maskvariance
: variance
A function to return a MaskedImage of the correct type (cf. std::make_pair)
-
template<typename
ImagePixelT1
, typenameImagePixelT2
>
boolimagesOverlap
(MaskedImage<ImagePixelT1, MaskPixel, VariancePixel> const &image1, MaskedImage<ImagePixelT2, MaskPixel, VariancePixel> const &image2) Return true if the pixels for two masked images (image, variance or mask plane) overlap in memory.
-
std::ostream &
operator<<
(std::ostream &os, Measurement const &measurement)
-
void
assertNonNegative
(double value, std::string const &name) Raise lsst::pex::exceptions::InvalidParameterError if value is not >=0.
Used for checking the calibration mean/error in the constructor.
- Parameters
value
: Value that should be positive.name
: Text to prepend to error message.
- Exceptions
lsst::pex::exceptions::InvalidParameterError
: if value < 0
-
std::shared_ptr<PhotoCalib>
makePhotoCalibFromMetadata
(daf::base::PropertySet &metadata, bool strip = false) Construct a PhotoCalib from FITS FLUXMAG0/FLUXMAG0ERR keywords.
This provides backwards compatibility with the obsoleted Calib object that PhotoCalib replaced. It should not be used outside of reading old Exposures written before PhotoCalib existed.
- Return
Pointer to the constructed PhotoCalib, or nullptr if FLUXMAG0 is not in the metadata.
- Parameters
metadata
: FITS header metadata containing FLUXMAG0 and FLUXMAG0ERR keys.strip
: Strip FLUXMAG0 and FLUXMAG0ERR frommetadata
?
-
std::shared_ptr<PhotoCalib>
makePhotoCalibFromCalibZeroPoint
(double instFluxMag0, double instFluxMag0Err) Construct a PhotoCalib from the deprecated
Calib
-style instFluxMag0/instFluxMag0Err values.This provides backwards compatibility with the obsoleted Calib object that PhotoCalib replaced. It should not be used outside of tests that compare with old persisted Calib objects.
- Return
Pointer to the constructed PhotoCalib.
- Parameters
instFluxMag0
: The instrumental flux at zero magnitude. If 0, the resultingPhotoCalib
will have infinite calibrationMean and non-finite (inf or NaN) calibrationErr.instFluxMag0Err
: The instrumental flux at zero magnitude error. If 0, the resultingPhotoCalib
will have 0 calibrationErr.
-
std::shared_ptr<daf::base::PropertyList>
readMetadata
(std::string const &fileName, int hdu = fits::DEFAULT_HDU, bool strip = false) Return the metadata (header entries) from a FITS file.
- Parameters
[in] fileName
: File to read.[in] hdu
: HDU to read, 0-indexed. The special value of afw::fits::DEFAULT_HDU will read the first non-empty HDU.[in] strip
: If true, ignore special header keys usually managed by cfitsio (e.g. NAXIS).
Variables
-
double const
JanskysPerABFlux
= 3631.0
-
const double
PixelZeroPos
= 0.0 position of center of pixel 0
FITS uses 1.0, SDSS uses 0.5, LSST uses 0.0 (http://dev.lsstcorp.org/trac/wiki/BottomLeftPixelProposalII%3A)
-
class
ApCorrMap
: public lsst::afw::table::io::PersistableFacade<ApCorrMap>, public Storable - #include <ApCorrMap.h>
A thin wrapper around std::map to allow aperture corrections to be attached to Exposures.
ApCorrMap simply adds error handling accessors, persistence, and a bit of encapsulation to std::map (given the simplified interface, for instance, we could switch to unordered_map or some other underyling container in the future).
-
class
CheckIndices
- #include <ImageBase.h>
A class used to request that array accesses be checked.
-
class
CoaddInputs
: public lsst::afw::table::io::PersistableFacade<CoaddInputs>, public Storable - #include <CoaddInputs.h>
A simple Persistable struct containing ExposureCatalogs that record the inputs to a coadd.
The visits catalog corresponds to what task code refers to as coaddTempExps, while the ccds catalog corresponds to individual input CCD images (calexps), and has a “visitId” column that points back to the visits catalog.
The records in the visits catalog will all have the same Wcs as the coadd, as they represent images that have already been warped to the coadd frame. Regardless of whether or not the coadd is PSF-matched, the visit record Psf will generally be CoaddPsfs (albeit single-depth ones, so they simply pick out the single non-coadd-Psf that is valid for each point).
-
class
Color
- #include <Color.h>
Describe the colour of a source
We need a concept of colour more general than “g - r” in order to calculate e.g. atmospheric dispersion or a source’s PSF
- Note
This is very much just a place holder until we work out what we need. A full SED may be required, in which case a constructor from an SED name might be appropriate, or a couple of colours, or …
-
template<typename
PixelT
>
structConstReference
- #include <ImageBase.h>
metafunction to extract const reference type from PixelT
-
template<typename
PixelT
>
classDecoratedImage
- #include <Image.h>
A container for an Image and its associated metadata
-
class
DefectBase
- #include <Defect.h>
Encapsulate information about a bad portion of a detector
Subclassed by lsst::meas::algorithms::Defect
-
template<typename
ImageT
, typenameMaskT
= lsst::afw::image::MaskPixel, typenameVarianceT
= lsst::afw::image::VariancePixel>
classExposure
- #include <Exposure.h>
A class to contain the data, WCS, and other information needed to describe an image of the sky. Exposure Class Implementation for LSST: a templated framework class for creating an Exposure from a MaskedImage and a Wcs.
An Exposure is required to take one afwImage::MaskedImage or a region (col, row) defining the size of a MaskedImage (this can be of size 0,0). An Exposure can (but is not required to) contain an afwImage::SkyWcs.
The template types should optimally be a float, double, unsigned int 16 bit, or unsigned int 32 bit for the image (pixel) type and an unsigned int 32 bit for the mask type. These types have been explicitly instantiated for the Exposure class. All MaskedImage and Wcs constructors are ‘const’ to allow for views and copying.
An Exposure can get and return its MaskedImage, SkyWcs, and a subExposure. The getSubExposure member takes a BBox region defining the subRegion of the original Exposure to be returned. The member retrieves the MaskedImage corresponding to the subRegion. The MaskedImage class throws an exception for any subRegion extending beyond the original MaskedImage bounding box. This member is not yet fully implemented because it requires the SkyWcs class to return the SkyWcs metadata to the member so the CRPIX values of the SkyWcs can be adjusted to reflect the new subMaskedImage origin. The getSubExposure member will eventually return a subExposure consisting of the subMAskedImage and the SkyWcs object with its corresponding adjusted metadata.
The hasWcs member is used to determine if the Exposure has a SkyWcs. It is not required to have one.
-
class
ExposureFitsReader
- #include <ExposureFitsReader.h>
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.
-
class
ExposureInfo
- #include <ExposureInfo.h>
A collection of all the things that make an Exposure different from a MaskedImage
The constness semantics of the things held by ExposureInfo are admittedly a bit of a mess, but they’re that way to preserve backwards compatibility for now. Eventually I’d like to make a lot of these things immutable, but in the meantime, here’s the summary:
Filter is held and returned by value.
VisitInfo is immutable and is held by a const ptr and has a setter and getter.
Metadata is held by non-const pointer, and you can get a non-const pointer via a const member function accessor (i.e. constness is not propagated).
all other types are only accessible through non-const pointers
The setter for Wcs clones its input arguments (this is a departure from the previous behavior for Wcs but it’s safer w.r.t. aliasing and it matches the old (and current) behavior of the Exposure and ExposureInfo constructors, which clone their arguments. The setter for Psf and constructors do not clone the Psf, as Psfs are immutable and hence we don’t need to ensure strict ownership. The setter for Detector does not clone its input argument, because while it technically isn’t, we can safely consider a Detector to be immutable once it’s attached to an ExposureInfo.
-
class
Filter
: public Storable - #include <Filter.h>
Holds an integer identifier for an LSST filter.
-
class
FilterProperty
- #include <Filter.h>
Describe the properties of a Filter (e.g. effective wavelength)
-
template<typename
PixelT
>
classImage
: public lsst::afw::image::ImageBase<PixelT> - #include <Image.h>
A class to represent a 2-dimensional array of pixels.
Subclassed by lsst::afw::image::ImageSlice< PixelT >
-
template<typename
PixelT
>
classImageBase
- #include <ImageBase.h>
The base class for all image classed (Image, Mask, MaskedImage, …)
Subclassed by lsst::afw::image::Image< lsst::afw::math::Kernel::Pixel >, lsst::afw::image::Image< Pixel >, lsst::afw::image::Image< PixelT >
-
class
ImageBaseFitsReader
- #include <ImageBaseFitsReader.h>
Base class for image FITS readers.
This class should be considered an implementation detail of ImageFitsReader and MaskFitsReader that provides their common methods, not the definition of an interface.
All ImageBaseFitsReader methods provide strong exception safety, but exceptions thrown by the internal fits::Fits object itself may change its status variable or HDU pointer; ImageBaseFitsReader guards against this by resetting those before any use of the Fits object.
Subclassed by lsst::afw::image::ImageFitsReader, lsst::afw::image::MaskFitsReader
-
class
ImageFitsReader
: public lsst::afw::image::ImageBaseFitsReader - #include <ImageFitsReader.h>
A FITS reader class for regular Images.
All ImageFitsReader methods provide strong exception safety, but exceptions thrown by the internal fits::Fits object itself may change its status variable or HDU pointer; ImageFitsReader guards against this by resetting those before any use of the Fits object.
-
template<typename
ImageT
>
classImagePca
Subclassed by lsst::ip::diffim::detail::KernelPca< ImageT >, lsst::meas::algorithms::PsfImagePca< ImageT >
-
template<typename
PixelT
>
classImageSlice
: public lsst::afw::image::Image<PixelT> - #include <ImageSlice.h>
A class to specify a slice of an image
-
template<typename
MaskPixelT
= lsst::afw::image::MaskPixel>
classMask
: public lsst::afw::image::ImageBase<MaskPixelT> - #include <Mask.h>
Represent a 2-dimensional array of bitmask pixels
Some mask planes are always defined (although you can add more with Mask::addMaskPlane):
BAD
This pixel is known to be bad (e.g. the amplifier is not working)CR
This pixel is contaminated by a cosmic rayDETECTED
This pixel lies within an object’s FootprintDETECTED_NEGATIVE
This pixel lies within an object’s Footprint, and the detection was looking for pixels below a specified levelEDGE
This pixel is too close to the edge to be processed properlyINTRP
This pixel has been interpolated over- Note
should be called
INTERPOLATED
SAT
This pixel is saturated and has bloomed- Note
should be called
SATURATED
SUSPECT
This pixel is untrustworthy, and you may wish to discard any Source containing it
-
template<typename
ImagePixelT
, typenameMaskPixelT
= lsst::afw::image::MaskPixel, typenameVariancePixelT
= lsst::afw::image::VariancePixel>
classMaskedImage
- #include <MaskedImage.h>
A class to manipulate images, masks, and variance as a single object.
-
class
MaskedImageFitsReader
- #include <MaskedImageFitsReader.h>
A FITS reader class for MaskedImages and their components.
All MaskedImageFitsReader methods provide strong exception safety, but exceptions thrown by the internal fits::Fits object itself may change its status variable or HDU pointer; MaskedImageFitsReader guards against this by resetting those before any use of the Fits object.
-
class
MaskFitsReader
: public lsst::afw::image::ImageBaseFitsReader - #include <MaskFitsReader.h>
A FITS reader class for Masks.
All MaskFitsReader methods provide strong exception safety, but exceptions thrown by the internal fits::Fits object itself may change its status variable or HDU pointer; MaskFitsReader guards against this by resetting those before any use of the Fits object.
-
struct
Measurement
- #include <PhotoCalib.h>
A value and its error.
-
class
PhotoCalib
: public lsst::afw::table::io::PersistableFacade<PhotoCalib>, public Storable - #include <PhotoCalib.h>
The photometric calibration of an exposure.
A PhotoCalib is a BoundedField (a function with a specified domain) that converts from post-ISR counts-on-chip (ADU) to flux and magnitude. It is defined such that a calibration of 1 means one count is equal to one nanojansky (nJy, 10^-35 W/m^2/Hz in SI units). The nJy was chosen because it represents a linear flux unit with values in a convenient range (e.g. LSST’s single image depth of 24.5 is 575 nJy). See more detailed discussion in: https://pstn-001.lsst.io/
PhotoCalib is immutable.
The spatially varying flux calibration has units of nJy/ADU, and is defined such that, at a position (x,y) in the domain of the boundedField calibration and for a given measured source instFlux:
\[ instFlux*calibration(x,y) = flux [nJy] \]while the errors (constant on the domain) are defined as:\[ sqrt((instFluxErr/instFlux)^2 + (calibrationErr/calibration)^2)*flux = fluxErr [nJy] \]This implies that the conversions from instFlux and instFlux error to magnitude and magnitude error are as follows:\[ -2.5*log_{10}(instFlux*calibration(x,y)*1e-9/referenceFlux) = magnitude \]where referenceFlux is the AB Magnitude reference flux from Oke & Gunn 1983 (first equation),
\[ referenceFlux = 1e23 * 10^{(48.6/-2.5)} \]and\[ 2.5/log(10)*sqrt((instFluxErr/instFlux)^2 + (calibrationErr/calibration)^2) = magnitudeErr \]Note that this is independent of referenceFlux.
-
template<typename
ValT
>
structpixelOp0
: public std::function<ValT()> - #include <ImageAlgorithm.h>
A functor class equivalent to std::function<ValT ()>, but with a virtual operator()
-
template<typename
ValT
>
structpixelOp1
: public std::function<ValT(ValT)> - #include <ImageAlgorithm.h>
A functor class equivalent to std::function<ValT (ValT)>, but with a virtual operator()
-
template<typename
ValT
>
structpixelOp1XY
: public std::function<ValT(int, int, ValT)> - #include <ImageAlgorithm.h>
A functor class equivalent to std::function<ValT (int, int, ValT)>, but with a virtual operator()
-
template<typename
LhsT
, typenameRhsT
>
structpixelOp2
: public std::function<LhsT(LhsT, RhsT)> - #include <ImageAlgorithm.h>
A functor class equivalent to std::function<LhsT (LhsT, RhsT)>, but with a virtual operator()
-
template<typename
LhsT
, typenameRhsT
>
structpixelOp2XY
: public std::function<LhsT(int, int, LhsT, RhsT)> - #include <ImageAlgorithm.h>
A functor class equivalent to std::function<LhsT (int, int, LhsT, RhsT)>, but with a virtual operator()
-
template<typename
PixelT
>
structReference
- #include <ImageBase.h>
metafunction to extract reference type from PixelT
-
class
TransmissionCurve
: public lsst::afw::table::io::PersistableFacade<TransmissionCurve>, public Storable, public std::enable_shared_from_this<TransmissionCurve> - #include <TransmissionCurve.h>
A spatially-varying transmission curve as a function of wavelength.
TransmissionCurve can only be evaluated at discrete (albeit arbitrary) user-provided positions; it does not provide an interface for computing average transmission over regions or computing spatially-varying scalars from integrals over the wavelength dimension.
TransmissionCurves are immutable and are expected to be passed and held by shared_ptr<TransmissionCurve const>. As such they are neither copyable nor movable (because there should be no need to copy or move).
All wavelength values should be in Angstroms.
The flux units and overall normalization of TransmissionCurves is unspecified by the class, but their normalization and units should always be consistent throughout the spatial area over which they are defined (an implementation should not e.g. re-normalize to unit bolometric flux at each position it is evaluated at). Other classes and functions using TransmissionCurves should of course document the flux units and/or normalization expected/provided.
-
class
VisitInfo
: public lsst::afw::table::io::PersistableFacade<VisitInfo>, public Storable - #include <VisitInfo.h>
Information about a single exposure of an imaging camera.
Includes exposure duration and date, and telescope pointing and orientation.
All information is for the middle of the exposure and at the boresight (center of the focal plane). Thus for a mosaic camera VisitInfo is the same for all detectors in the mosaic.
VisitInfo is immutable.
-
namespace
detail
-
Functions
Remove Filter-related keywords from the metadata
- Return
Number of keywords stripped
- Parameters
[inout] metadata
: Metadata to be stripped
Variables
-
std::string const
wcsNameForXY0
= "A"
-
std::string const
fitsFile_RE
= "\.fits(\.[fg]z)?$" regexp to identify when MaskedImages should be written as MEFs
-
std::string const
compressedFileNoMEF_RE
= "(\.gz)$" regexp to identify compressed files that we can’t write MEFs to
-
struct
basic_tag
- #include <ImageBase.h>
Base image tag.
Subclassed by lsst::afw::image::detail::Image_tag, lsst::afw::image::detail::Mask_tag, lsst::afw::image::detail::MaskedImage_tag
-
struct
Image_tag
: public lsst::afw::image::detail::basic_tag - #include <ImageBase.h>
tag for an Image
-
template<typename
ImageT
>
structimage_traits
- #include <ImageBase.h>
traits class for image categories
-
struct
MaskedImage_tag
: public lsst::afw::image::detail::basic_tag - #include <MaskedImage.h>
A traits class for MaskedImage.
-
struct
MaskedImagePixel_tag
- #include <MaskedImage.h>
A class used to identify classes that represent MaskedImage pixels.
Subclassed by lsst::afw::image::pixel::Pixel< _ImagePixelT, _MaskPixelT, _VariancePixelT >, lsst::afw::image::pixel::SinglePixel< _ImagePixelT, _MaskPixelT, _VariancePixelT >
-
class
StorableMap
- #include <StorableMap.h>
A map of Storable supporting strongly-typed access.
A Key for the map is parameterized by both the key type
K
and a corresponding value typeV
. The map is indexed uniquely by a value of typeK
; no two entries in the map may have identical values of Key::getId().All operations are sensitive to the value type of the key: a contains call requesting a SkyWcs labeled “value”, for example, will report no such object if instead there is a Psf labeled “value”. At present, a StorableMap does not store type information internally, instead relying on RTTI for type checking.
-
namespace
details
Functions
-
template<typename
OperatorT
, typenamePixelT
>
voidoperate
(Image<PixelT> &img, ImageSlice<PixelT> const &slc, typename ImageSlice<PixelT>::ImageSliceType sliceType) A function to loop over pixels and perform the requested operation
-
template<typename
-
namespace
pixel
Functions
-
template<typename
ImagePixelT
, typenameMaskPixelT
, typenameVariancePixelT
>
SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT>makeSinglePixel
(ImagePixelT x, MaskPixelT m, VariancePixelT v) Return a SinglePixel
This function is useful as function overloading will choose the correct return type (cf. std::make_pair()
-
template<typename
ExprT1
>
UnaryExpr<ExprT1, std::negate<typename exprTraits<ExprT1>::ImagePixelT>, noop<typename exprTraits<ExprT1>::MaskPixelT>, noop<typename exprTraits<ExprT1>::VariancePixelT>>operator-
(ExprT1 e1) Template for -e1.
-
template<typename
ExprT1
, typenameExprT2
>
BinaryExpr<ExprT1, ExprT2, std::plus<typename exprTraits<ExprT1>::ImagePixelT>, bitwise_or<typename exprTraits<ExprT1>::MaskPixelT>, variance_plus<typename exprTraits<ExprT1>::VariancePixelT>>operator+
(ExprT1 e1, ExprT2 e2) Template for (e1 + e2)
-
template<typename
ExprT1
, typenameExprT2
>
ExprT1operator+=
(ExprT1 &e1, ExprT2 e2) template for e1 += e2
-
template<typename
ExprT1
, typenameExprT2
>
ExprT1plus
(ExprT1 &lhs, ExprT2 const &rhs, float covariance) Like operator+(), but assume that covariance’s 2*alpha*sqrt(vx*vy)
- Parameters
lhs
: Left hand valuerhs
: Right hand valuecovariance
: Assume that covariance is 2*alpha*sqrt(vx*vy) (if variances are known)
-
template<typename
ExprT1
, typenameExprT2
>
BinaryExpr<ExprT1, ExprT2, std::minus<typename exprTraits<ExprT1>::ImagePixelT>, bitwise_or<typename exprTraits<ExprT1>::MaskPixelT>, variance_plus<typename exprTraits<ExprT1>::VariancePixelT>>operator-
(ExprT1 e1, ExprT2 e2) Template to evaluate (e1 - e2)
-
template<typename
ExprT1
, typenameExprT2
>
ExprT1operator-=
(ExprT1 &e1, ExprT2 e2) Template to evaluate e1 -= e2.
-
template<typename
ExprT1
, typenameExprT2
>
BinaryExpr<ExprT1, ExprT2, std::multiplies<typename exprTraits<ExprT1>::ImagePixelT>, bitwise_or<typename exprTraits<ExprT1>::MaskPixelT>, variance_multiplies<typename exprTraits<ExprT1>::VariancePixelT>>operator*
(ExprT1 e1, ExprT2 e2) Template to evaluate (e1 * e2)
-
template<typename
ExprT1
, typenameExprT2
>
ExprT1operator*=
(ExprT1 &e1, ExprT2 e2) Template to evaluate e1 *= e2.
-
template<typename
ExprT1
, typenameExprT2
>
BinaryExpr<ExprT1, ExprT2, std::divides<typename exprTraits<ExprT1>::ImagePixelT>, bitwise_or<typename exprTraits<ExprT1>::MaskPixelT>, variance_divides<typename exprTraits<ExprT1>::VariancePixelT>>operator/
(ExprT1 e1, ExprT2 e2) Template to evaluate (e1 / e2)
-
template<typename
ExprT1
, typenameExprT2
>
ExprT1operator/=
(ExprT1 &e1, ExprT2 e2) Template to evaluate e1 /= e2.
-
template<typename
ImagePixelT
, typenameMaskPixelT
, typenameVariancePixelT
>
std::ostream &operator<<
(std::ostream &os, SinglePixel<ImagePixelT, MaskPixelT, VariancePixelT> const &v) Print a SinglePixel.
-
template<typename
ImagePixelT
, typenameMaskPixelT
, typenameVariancePixelT
>
std::ostream &operator<<
(std::ostream &os, Pixel<ImagePixelT, MaskPixelT, VariancePixelT> const &v) Print a Pixel.
-
template<typename
ExprT1
, typenameExprT2
, typenameBinOp
, typenameMaskBinOp
, typenameVarBinOp
>
std::ostream &operator<<
(std::ostream &os, BinaryExpr<ExprT1, ExprT2, BinOp, MaskBinOp, VarBinOp> const &v) Evaluate and print a BinaryExpr.
-
template<typename
ExprT1
, typenameExprT2
, typenameImageBinOp
, typenameMaskBinOp
, typenameVarianceBinOp
>
classBinaryExpr
- #include <Pixel.h>
Class for representing binary operations.
-
template<typename
ExprT1
, typenameImageBinOp
, typenameMaskBinOp
, typenameVarianceBinOp
>
classBinaryExpr
<ExprT1, double, ImageBinOp, MaskBinOp, VarianceBinOp> - #include <Pixel.h>
Partial specialization of BinaryExpr when ExprT2 is a double (i.e no mask/variance part)
-
template<typename
T1
>
structbitwise_or
: public std::binary_function<T1, T1, T1> - #include <Pixel.h>
bitwise_or doesn’t seem to be in std::
- Note
We provide a single-operand version for when the right-hand-side of an expression is a scalar, not a masked pixel,
-
template<typename
ExprT
>
structexprTraits
- #include <Pixel.h>
A traits class to return the types of the image/mask/variance.
-
template<>
structexprTraits
<double> - #include <Pixel.h>
A specialisation of exprTraits for
double
-
template<>
structexprTraits
<float> - #include <Pixel.h>
A specialisation of exprTraits for
float
-
template<>
structexprTraits
<int> - #include <Pixel.h>
A specialisation of exprTraits for
int
-
template<>
structexprTraits
<unsigned short> - #include <Pixel.h>
A specialisation of exprTraits for
unsigned short
-
template<typename
T1
>
structnoop
: public std::unary_function<T1, T1> - #include <Pixel.h>
A noop functor (useful for e.g. masks and variances when changing the sign of the image)
-
template<typename
_ImagePixelT
, typename_MaskPixelT
, typename_VariancePixelT
= double>
classPixel
: public lsst::afw::image::detail::MaskedImagePixel_tag - #include <Pixel.h>
A pixel of a MaskedImage.
-
template<typename
PixelT
>
structPixelTypeTraits
- #include <Pixel.h>
Pixel type traits.
-
template<typename
_ImagePixelT
, typename_MaskPixelT
, typename_VariancePixelT
>
structPixelTypeTraits
<SinglePixel<_ImagePixelT, _MaskPixelT, _VariancePixelT>> - #include <Pixel.h>
Specialization for a pixel of a MaskedImage.
-
template<typename
_ImagePixelT
, typename_MaskPixelT
, typename_VariancePixelT
= double>
classSinglePixel
: public lsst::afw::image::detail::MaskedImagePixel_tag - #include <Pixel.h>
A single pixel of the same type as a MaskedImage.
-
template<typename
ExprT1
, typenameImageBinOp
, typenameMaskBinOp
, typenameVarianceBinOp
>
classUnaryExpr
- #include <Pixel.h>
Class for representing Unary operations.
-
template<typename
T1
>
structvariance_divides
- #include <Pixel.h>
Calculate the variance when we divide two Pixels
- Note
We provide a single-operand version for when the right-hand-side of an expression is a scalar, not a masked pixel,
-
template<typename
T1
>
structvariance_multiplies
- #include <Pixel.h>
Calculate the variance when we multiply two Pixels
- Note
We provide a single-operand version for when the right-hand-side of an expression is a scalar, not a masked pixel,
-
template<typename
T1
>
structvariance_plus
- #include <Pixel.h>
Calculate the variance when we add (or subtract) two Pixels
- Note
We provide a single-operand version for when the right-hand-side of an expression is a scalar, not a masked pixel,
-
template<typename
T1
>
structvariance_plus_covar
- #include <Pixel.h>
The variance of the sum of a pair of correlated pixels
The covariance is modelled as alpha*sqrt(var_x*var_y)
- Note
We provide a single-operand version for when the right-hand-side of an expression is a scalar, not a masked pixel,
-
template<typename
-
namespace
python
-
typedef std::int32_t