LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+0dd8ce4237,g1470d8bcf6+3ea6592b6f,g2079a07aa2+86d27d4dc4,g2305ad1205+5ca4c0b359,g295015adf3+d10818ec9d,g2a9a014e59+6f9be1b9cd,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+703ba97ebf,g487adcacf7+4fa16da234,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+ffa42b374e,g5a732f18d5+53520f316c,g64a986408d+0dd8ce4237,g858d7b2824+0dd8ce4237,g8a8a8dda67+585e252eca,g99cad8db69+d39438377f,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+f1d96605c8,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+e5339d463f,gc120e1dc64+da31e9920e,gc28159a63d+0e5473021a,gcf0d15dbbd+703ba97ebf,gdaeeff99f8+f9a426f77a,ge6526c86ff+889fc9d533,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf18bd8381d+7268b93478,gff1a9f87cc+0dd8ce4237,w.2024.16
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
lsst::afw::table::CentroidSlotDefinition Class Reference

SlotDefinition specialization for centroids. More...

#include <slots.h>

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

Public Types

using MeasValue = lsst::geom::Point2D
 Type returned by accessing the slot measurement.
 
using ErrValue = Eigen::Matrix<float, 2, 2>
 Type returned by accessing the slot uncertainty.
 
using MeasKey = Point2DKey
 Key type used to access the slot measurement.
 
using ErrKey = CovarianceMatrixKey<float, 2>
 Key type used to access the slot uncertainty.
 

Public Member Functions

 CentroidSlotDefinition (std::string const &name)
 Construct a SlotDefinition from the name of the slot (e.g. "Centroid")
 
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.
 
 CentroidSlotDefinition (CentroidSlotDefinition const &)=default
 
 CentroidSlotDefinition (CentroidSlotDefinition &&)=default
 
CentroidSlotDefinitionoperator= (CentroidSlotDefinition const &)=default
 
CentroidSlotDefinitionoperator= (CentroidSlotDefinition &&)=default
 
 ~CentroidSlotDefinition ()=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 centroids.

Definition at line 120 of file slots.h.

Member Typedef Documentation

◆ ErrKey

Key type used to access the slot uncertainty.

Definition at line 125 of file slots.h.

◆ ErrValue

Type returned by accessing the slot uncertainty.

Definition at line 123 of file slots.h.

◆ MeasKey

Key type used to access the slot measurement.

Definition at line 124 of file slots.h.

◆ MeasValue

Type returned by accessing the slot measurement.

Definition at line 122 of file slots.h.

Constructor & Destructor Documentation

◆ CentroidSlotDefinition() [1/3]

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

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

Definition at line 128 of file slots.h.

128: 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

◆ CentroidSlotDefinition() [2/3]

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

◆ CentroidSlotDefinition() [3/3]

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

◆ ~CentroidSlotDefinition()

lsst::afw::table::CentroidSlotDefinition::~CentroidSlotDefinition ( )
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::CentroidSlotDefinition::getErrKey ( ) const
inline

Return the cached Key used to access the slot uncertainty.

Definition at line 137 of file slots.h.

137{ return _errKey; }

◆ getFlagKey()

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

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

Definition at line 140 of file slots.h.

140{ return _flagKey; }

◆ getMeasKey()

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

Return the cached Key used to access the slot measurement.

Definition at line 134 of file slots.h.

134{ 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::CentroidSlotDefinition::isValid ( ) const
inline

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

Definition at line 131 of file slots.h.

131{ return _measKey.isValid(); }
bool isValid() const noexcept
Return True if both the x and y Keys are valid.
Definition aggregates.h:106

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ setKeys()

void lsst::afw::table::CentroidSlotDefinition::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 64 of file slots.cc.

64 {
65 SubSchema s = schema["slot"][_name];
66 if (!alias.empty() && !startsWith(alias, s.getPrefix())) return;
67 static ErrKey::NameArray names = makeCentroidNameArray();
68 _measKey = MeasKey();
69 _errKey = ErrKey();
70 _flagKey = Key<Flag>();
71 MeasFieldNameGetter helper(s, schema);
72 if (!helper.defined) return;
73 _measKey = helper.replaced;
74 try {
75 _errKey = ErrKey(s, names);
76 } catch (pex::exceptions::NotFoundError &) {
77 }
78 try {
79 _flagKey = s["flag"];
80 } catch (pex::exceptions::NotFoundError &) {
81 }
82}
CovarianceMatrixKey< float, 2 > ErrKey
Key type used to access the slot uncertainty.
Definition slots.h:125
Point2DKey MeasKey
Key type used to access the slot measurement.
Definition slots.h:124

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: