|
lsst.afw gba399f52f3+9b61cfce8e
|
A thin wrapper around std::map to allow aperture corrections to be attached to Exposures. More...
#include <ApCorrMap.h>
Public Types | |
| using | Iterator = Internal::const_iterator |
| Iterator type returned by begin() and end(). | |
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. | |
| 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. | |
| void | set (std::string const &name, std::shared_ptr< math::BoundedField > field) |
| Add or replace an aperture correction. | |
| bool | isPersistable () const noexcept override |
| Whether the map is persistable (true IFF all contained BoundedFields are persistable). | |
| ApCorrMap & | operator*= (double const scale) |
| Scale all fields by a constant. | |
| ApCorrMap & | operator/= (double const scale) |
| std::shared_ptr< typehandling::Storable > | cloneStorable () const override |
| Create a new ApCorrMap that is a copy of this one. | |
Static Public Member Functions | |
| static std::shared_ptr< ApCorrMap > | readFits (fits::Fits &fitsfile) |
| Read an object from an already open FITS object. | |
| static std::shared_ptr< ApCorrMap > | dynamicCast (std::shared_ptr< Persistable > const &ptr) |
| Dynamically cast a shared_ptr. | |
Static Public Attributes | |
| static std::size_t const | MAX_NAME_LENGTH = 64 |
| Maximum number of characters for an aperture correction name (required for persistence). | |
Private Member Functions | |
| std::string | getPersistenceName () const override |
| std::string | getPythonModule () const override |
| void | write (OutputArchiveHandle &handle) const override |
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 45 of file ApCorrMap.h.
| using lsst::afw::image::ApCorrMap::Iterator = Internal::const_iterator |
Iterator type returned by begin() and end().
Dereferences to a pair<string,std::shared_ptr<BoundedField>>.
Definition at line 54 of file ApCorrMap.h.
|
default |
|
default |
|
default |
|
overridedefault |
|
inline |
Definition at line 63 of file ApCorrMap.h.
|
override |
Create a new ApCorrMap that is a copy of this one.
Definition at line 147 of file ApCorrMap.cc.
|
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 218 of file Persistable.cc.
|
inline |
Definition at line 64 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.
|
overrideprivate |
Definition at line 123 of file ApCorrMap.cc.
|
overrideprivate |
Definition at line 125 of file ApCorrMap.cc.
|
overridenoexcept |
Whether the map is persistable (true IFF all contained BoundedFields are persistable).
Definition at line 116 of file ApCorrMap.cc.
| ApCorrMap & lsst::afw::image::ApCorrMap::operator*= | ( | double const | scale | ) |
Scale all fields by a constant.
Definition at line 138 of file ApCorrMap.cc.
|
inline |
Definition at line 82 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.
| 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 66 of file ApCorrMap.h.
|
overrideprivate |
Definition at line 127 of file ApCorrMap.cc.
|
static |
Maximum number of characters for an aperture correction name (required for persistence).
Definition at line 50 of file ApCorrMap.h.