lsst.afw  17.0.1-4-g41c8d5dc0+2
Public Member Functions | Static Public Member Functions | Protected Types | Protected Member Functions | Friends | List of all members
lsst::afw::image::PhotoCalib Class Reference

The photometric calibration of an exposure. More...

#include <PhotoCalib.h>

Inheritance diagram for lsst::afw::image::PhotoCalib:
lsst::afw::table::io::PersistableFacade< PhotoCalib > lsst::afw::table::io::Persistable

Public Member Functions

 PhotoCalib (PhotoCalib const &)=delete
 
 PhotoCalib (PhotoCalib &&)=delete
 
PhotoCalib & operator= (PhotoCalib const &)=delete
 
PhotoCalib & operator= (PhotoCalib &&)=delete
 
 ~PhotoCalib () override=default
 
 PhotoCalib ()
 Create a empty, zeroed calibration. More...
 
 PhotoCalib (double calibrationMean, double calibrationErr=0, lsst::geom::Box2I const &bbox=lsst::geom::Box2I())
 Create a non-spatially-varying calibration. More...
 
 PhotoCalib (std::shared_ptr< afw::math::BoundedField > calibration, double calibrationErr=0)
 Create a spatially-varying calibration. More...
 
 PhotoCalib (double calibrationMean, double calibrationErr, std::shared_ptr< afw::math::BoundedField > calibration, bool isConstant)
 Create a calibration with a pre-computed mean. More...
 
double instFluxToNanojansky (double instFlux, lsst::geom::Point< double, 2 > const &point) const
 Convert instFlux in ADU to nJy at a point in the BoundedField. More...
 
double instFluxToNanojansky (double instFlux) const
 
Measurement instFluxToNanojansky (double instFlux, double instFluxErr, lsst::geom::Point< double, 2 > const &point) const
 Convert instFlux and error in instFlux (ADU) to nJy and nJy error. More...
 
Measurement instFluxToNanojansky (double instFlux, double instFluxErr) const
 
Measurement instFluxToNanojansky (const afw::table::SourceRecord &sourceRecord, std::string const &instFluxField) const
 Convert sourceRecord[instFluxField_instFlux] (ADU) at location (sourceRecord.get("x"), sourceRecord.get("y")) (pixels) to flux and flux error (in nJy). More...
 
ndarray::Array< double, 2, 2 > instFluxToNanojansky (afw::table::SourceCatalog const &sourceCatalog, std::string const &instFluxField) const
 Convert sourceCatalog[instFluxField_instFlux] (ADU) at locations (sourceCatalog.get("x"), sourceCatalog.get("y")) (pixels) to nJy. More...
 
void instFluxToNanojansky (afw::table::SourceCatalog &sourceCatalog, std::string const &instFluxField, std::string const &outField) const
 Convert sourceCatalog[instFluxField_instFlux] (ADU) at locations (sourceCatalog.get("x"), sourceCatalog.get("y")) (pixels) to nJy and write the results back to sourceCatalog[outField_mag]. More...
 
double instFluxToMagnitude (double instFlux, lsst::geom::Point< double, 2 > const &point) const
 Convert instFlux in ADU to AB magnitude. More...
 
double instFluxToMagnitude (double instFlux) const
 
Measurement instFluxToMagnitude (double instFlux, double instFluxErr, lsst::geom::Point< double, 2 > const &point) const
 Convert instFlux and error in instFlux (ADU) to AB magnitude and magnitude error. More...
 
Measurement instFluxToMagnitude (double instFlux, double instFluxErr) const
 
Measurement instFluxToMagnitude (afw::table::SourceRecord const &sourceRecord, std::string const &instFluxField) const
 Convert sourceRecord[instFluxField_instFlux] (ADU) at location (sourceRecord.get("x"), sourceRecord.get("y")) (pixels) to AB magnitude. More...
 
ndarray::Array< double, 2, 2 > instFluxToMagnitude (afw::table::SourceCatalog const &sourceCatalog, std::string const &instFluxField) const
 Convert sourceCatalog[instFluxField_instFlux] (ADU) at locations (sourceCatalog.get("x"), sourceCatalog.get("y")) (pixels) to AB magnitudes. More...
 
void instFluxToMagnitude (afw::table::SourceCatalog &sourceCatalog, std::string const &instFluxField, std::string const &outField) const
 Convert instFluxes in a catalog to AB magnitudes and write back into the catalog. More...
 
MaskedImage< float > calibrateImage (MaskedImage< float > const &maskedImage, bool includeScaleUncertainty=true) const
 Return a flux calibrated image, with pixel values in nJy. More...
 
double magnitudeToInstFlux (double magnitude, lsst::geom::Point< double, 2 > const &point) const
 Convert AB magnitude to instFlux (ADU). More...
 
double magnitudeToInstFlux (double magnitude) const
 
double getCalibrationMean () const
 Get the mean photometric calibration. More...
 
double getCalibrationErr () const
 Get the mean photometric calibration error. More...
 
double getInstFluxAtZeroMagnitude () const
 Get the magnitude zero point (the instrumental flux corresponding to 0 magnitude). More...
 
std::shared_ptr< afw::math::BoundedField > computeScaledCalibration () const
 Calculates the spatially-variable calibration, normalized by the mean in the valid domain. More...
 
std::shared_ptr< afw::math::BoundedField > computeScalingTo (std::shared_ptr< PhotoCalib > other) const
 Calculates the scaling between this PhotoCalib and another PhotoCalib. More...
 
bool operator== (PhotoCalib const &rhs) const
 Two PhotoCalibs are equal if their component bounded fields and calibrationErr are equal. More...
 
bool operator!= (PhotoCalib const &rhs) const
 Two PhotoCalibs are equal if their component bounded fields and calibrationErr are equal. More...
 
bool isPersistable () const noexcept override
 Return true if this particular object can be persisted using afw::table::io. More...
 
void writeFits (std::string const &fileName, std::string const &mode="w") const
 Write the object to a regular FITS file. More...
 
void writeFits (fits::MemFileManager &manager, std::string const &mode="w") const
 Write the object to a FITS image in memory. More...
 
void writeFits (fits::Fits &fitsfile) const
 Write the object to an already-open FITS object. More...
 

Static Public Member Functions

static std::shared_ptr< PhotoCalib > readFits (fits::Fits &fitsfile)
 Read an object from an already open FITS object. More...
 
static std::shared_ptr< PhotoCalib > readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU)
 Read an object from a regular FITS file. More...
 
static std::shared_ptr< PhotoCalib > readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU)
 Read an object from a FITS file in memory. More...
 
static std::shared_ptr< PhotoCalib > dynamicCast (std::shared_ptr< Persistable > const &ptr)
 Dynamically cast a shared_ptr. More...
 

Protected Types

typedef io::OutputArchiveHandle OutputArchiveHandle
 

Protected Member Functions

std::string getPersistenceName () const override
 Return the unique name used to persist this object and look up its factory. More...
 
void write (OutputArchiveHandle &handle) const override
 Write the object to one or more catalogs. More...
 
virtual std::string getPythonModule () const
 Return the fully-qualified Python module that should be imported to guarantee that its factory is registered. More...
 

Friends

std::ostream & operator<< (std::ostream &os, PhotoCalib const &photoCalib)
 

Detailed Description

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.

Definition at line 111 of file PhotoCalib.h.

Member Typedef Documentation

◆ OutputArchiveHandle

typedef io::OutputArchiveHandle lsst::afw::table::io::Persistable::OutputArchiveHandle
protectedinherited

Definition at line 108 of file Persistable.h.

Constructor & Destructor Documentation

◆ PhotoCalib() [1/6]

lsst::afw::image::PhotoCalib::PhotoCalib ( PhotoCalib const &  )
delete

◆ PhotoCalib() [2/6]

lsst::afw::image::PhotoCalib::PhotoCalib ( PhotoCalib &&  )
delete

◆ ~PhotoCalib()

lsst::afw::image::PhotoCalib::~PhotoCalib ( )
overridedefault

◆ PhotoCalib() [3/6]

lsst::afw::image::PhotoCalib::PhotoCalib ( )
inline

Create a empty, zeroed calibration.

Definition at line 124 of file PhotoCalib.h.

◆ PhotoCalib() [4/6]

lsst::afw::image::PhotoCalib::PhotoCalib ( double  calibrationMean,
double  calibrationErr = 0,
lsst::geom::Box2I const &  bbox = lsst::geom::Box2I() 
)
inlineexplicit

Create a non-spatially-varying calibration.

Parameters
[in]calibrationMeanThe spatially-constant calibration (must be non-negative).
[in]calibrationErrThe error on the calibration (must be non-negative).
[in]bboxThe bounding box on which this PhotoCalib is valid. If not specified, this PhotoCalib is valid at any point (i.e. an empty bbox).

Definition at line 134 of file PhotoCalib.h.

◆ PhotoCalib() [5/6]

lsst::afw::image::PhotoCalib::PhotoCalib ( std::shared_ptr< afw::math::BoundedField >  calibration,
double  calibrationErr = 0 
)
inline

Create a spatially-varying calibration.

Parameters
[in]calibrationThe spatially varying photometric calibration (must have non-negative mean).
[in]calibrationErrThe error on the calibration (must be non-negative).

Definition at line 151 of file PhotoCalib.h.

◆ PhotoCalib() [6/6]

lsst::afw::image::PhotoCalib::PhotoCalib ( double  calibrationMean,
double  calibrationErr,
std::shared_ptr< afw::math::BoundedField >  calibration,
bool  isConstant 
)
inline

Create a calibration with a pre-computed mean.

Primarily for de-persistence.

Parameters
[in]calibrationMeanThe mean of the calibration() over its bounding box (must be non-negative).
[in]calibrationErrThe error on the calibration (must be non-negative).
[in]calibrationThe spatially varying photometric calibration.
[in]isConstantIs this PhotoCalib spatially constant?

Definition at line 168 of file PhotoCalib.h.

Member Function Documentation

◆ calibrateImage()

MaskedImage< float > lsst::afw::image::PhotoCalib::calibrateImage ( MaskedImage< float > const &  maskedImage,
bool  includeScaleUncertainty = true 
) const

Return a flux calibrated image, with pixel values in nJy.

Mask pixels are propogated directly from the input image.

Parameters
maskedImageThe masked image to calibrate.
includeScaleUncertaintyInclude the uncertainty on the calibration in the resulting variance?
Returns
The calibrated masked image.

Definition at line 239 of file PhotoCalib.cc.

◆ computeScaledCalibration()

std::shared_ptr< math::BoundedField > lsst::afw::image::PhotoCalib::computeScaledCalibration ( ) const

Calculates the spatially-variable calibration, normalized by the mean in the valid domain.

This value is defined, for instFlux at (x,y), such that:

\[ instFlux*computeScaledCalibration()(x,y)*getCalibrationMean() = instFluxToNanojansky(instFlux, (x,y)) \]

See also
PhotoCalib::getCalibrationMean()
Returns
The normalized spatially-variable calibration.

Definition at line 214 of file PhotoCalib.cc.

◆ computeScalingTo()

std::shared_ptr< math::BoundedField > lsst::afw::image::PhotoCalib::computeScalingTo ( std::shared_ptr< PhotoCalib >  other) const

Calculates the scaling between this PhotoCalib and another PhotoCalib.

The BoundedFields of these PhotoCalibs must have the same BBoxes (or one or both must be empty).

With:

  • c = instFlux at position (x,y)
  • this = this PhotoCalib
  • other = other PhotoCalib
  • return = BoundedField returned by this method the return value from this method is defined as:

    \[ this.instFluxToNanojansky(c, (x,y))*return(x, y) = other.instFluxToNanojansky(c, (x,y)) \]

Parameters
[in]otherThe PhotoCalib to scale to.
Returns
The BoundedField as defined above.
Warning
Not implemented yet: See DM-10154.

Definition at line 218 of file PhotoCalib.cc.

◆ dynamicCast()

Dynamically cast a shared_ptr.

Dynamically cast a shared pointer and raise on failure.

You must provide an explicit template instantiation in the .cc file for each class that inherits from PersistableFacade. Designed to work around RTTI issues on macOS with hidden symbols;

Exceptions
lsst::pex::exceptions::LogicErrorif the cast fails

param[in] ptr The pointer to be cast.

Returns
The cast pointer.
Exceptions
lsst::pex::exceptions::TypeErrorIf the dynamic cast fails.

Definition at line 18 of file Persistable.cc.

◆ getCalibrationErr()

double lsst::afw::image::PhotoCalib::getCalibrationErr ( ) const
inline

Get the mean photometric calibration error.

This value is defined such that for some instFluxErr, instFlux, and flux:

\[ sqrt((instFluxErr/instFlux)^2 + (calibrationErr/calibration(x,y))^2)*flux = fluxErr [nJy] \]

See also
PhotoCalib::computeScaledCalibration(), getCalibrationMean()
Returns
The calibration error.

Definition at line 390 of file PhotoCalib.h.

◆ getCalibrationMean()

double lsst::afw::image::PhotoCalib::getCalibrationMean ( ) const
inline

Get the mean photometric calibration.

This value is defined, for instFlux at (x,y), such that:

\[ instFlux*computeScaledCalibration()(x,y)*getCalibrationMean() = instFluxToNanojansky(instFlux, (x,y)) \]

See also
PhotoCalib::computeScaledCalibration(), getCalibrationErr(), getInstFluxAtZeroMagnitude()
Returns
The spatial mean of this calibration.

Definition at line 376 of file PhotoCalib.h.

◆ getInstFluxAtZeroMagnitude()

double lsst::afw::image::PhotoCalib::getInstFluxAtZeroMagnitude ( ) const
inline

Get the magnitude zero point (the instrumental flux corresponding to 0 magnitude).

This value is defined such that:

\[ instFluxToMagnitude(getInstFluxAtZeroMagnitude()) == 0 \]

See also
PhotoCalib::computeScaledCalibration(), getCalibrationMean()
Returns
The instFlux magnitude zero point.

Definition at line 404 of file PhotoCalib.h.

◆ getPersistenceName()

std::string lsst::afw::image::PhotoCalib::getPersistenceName ( ) const
overrideprotectedvirtual

Return the unique name used to persist this object and look up its factory.

Must be less than ArchiveIndexSchema::MAX_NAME_LENGTH characters.

Reimplemented from lsst::afw::table::io::Persistable.

Definition at line 339 of file PhotoCalib.cc.

◆ getPythonModule()

std::string lsst::afw::table::io::Persistable::getPythonModule ( ) const
protectedvirtualinherited

◆ instFluxToMagnitude() [1/7]

double lsst::afw::image::PhotoCalib::instFluxToMagnitude ( double  instFlux,
lsst::geom::Point< double, 2 > const &  point 
) const

Convert instFlux in ADU to AB magnitude.

If passed point, use the exact calculation at that point, otherwise, use the mean scaling factor.

Parameters
[in]instFluxThe source instFlux in ADU.
[in]pointThe point that instFlux is measured at.
Returns
The AB magnitude.

Definition at line 151 of file PhotoCalib.cc.

◆ instFluxToMagnitude() [2/7]

double lsst::afw::image::PhotoCalib::instFluxToMagnitude ( double  instFlux) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 155 of file PhotoCalib.cc.

◆ instFluxToMagnitude() [3/7]

Measurement lsst::afw::image::PhotoCalib::instFluxToMagnitude ( double  instFlux,
double  instFluxErr,
lsst::geom::Point< double, 2 > const &  point 
) const

Convert instFlux and error in instFlux (ADU) to AB magnitude and magnitude error.

If passed point, use the exact calculation at that point, otherwise, use the mean scaling factor.

Parameters
[in]instFluxThe source instFlux in ADU.
[in]instFluxErrThe instFlux error (standard deviation).
[in]pointThe point that instFlux is measured at.
Returns
The AB magnitude and error.

Definition at line 159 of file PhotoCalib.cc.

◆ instFluxToMagnitude() [4/7]

Measurement lsst::afw::image::PhotoCalib::instFluxToMagnitude ( double  instFlux,
double  instFluxErr 
) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 168 of file PhotoCalib.cc.

◆ instFluxToMagnitude() [5/7]

Measurement lsst::afw::image::PhotoCalib::instFluxToMagnitude ( afw::table::SourceRecord const &  sourceRecord,
std::string const &  instFluxField 
) const

Convert sourceRecord[instFluxField_instFlux] (ADU) at location (sourceRecord.get("x"), sourceRecord.get("y")) (pixels) to AB magnitude.

Parameters
[in]sourceRecordThe source record to get instFlux and position from.
[in]instFluxFieldThe instFlux field: Keys of the form "*_instFlux" and "*_instFluxErr" must exist. For example: instFluxField = "PsfFlux" -> "PsfFlux_instFlux", "PsfFlux_instFluxErr"
Returns
The magnitude and magnitude error for this source.

Definition at line 174 of file PhotoCalib.cc.

◆ instFluxToMagnitude() [6/7]

ndarray::Array< double, 2, 2 > lsst::afw::image::PhotoCalib::instFluxToMagnitude ( afw::table::SourceCatalog const &  sourceCatalog,
std::string const &  instFluxField 
) const

Convert sourceCatalog[instFluxField_instFlux] (ADU) at locations (sourceCatalog.get("x"), sourceCatalog.get("y")) (pixels) to AB magnitudes.

Parameters
[in]sourceCatalogThe source catalog to get instFlux and position from.
[in]instFluxFieldThe instFlux field: Keys of the form "*_instFlux" and "*_instFluxErr" must exist. For example: instFluxField = "PsfFlux" -> "PsfFlux_instFlux", "PsfFlux_instFluxErr"
Returns
The magnitudes and magnitude errors for the sources.

Definition at line 182 of file PhotoCalib.cc.

◆ instFluxToMagnitude() [7/7]

void lsst::afw::image::PhotoCalib::instFluxToMagnitude ( afw::table::SourceCatalog &  sourceCatalog,
std::string const &  instFluxField,
std::string const &  outField 
) const

Convert instFluxes in a catalog to AB magnitudes and write back into the catalog.

Convert sourceCatalog[instFluxField_instFlux] (ADU) at locations (sourceCatalog.get("x"), sourceCatalog.get("y")) (pixels) to AB magnitudes and write the results back to sourceCatalog[outField_mag].

Parameters
[in]sourceCatalogThe source catalog to get instFlux and position from.
[in]instFluxFieldThe instFlux field: Keys of the form "*_instFlux" and "*_instFluxErr" must exist. For example: instFluxField = "PsfFlux" -> "PsfFlux_instFlux", "PsfFlux_instFluxErr"
[in]outFieldThe field to write the magnitudes and magnitude errors to. Keys of the form "*_instFlux", "*_instFluxErr", *_mag", and "*_magErr" must exist in the schema.
Warning
Not implemented yet: See DM-10155.

Definition at line 190 of file PhotoCalib.cc.

◆ instFluxToNanojansky() [1/7]

double lsst::afw::image::PhotoCalib::instFluxToNanojansky ( double  instFlux,
lsst::geom::Point< double, 2 > const &  point 
) const

Convert instFlux in ADU to nJy at a point in the BoundedField.

If passed point, use the exact calculation at that point, otherwise, use the mean scaling factor.

Parameters
[in]instFluxThe source instFlux in ADU.
[in]pointThe point that instFlux is measured at.
Returns
The flux in nJy.

Definition at line 97 of file PhotoCalib.cc.

◆ instFluxToNanojansky() [2/7]

double lsst::afw::image::PhotoCalib::instFluxToNanojansky ( double  instFlux) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 101 of file PhotoCalib.cc.

◆ instFluxToNanojansky() [3/7]

Measurement lsst::afw::image::PhotoCalib::instFluxToNanojansky ( double  instFlux,
double  instFluxErr,
lsst::geom::Point< double, 2 > const &  point 
) const

Convert instFlux and error in instFlux (ADU) to nJy and nJy error.

If passed point, use the exact calculation at that point, otherwise, use the mean scaling factor.

Parameters
[in]instFluxThe source fluxinstFlux in ADU.
[in]instFluxErrThe instFlux error.
[in]pointThe point that instFlux is measured at.
Returns
The flux in nJy and error.

Definition at line 105 of file PhotoCalib.cc.

◆ instFluxToNanojansky() [4/7]

Measurement lsst::afw::image::PhotoCalib::instFluxToNanojansky ( double  instFlux,
double  instFluxErr 
) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 114 of file PhotoCalib.cc.

◆ instFluxToNanojansky() [5/7]

Measurement lsst::afw::image::PhotoCalib::instFluxToNanojansky ( const afw::table::SourceRecord &  sourceRecord,
std::string const &  instFluxField 
) const

Convert sourceRecord[instFluxField_instFlux] (ADU) at location (sourceRecord.get("x"), sourceRecord.get("y")) (pixels) to flux and flux error (in nJy).

Parameters
[in]sourceRecordThe source record to get instFlux and position from.
[in]instFluxFieldThe instFlux field: Keys of the form "*_instFlux" and "*_instFluxErr" must exist. For example: instFluxField = "PsfFlux" -> "PsfFlux_instFlux", "PsfFlux_instFluxErr"
Returns
The flux in nJy and error for this source.

Definition at line 120 of file PhotoCalib.cc.

◆ instFluxToNanojansky() [6/7]

ndarray::Array< double, 2, 2 > lsst::afw::image::PhotoCalib::instFluxToNanojansky ( afw::table::SourceCatalog const &  sourceCatalog,
std::string const &  instFluxField 
) const

Convert sourceCatalog[instFluxField_instFlux] (ADU) at locations (sourceCatalog.get("x"), sourceCatalog.get("y")) (pixels) to nJy.

Parameters
[in]sourceCatalogThe source catalog to get instFlux and position from.
[in]instFluxFieldThe instFlux field: Keys of the form "*_instFlux" and "*_instFluxErr" must exist. For example: instFluxField = "PsfFlux" -> "PsfFlux_instFlux", "PsfFlux_instFluxErr"
Returns
The flux in nJy and error for this source.

Definition at line 127 of file PhotoCalib.cc.

◆ instFluxToNanojansky() [7/7]

void lsst::afw::image::PhotoCalib::instFluxToNanojansky ( afw::table::SourceCatalog &  sourceCatalog,
std::string const &  instFluxField,
std::string const &  outField 
) const

Convert sourceCatalog[instFluxField_instFlux] (ADU) at locations (sourceCatalog.get("x"), sourceCatalog.get("y")) (pixels) to nJy and write the results back to sourceCatalog[outField_mag].

Parameters
[in]sourceCatalogThe source catalog to get instFlux and position from.
[in]instFluxFieldThe instFlux field: Keys of the form "*_instFlux" and "*_instFluxErr" must exist. For example: instFluxField = "PsfFlux" -> "PsfFlux_instFlux", "PsfFlux_instFluxErr"
[in]outFieldThe field to write the nJy and magnitude errors to. Keys of the form "*_instFlux" and "*_instFluxErr" must exist in the schema.
Warning
Not implemented yet: See DM-10155.

Definition at line 135 of file PhotoCalib.cc.

◆ isPersistable()

bool lsst::afw::image::PhotoCalib::isPersistable ( ) const
inlineoverridevirtualnoexcept

Return true if this particular object can be persisted using afw::table::io.

Reimplemented from lsst::afw::table::io::Persistable.

Definition at line 450 of file PhotoCalib.h.

◆ magnitudeToInstFlux() [1/2]

double lsst::afw::image::PhotoCalib::magnitudeToInstFlux ( double  magnitude,
lsst::geom::Point< double, 2 > const &  point 
) const

Convert AB magnitude to instFlux (ADU).

If passed point, use the exact calculation at that point, otherwise, use the mean scaling factor.

Useful for inserting fake sources into an image.

Parameters
[in]magnitudeThe AB magnitude to convert.
[in]pointThe position that magnitude is to be converted at.
Returns
Source instFlux in ADU.

Definition at line 210 of file PhotoCalib.cc.

◆ magnitudeToInstFlux() [2/2]

double lsst::afw::image::PhotoCalib::magnitudeToInstFlux ( double  magnitude) const

This is an overloaded member function, provided for convenience. It differs from the above function only in what argument(s) it accepts.

Definition at line 206 of file PhotoCalib.cc.

◆ operator!=()

bool lsst::afw::image::PhotoCalib::operator!= ( PhotoCalib const &  rhs) const
inline

Two PhotoCalibs are equal if their component bounded fields and calibrationErr are equal.

Definition at line 448 of file PhotoCalib.h.

◆ operator=() [1/2]

PhotoCalib& lsst::afw::image::PhotoCalib::operator= ( PhotoCalib const &  )
delete

◆ operator=() [2/2]

PhotoCalib& lsst::afw::image::PhotoCalib::operator= ( PhotoCalib &&  )
delete

◆ operator==()

bool lsst::afw::image::PhotoCalib::operator== ( PhotoCalib const &  rhs) const

Two PhotoCalibs are equal if their component bounded fields and calibrationErr are equal.

Definition at line 222 of file PhotoCalib.cc.

◆ readFits() [1/3]

static std::shared_ptr<PhotoCalib > lsst::afw::table::io::PersistableFacade< PhotoCalib >::readFits ( fits::Fits &  fitsfile)
inlinestaticinherited

Read an object from an already open FITS object.

Parameters
[in]fitsfileFITS object to read from, already positioned at the desired HDU.

Definition at line 183 of file Persistable.h.

◆ readFits() [2/3]

static std::shared_ptr<PhotoCalib > lsst::afw::table::io::PersistableFacade< PhotoCalib >::readFits ( std::string const &  fileName,
int  hdu = fits::DEFAULT_HDU 
)
inlinestaticinherited

Read an object from a regular FITS file.

Parameters
[in]fileNameName of the file to read.
[in]hduHDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty.

Definition at line 194 of file Persistable.h.

◆ readFits() [3/3]

static std::shared_ptr<PhotoCalib > lsst::afw::table::io::PersistableFacade< PhotoCalib >::readFits ( fits::MemFileManager &  manager,
int  hdu = fits::DEFAULT_HDU 
)
inlinestaticinherited

Read an object from a FITS file in memory.

Parameters
[in]managerManager for the memory to read from.
[in]hduHDU to read, where 0 is the primary. The special value of afw::fits::DEFAULT_HDU skips the primary HDU if it is empty.

Definition at line 205 of file Persistable.h.

◆ write()

void lsst::afw::image::PhotoCalib::write ( OutputArchiveHandle &  handle) const
overrideprotectedvirtual

Write the object to one or more catalogs.

The handle object passed to this function provides an interface for adding new catalogs and adding nested objects to the same archive (while checking for duplicates). See OutputArchiveHandle for more information.

Reimplemented from lsst::afw::table::io::Persistable.

Definition at line 341 of file PhotoCalib.cc.

◆ writeFits() [1/3]

void lsst::afw::table::io::Persistable::writeFits ( std::string const &  fileName,
std::string const &  mode = "w" 
) const
inherited

Write the object to a regular FITS file.

Parameters
[in]fileNameName of the file to write to.
[in]modeIf "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file.

Definition at line 24 of file Persistable.cc.

◆ writeFits() [2/3]

void lsst::afw::table::io::Persistable::writeFits ( fits::MemFileManager &  manager,
std::string const &  mode = "w" 
) const
inherited

Write the object to a FITS image in memory.

Parameters
[in]managerName of the file to write to.
[in]modeIf "w", any existing file with the given name will be overwritten. If "a", new HDUs will be appended to an existing file.

Definition at line 29 of file Persistable.cc.

◆ writeFits() [3/3]

void lsst::afw::table::io::Persistable::writeFits ( fits::Fits &  fitsfile) const
inherited

Write the object to an already-open FITS object.

Parameters
[in]fitsfileOpen FITS object to write to.

Definition at line 18 of file Persistable.cc.

Friends And Related Function Documentation

◆ operator<<

std::ostream& operator<< ( std::ostream &  os,
PhotoCalib const &  photoCalib 
)
friend

Definition at line 231 of file PhotoCalib.cc.


The documentation for this class was generated from the following files: