LSSTApplications
17.0+1,17.0+10,17.0+16,17.0+17,17.0+2,17.0+3,17.0+4,17.0-1-g377950a+9,17.0.1-1-g444bd44+10,17.0.1-1-g46e6382+11,17.0.1-1-g4d4fbc4+4,17.0.1-1-g5f4ed7e,17.0.1-1-g703d48b+6,17.0.1-1-g8de6c91,17.0.1-1-g9deacb5+10,17.0.1-1-gf4e0155+11,17.0.1-1-gfc65f5f+10,17.0.1-1-gfc6fb1f+5,17.0.1-2-g3bdf598,17.0.1-2-g3e5d191+1,17.0.1-2-ga5d6a7c+5,17.0.1-2-gd73ec07+11,17.0.1-3-gcbbb95d+5,17.0.1-3-geaa4c8a+4,17.0.1-4-gf25f8e6+1,17.0.1-5-g19503fb,17.0.1-5-g5a10bbc+2,17.0.1-5-ga118c797,17.0.1-6-g640019af,17.0.1-6-g7bb9714,17.0.1-7-gf7766dbc3,17.0.1-8-g879df34,w.2019.13
LSSTDataManagementBasePackage
|
Describe an exposure's calibration. More...
#include <Calib.h>
Public Member Functions | |
Calib () noexcept | |
ctor More... | |
Calib (double fluxMag0) | |
ctor from a given fluxMagnitude zero point More... | |
Calib (std::vector< std::shared_ptr< Calib const >> const &calibs) | |
ctor from a vector of Calibs More... | |
Calib (std::shared_ptr< lsst::daf::base::PropertySet const >) | |
ctor More... | |
Calib (Calib const &) noexcept | |
Calib (Calib &&) noexcept | |
Calib & | operator= (Calib const &) noexcept |
Calib & | operator= (Calib &&) noexcept |
~Calib () noexcept override | |
void | setFluxMag0 (double fluxMag0, double fluxMag0Err=0.0) |
Set the flux of a zero-magnitude object. More... | |
void | setFluxMag0 (std::pair< double, double > fluxMag0AndErr) |
std::pair< double, double > | getFluxMag0 () const |
Return the flux, and error in flux, of a zero-magnitude object. More... | |
double | getFlux (double const mag) const |
Return a flux (in ADUs) given a magnitude. More... | |
std::pair< double, double > | getFlux (double const mag, double const magErr) const |
Return a flux and flux error (in ADUs) given a magnitude and magnitude error. More... | |
ndarray::Array< double, 1 > | getFlux (ndarray::Array< double const, 1 > const &mag) const |
std::pair< ndarray::Array< double, 1 >, ndarray::Array< double, 1 > > | getFlux (ndarray::Array< double const, 1 > const &mag, ndarray::Array< double const, 1 > const &magErr) const |
double | getMagnitude (double const flux) const |
Return a magnitude given a flux. More... | |
std::pair< double, double > | getMagnitude (double const flux, double const fluxErr) const |
Return a magnitude and magnitude error given a flux and flux error. More... | |
ndarray::Array< double, 1 > | getMagnitude (ndarray::Array< double const, 1 > const &flux) const |
std::pair< ndarray::Array< double, 1 >, ndarray::Array< double, 1 > > | getMagnitude (ndarray::Array< double const, 1 > const &flux, ndarray::Array< double const, 1 > const &fluxErr) const |
bool | operator== (Calib const &rhs) const noexcept |
Are two Calibs identical? More... | |
bool | operator!= (Calib const &rhs) const noexcept |
std::size_t | hash_value () const noexcept |
Return a hash of this object. More... | |
Calib & | operator*= (double const scale) |
Calib & | operator/= (double const scale) |
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 void | setThrowOnNegativeFlux (bool raiseException) noexcept |
Set whether Calib should throw an exception when asked to convert a flux to a magnitude. More... | |
static bool | getThrowOnNegativeFlux () noexcept |
Tell me whether Calib will throw an exception if asked to convert a flux to a magnitude. More... | |
static std::shared_ptr< Calib > | readFits (fits::Fits &fitsfile) |
Read an object from an already open FITS object. More... | |
static std::shared_ptr< Calib > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
Read an object from a regular FITS file. More... | |
static std::shared_ptr< Calib > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
Read an object from a FITS file in memory. More... | |
static std::shared_ptr< Calib > | 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... | |
|
protectedinherited |
Definition at line 108 of file Persistable.h.
|
explicitnoexcept |
|
explicit |
|
explicit |
ctor from a vector of Calibs
calibs | Set of calibs to be merged |
Definition at line 108 of file Calib.cc.
|
explicit |
|
defaultnoexcept |
|
defaultnoexcept |
|
overridedefaultnoexcept |
|
staticinherited |
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;
lsst::pex::exceptions::LogicError | if the cast fails |
param[in] ptr The pointer to be cast.
lsst::pex::exceptions::TypeError | If the dynamic cast fails. |
Definition at line 18 of file Persistable.cc.
double lsst::afw::image::Calib::getFlux | ( | double const | mag | ) | const |
std::pair< double, double > lsst::afw::image::Calib::getFlux | ( | double const | mag, |
double const | magErr | ||
) | const |
ndarray::Array< double, 1 > lsst::afw::image::Calib::getFlux | ( | ndarray::Array< double const, 1 > const & | mag | ) | const |
std::pair< ndarray::Array< double, 1 >, ndarray::Array< double, 1 > > lsst::afw::image::Calib::getFlux | ( | ndarray::Array< double const, 1 > const & | mag, |
ndarray::Array< double const, 1 > const & | magErr | ||
) | const |
Definition at line 264 of file Calib.cc.
std::pair< double, double > lsst::afw::image::Calib::getFluxMag0 | ( | ) | const |
double lsst::afw::image::Calib::getMagnitude | ( | double const | flux | ) | const |
Return a magnitude given a flux.
flux | the measured flux of the object (ADUs) |
Definition at line 290 of file Calib.cc.
std::pair< double, double > lsst::afw::image::Calib::getMagnitude | ( | double const | flux, |
double const | fluxErr | ||
) | const |
Return a magnitude and magnitude error given a flux and flux error.
flux | the measured flux of the object (ADUs) |
fluxErr | the error in the measured flux (ADUs) |
Definition at line 298 of file Calib.cc.
ndarray::Array< double, 1 > lsst::afw::image::Calib::getMagnitude | ( | ndarray::Array< double const, 1 > const & | flux | ) | const |
Definition at line 310 of file Calib.cc.
std::pair< ndarray::Array< double, 1 >, ndarray::Array< double, 1 > > lsst::afw::image::Calib::getMagnitude | ( | ndarray::Array< double const, 1 > const & | flux, |
ndarray::Array< double const, 1 > const & | fluxErr | ||
) | const |
Definition at line 331 of file Calib.cc.
|
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.
|
protectedvirtualinherited |
Return the fully-qualified Python module that should be imported to guarantee that its factory is registered.
Must be less than ArchiveIndexSchema::MAX_MODULE_LENGTH characters.
Will be ignored if empty.
Reimplemented in lsst::afw::math::Kernel, lsst::afw::geom::SkyWcs, lsst::meas::modelfit::Mixture, lsst::afw::detection::Footprint, lsst::afw::geom::Transform< FromEndpoint, ToEndpoint >, lsst::afw::geom::Transform< afw::geom::Point2Endpoint, afw::geom::GenericEndpoint >, lsst::afw::image::TransmissionCurve, lsst::afw::math::ChebyshevBoundedField, lsst::meas::algorithms::CoaddPsf, lsst::afw::math::Function< ReturnT >, lsst::afw::math::Function< Kernel::Pixel >, lsst::afw::cameraGeom::DetectorCollection, lsst::meas::algorithms::CoaddBoundedField, lsst::afw::detection::GaussianPsf, lsst::afw::math::TransformBoundedField, lsst::afw::image::CoaddInputs, and lsst::meas::algorithms::KernelPsf.
Definition at line 36 of file Persistable.cc.
|
staticnoexcept |
|
noexcept |
Return a hash of this object.
Definition at line 184 of file Calib.cc.
|
inlineoverridevirtualnoexcept |
Return true if this particular object can be persisted using afw::table::io.
Reimplemented from lsst::afw::table::io::Persistable.
|
inlinenoexcept |
Calib & lsst::afw::image::Calib::operator*= | ( | double const | scale | ) |
|
inline |
|
noexcept |
|
inlinestaticinherited |
Read an object from an already open FITS object.
[in] | fitsfile | FITS object to read from, already positioned at the desired HDU. |
Definition at line 183 of file Persistable.h.
|
inlinestaticinherited |
Read an object from a regular FITS file.
[in] | fileName | Name of the file to read. |
[in] | hdu | HDU 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.
|
inlinestaticinherited |
Read an object from a FITS file in memory.
[in] | manager | Manager for the memory to read from. |
[in] | hdu | HDU 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.
void lsst::afw::image::Calib::setFluxMag0 | ( | double | fluxMag0, |
double | fluxMag0Err = 0.0 |
||
) |
void lsst::afw::image::Calib::setFluxMag0 | ( | std::pair< double, double > | fluxMag0AndErr | ) |
|
staticnoexcept |
|
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 436 of file Calib.cc.
|
inherited |
Write the object to a regular FITS file.
[in] | fileName | Name of the file to write to. |
[in] | mode | If "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.
|
inherited |
Write the object to a FITS image in memory.
[in] | manager | Name of the file to write to. |
[in] | mode | If "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.
|
inherited |
Write the object to an already-open FITS object.
[in] | fitsfile | Open FITS object to write to. |
Definition at line 18 of file Persistable.cc.