|
lsst.afw
16.0-56-g615901931+1
|
A thin wrapper around std::map to allow aperture corrections to be attached to Exposures. More...
#include <ApCorrMap.h>
Public Types | |
| typedef Internal::const_iterator | Iterator |
| Iterator type returned by begin() and end(). More... | |
Public Member Functions | |
| ApCorrMap ()=default | |
| ApCorrMap (ApCorrMap const &)=default | |
| ApCorrMap (ApCorrMap &&)=default | |
| ApCorrMap & | operator= (ApCorrMap const &)=default |
| ApCorrMap & | operator= (ApCorrMap &&)=default |
| ~ApCorrMap () override=default | |
| Iterator | begin () const |
| Iterator | end () const |
| std::size_t | size () const |
| std::shared_ptr< math::BoundedField > const | operator[] (std::string const &name) const |
| Return the field with the given name, throwing NotFoundError when the name is not present. More... | |
| std::shared_ptr< math::BoundedField > const | get (std::string const &name) const |
| Return the field with the given name, returning an empty pointer when the name is not present. More... | |
| void | set (std::string const &name, std::shared_ptr< math::BoundedField > field) |
| Add or replace an aperture correction. More... | |
| bool | isPersistable () const noexcept override |
| Whether the map is persistable (true IFF all contained BoundedFields are persistable). More... | |
| ApCorrMap & | operator*= (double const scale) |
| Scale all fields by a constant. More... | |
| ApCorrMap & | operator/= (double const scale) |
| 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< ApCorrMap > | readFits (fits::Fits &fitsfile) |
| Read an object from an already open FITS object. More... | |
| static std::shared_ptr< ApCorrMap > | readFits (std::string const &fileName, int hdu=fits::DEFAULT_HDU) |
| Read an object from a regular FITS file. More... | |
| static std::shared_ptr< ApCorrMap > | readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU) |
| Read an object from a FITS file in memory. More... | |
| static std::shared_ptr< ApCorrMap > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
| Dynamically cast a shared_ptr. More... | |
Static Public Attributes | |
| static std::size_t const | MAX_NAME_LENGTH = 64 |
| Maximum number of characters for an aperture correction name (required for persistence). More... | |
Protected Types | |
| typedef io::OutputArchiveHandle | OutputArchiveHandle |
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).
Definition at line 44 of file ApCorrMap.h.
| typedef Internal::const_iterator lsst::afw::image::ApCorrMap::Iterator |
Iterator type returned by begin() and end().
Dereferences to a pair<string,std::shared_ptr<BoundedField>>.
Definition at line 53 of file ApCorrMap.h.
|
protectedinherited |
Definition at line 108 of file Persistable.h.
|
default |
|
default |
|
default |
|
overridedefault |
|
inline |
Definition at line 62 of file ApCorrMap.h.
|
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.
|
inline |
Definition at line 63 of file ApCorrMap.h.
| std::shared_ptr< math::BoundedField > const lsst::afw::image::ApCorrMap::get | ( | std::string const & | name | ) | const |
Return the field with the given name, returning an empty pointer when the name is not present.
Definition at line 53 of file ApCorrMap.cc.
|
overridevirtualnoexcept |
Whether the map is persistable (true IFF all contained BoundedFields are persistable).
Reimplemented from lsst::afw::table::io::Persistable.
Definition at line 118 of file ApCorrMap.cc.
| ApCorrMap & lsst::afw::image::ApCorrMap::operator*= | ( | double const | scale | ) |
Scale all fields by a constant.
Definition at line 140 of file ApCorrMap.cc.
|
inline |
Definition at line 81 of file ApCorrMap.h.
| std::shared_ptr< math::BoundedField > const lsst::afw::image::ApCorrMap::operator[] | ( | std::string const & | name | ) | const |
Return the field with the given name, throwing NotFoundError when the name is not present.
Definition at line 44 of file ApCorrMap.cc.
|
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::ApCorrMap::set | ( | std::string const & | name, |
| std::shared_ptr< math::BoundedField > | field | ||
| ) |
Add or replace an aperture correction.
Definition at line 61 of file ApCorrMap.cc.
|
inline |
Definition at line 65 of file ApCorrMap.h.
|
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.
|
static |
Maximum number of characters for an aperture correction name (required for persistence).
Definition at line 49 of file ApCorrMap.h.
1.8.13