lsst.afw gba399f52f3+9b61cfce8e
Loading...
Searching...
No Matches
lsst::afw::image::FilterLabel Class Referencefinal

A group of labels for a filter in an exposure or coadd. More...

#include <FilterLabel.h>

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

Classes

class  Factory

Public Member Functions

 FilterLabel (FilterLabel const &)
 FilterLabel (FilterLabel &&) noexcept
FilterLabel & operator= (FilterLabel const &)
FilterLabel & operator= (FilterLabel &&) noexcept
 ~FilterLabel () noexcept
bool hasBandLabel () const noexcept
 Return whether the filter label names a band.
std::string getBandLabel () const
 Return the band label.
bool hasPhysicalLabel () const noexcept
 Return whether the filter label names a physical filter.
std::string getPhysicalLabel () const
 Return the physical filter label.
std::size_t hash_value () const noexcept override
 Return a hash of this object.
std::string toString () const override
 Return a string representation of this object.
std::shared_ptr< Storable > cloneStorable () const override
 Create a new object that is a copy of this one.
bool equals (Storable const &other) const noexcept override
bool isPersistable () const noexcept override
 All filter labels are always persistable.
bool operator== (FilterLabel const &rhs) const noexcept
 Filter labels compare equal if their components are equal.
bool operator!= (FilterLabel const &rhs) const noexcept
 Filter labels compare equal if their components are equal.

Static Public Member Functions

static std::shared_ptr< FilterLabel > readFits (fits::Fits &fitsfile)
 Read an object from an already open FITS object.
static std::shared_ptr< FilterLabel > dynamicCast (std::shared_ptr< Persistable > const &ptr)
 Dynamically cast a shared_ptr.
static FilterLabel fromBandPhysical (std::string const &band, std::string const &physical)
 Construct a FilterLabel from specific inputs.
static FilterLabel fromBand (std::string const &band)
 Construct a FilterLabel from specific inputs.
static FilterLabel fromPhysical (std::string const &physical)
 Construct a FilterLabel from specific inputs.

Protected Member Functions

std::string getPersistenceName () const noexcept override
std::string getPythonModule () const noexcept override
void write (table::io::OutputArchiveHandle &handle) const override

Detailed Description

A group of labels for a filter in an exposure or coadd.

This class provides only identifiers for filters. Other filter information can be retrieved from an Exposure object or a Butler repository.

FilterLabel does not expose a public constructor in C++, except for copy and move constructors. You can create a FilterLabel by calling one of the from* factory methods, or (in Python) through a keyword-only constructor.

Not all of a FilterLabel object's labels need be defined, but at least one is guaranteed to be present.

Definition at line 58 of file FilterLabel.h.

Constructor & Destructor Documentation

◆ FilterLabel() [1/2]

lsst::afw::image::FilterLabel::FilterLabel ( FilterLabel const & )
default

◆ FilterLabel() [2/2]

lsst::afw::image::FilterLabel::FilterLabel ( FilterLabel && )
defaultnoexcept

◆ ~FilterLabel()

lsst::afw::image::FilterLabel::~FilterLabel ( )
defaultnoexcept

Member Function Documentation

◆ cloneStorable()

std::shared_ptr< typehandling::Storable > lsst::afw::image::FilterLabel::cloneStorable ( ) const
override

Create a new object that is a copy of this one.

Definition at line 156 of file FilterLabel.cc.

◆ dynamicCast()

template std::shared_ptr< math::WarpingControl > lsst::afw::table::io::PersistableFacade< FilterLabel >::dynamicCast ( std::shared_ptr< Persistable > const & ptr)
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;

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 218 of file Persistable.cc.

◆ equals()

bool lsst::afw::image::FilterLabel::equals ( Storable const & other) const
inlineoverridenoexcept

Definition at line 123 of file FilterLabel.h.

◆ fromBand()

FilterLabel lsst::afw::image::FilterLabel::fromBand ( std::string const & band)
static

Construct a FilterLabel from specific inputs.

Definition at line 72 of file FilterLabel.cc.

◆ fromBandPhysical()

FilterLabel lsst::afw::image::FilterLabel::fromBandPhysical ( std::string const & band,
std::string const & physical )
static

Construct a FilterLabel from specific inputs.

Definition at line 68 of file FilterLabel.cc.

◆ fromPhysical()

FilterLabel lsst::afw::image::FilterLabel::fromPhysical ( std::string const & physical)
static

Construct a FilterLabel from specific inputs.

Definition at line 74 of file FilterLabel.cc.

◆ getBandLabel()

std::string lsst::afw::image::FilterLabel::getBandLabel ( ) const

Return the band label.

In Python, this is replaced by the band read-only property.

Returns
The band label.
Exceptions
lsst::pex::exceptions::LogicErrorThrown if hasBandLabel() is false.

Definition at line 87 of file FilterLabel.cc.

◆ getPersistenceName()

std::string lsst::afw::image::FilterLabel::getPersistenceName ( ) const
overrideprotectednoexcept

Definition at line 232 of file FilterLabel.cc.

◆ getPhysicalLabel()

std::string lsst::afw::image::FilterLabel::getPhysicalLabel ( ) const

Return the physical filter label.

In Python, this is replaced by the physicalLabel read-only property.

Returns
The physical filter label.
Exceptions
lsst::pex::exceptions::LogicErrorThrown if hasPhysicalLabel() is false.

Definition at line 98 of file FilterLabel.cc.

◆ getPythonModule()

std::string lsst::afw::image::FilterLabel::getPythonModule ( ) const
overrideprotectednoexcept

Definition at line 233 of file FilterLabel.cc.

◆ hasBandLabel()

bool lsst::afw::image::FilterLabel::hasBandLabel ( ) const
noexcept

Return whether the filter label names a band.

Definition at line 85 of file FilterLabel.cc.

◆ hash_value()

std::size_t lsst::afw::image::FilterLabel::hash_value ( ) const
overridenoexcept

Return a hash of this object.

Definition at line 126 of file FilterLabel.cc.

◆ hasPhysicalLabel()

bool lsst::afw::image::FilterLabel::hasPhysicalLabel ( ) const
noexcept

Return whether the filter label names a physical filter.

Definition at line 96 of file FilterLabel.cc.

◆ isPersistable()

bool lsst::afw::image::FilterLabel::isPersistable ( ) const
inlineoverridenoexcept

All filter labels are always persistable.

Definition at line 128 of file FilterLabel.h.

◆ operator!=()

bool lsst::afw::image::FilterLabel::operator!= ( FilterLabel const & rhs) const
inlinenoexcept

Filter labels compare equal if their components are equal.

Note
This operation does not test whether two filters are the same. Two FilterLabels corresponding to identically-named filters on different instruments will compare equal.

Definition at line 112 of file FilterLabel.h.

◆ operator=() [1/2]

FilterLabel & lsst::afw::image::FilterLabel::operator= ( FilterLabel && )
defaultnoexcept

◆ operator=() [2/2]

FilterLabel & lsst::afw::image::FilterLabel::operator= ( FilterLabel const & )
default

◆ operator==()

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

Filter labels compare equal if their components are equal.

Note
This operation does not test whether two filters are the same. Two FilterLabels corresponding to identically-named filters on different instruments will compare equal.

Definition at line 107 of file FilterLabel.cc.

◆ readFits()

std::shared_ptr< FilterLabel > lsst::afw::table::io::PersistableFacade< FilterLabel >::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.

◆ toString()

std::string lsst::afw::image::FilterLabel::toString ( ) const
override

Return a string representation of this object.

Definition at line 137 of file FilterLabel.cc.

◆ write()

void lsst::afw::image::FilterLabel::write ( table::io::OutputArchiveHandle & handle) const
overrideprotected

Definition at line 235 of file FilterLabel.cc.


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