LSST Applications g0265f82a02+c6dfa2ddaf,g1162b98a3f+b2075782a9,g2079a07aa2+1b2e822518,g2bbee38e9b+c6dfa2ddaf,g337abbeb29+c6dfa2ddaf,g3ddfee87b4+a60788ef87,g50ff169b8f+2eb0e556e8,g52b1c1532d+90ebb246c7,g555ede804d+a60788ef87,g591dd9f2cf+ba8caea58f,g5ec818987f+864ee9cddb,g858d7b2824+9ee1ab4172,g876c692160+a40945ebb7,g8a8a8dda67+90ebb246c7,g8cdfe0ae6a+4fd9e222a8,g99cad8db69+5e309b7bc6,g9ddcbc5298+a1346535a5,ga1e77700b3+df8f93165b,ga8c6da7877+aa12a14d27,gae46bcf261+c6dfa2ddaf,gb0e22166c9+8634eb87fb,gb3f2274832+d0da15e3be,gba4ed39666+1ac82b564f,gbb8dafda3b+5dfd9c994b,gbeb006f7da+97157f9740,gc28159a63d+c6dfa2ddaf,gc86a011abf+9ee1ab4172,gcf0d15dbbd+a60788ef87,gdaeeff99f8+1cafcb7cd4,gdc0c513512+9ee1ab4172,ge79ae78c31+c6dfa2ddaf,geb67518f79+ba1859f325,geb961e4c1e+f9439d1e6f,gee10cc3b42+90ebb246c7,gf1cff7945b+9ee1ab4172,w.2024.12
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
lsst::afw::table::ShapeSlotDefinition Class Reference

SlotDefinition specialization for shapes. More...

#include <slots.h>

Inheritance diagram for lsst::afw::table::ShapeSlotDefinition:
lsst::afw::table::SlotDefinition

Public Types

using MeasValue = geom::ellipses::Quadrupole
 Type returned by accessing the slot measurement.
 
using ErrValue = Eigen::Matrix<float, 3, 3>
 Type returned by accessing the slot uncertainty.
 
using MeasKey = QuadrupoleKey
 Key type used to access the slot measurement.
 
using ErrKey = CovarianceMatrixKey<float, 3>
 Key type used to access the slot uncertainty.
 

Public Member Functions

 ShapeSlotDefinition (std::string const &name)
 Construct a SlotDefinition from the name of the slot (e.g. "Shape")
 
bool isValid () const
 Return true if the key associated with the measurement is valid.
 
MeasKey getMeasKey () const
 Return the cached Key used to access the slot measurement.
 
ErrKey getErrKey () const
 Return the cached Key used to access the slot uncertainty.
 
Key< Flag > getFlagKey () const
 Return the cached Key used to access the slot failure flag.
 
void setKeys (std::string const &alias, Schema const &schema)
 Update the cached Keys following an change of aliases in the given Schema.
 
 ShapeSlotDefinition (ShapeSlotDefinition const &)=default
 
 ShapeSlotDefinition (ShapeSlotDefinition &&)=default
 
ShapeSlotDefinitionoperator= (ShapeSlotDefinition const &)=default
 
ShapeSlotDefinitionoperator= (ShapeSlotDefinition &&)=default
 
 ~ShapeSlotDefinition ()=default
 
std::string getName () const
 Return the name of the slot (e.g. "Centroid" or "PsfFlux")
 
std::string getAlias () const
 Return the alias field prefix used to lookup Keys for the slot.
 

Protected Attributes

std::string _name
 

Detailed Description

SlotDefinition specialization for shapes.

Definition at line 167 of file slots.h.

Member Typedef Documentation

◆ ErrKey

Key type used to access the slot uncertainty.

Definition at line 172 of file slots.h.

◆ ErrValue

Type returned by accessing the slot uncertainty.

Definition at line 170 of file slots.h.

◆ MeasKey

Key type used to access the slot measurement.

Definition at line 171 of file slots.h.

◆ MeasValue

Type returned by accessing the slot measurement.

Definition at line 169 of file slots.h.

Constructor & Destructor Documentation

◆ ShapeSlotDefinition() [1/3]

lsst::afw::table::ShapeSlotDefinition::ShapeSlotDefinition ( std::string const & name)
inlineexplicit

Construct a SlotDefinition from the name of the slot (e.g. "Shape")

Definition at line 175 of file slots.h.

175: SlotDefinition(name) {}
SlotDefinition(std::string const &name)
Construct a SlotDefinition from the name of the slot (e.g. "Centroid" or "PsfFlux")
Definition slots.h:50

◆ ShapeSlotDefinition() [2/3]

lsst::afw::table::ShapeSlotDefinition::ShapeSlotDefinition ( ShapeSlotDefinition const & )
default

◆ ShapeSlotDefinition() [3/3]

lsst::afw::table::ShapeSlotDefinition::ShapeSlotDefinition ( ShapeSlotDefinition && )
default

◆ ~ShapeSlotDefinition()

lsst::afw::table::ShapeSlotDefinition::~ShapeSlotDefinition ( )
default

Member Function Documentation

◆ getAlias()

std::string lsst::afw::table::SlotDefinition::getAlias ( ) const
inlineinherited

Return the alias field prefix used to lookup Keys for the slot.

This simply prepends "slot_" to the slot name.

Definition at line 60 of file slots.h.

60{ return "slot_" + _name; }

◆ getErrKey()

ErrKey lsst::afw::table::ShapeSlotDefinition::getErrKey ( ) const
inline

Return the cached Key used to access the slot uncertainty.

Definition at line 184 of file slots.h.

184{ return _errKey; }

◆ getFlagKey()

Key< Flag > lsst::afw::table::ShapeSlotDefinition::getFlagKey ( ) const
inline

Return the cached Key used to access the slot failure flag.

Definition at line 187 of file slots.h.

187{ return _flagKey; }

◆ getMeasKey()

MeasKey lsst::afw::table::ShapeSlotDefinition::getMeasKey ( ) const
inline

Return the cached Key used to access the slot measurement.

Definition at line 181 of file slots.h.

181{ return _measKey; }

◆ getName()

std::string lsst::afw::table::SlotDefinition::getName ( ) const
inlineinherited

Return the name of the slot (e.g. "Centroid" or "PsfFlux")

Definition at line 53 of file slots.h.

53{ return _name; }

◆ isValid()

bool lsst::afw::table::ShapeSlotDefinition::isValid ( ) const
inline

Return true if the key associated with the measurement is valid.

Definition at line 178 of file slots.h.

178{ return _measKey.isValid(); }
bool isValid() const noexcept
Return True if all the constituent Keys are valid.
Definition aggregates.h:429

◆ operator=() [1/2]

ShapeSlotDefinition & lsst::afw::table::ShapeSlotDefinition::operator= ( ShapeSlotDefinition && )
default

◆ operator=() [2/2]

ShapeSlotDefinition & lsst::afw::table::ShapeSlotDefinition::operator= ( ShapeSlotDefinition const & )
default

◆ setKeys()

void lsst::afw::table::ShapeSlotDefinition::setKeys ( std::string const & alias,
Schema const & schema )

Update the cached Keys following an change of aliases in the given Schema.

This method is intended for internal use by SourceTable only.

Parameters
[in]aliasIf non-empty, abort early if this string does not start with getAlias() (used to see if an alias change might have affected this slot, and avoid unnecessary work if not).
[in]schemaSchema to search for Keys.

Definition at line 96 of file slots.cc.

96 {
97 SubSchema s = schema["slot"][_name];
98 if (!alias.empty() && !startsWith(alias, s.getPrefix())) return;
99 static ErrKey::NameArray names = makeShapeNameArray();
100 _measKey = MeasKey();
101 _errKey = ErrKey();
102 _flagKey = Key<Flag>();
103 MeasFieldNameGetter helper(s, schema);
104 if (!helper.defined) return;
105 _measKey = helper.replaced;
106 try {
107 _errKey = ErrKey(s, names);
108 } catch (pex::exceptions::NotFoundError &) {
109 }
110 try {
111 _flagKey = s["flag"];
112 } catch (pex::exceptions::NotFoundError &) {
113 }
114}
CovarianceMatrixKey< float, 3 > ErrKey
Key type used to access the slot uncertainty.
Definition slots.h:172
QuadrupoleKey MeasKey
Key type used to access the slot measurement.
Definition slots.h:171

Member Data Documentation

◆ _name

std::string lsst::afw::table::SlotDefinition::_name
protectedinherited

Definition at line 69 of file slots.h.


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