LSST Applications g0f08755f38+9c285cab97,g1635faa6d4+13f3999e92,g1653933729+a8ce1bb630,g1a0ca8cf93+bf6eb00ceb,g28da252d5a+0829b12dee,g29321ee8c0+5700dc9eac,g2bbee38e9b+9634bc57db,g2bc492864f+9634bc57db,g2cdde0e794+c2c89b37c4,g3156d2b45e+41e33cbcdc,g347aa1857d+9634bc57db,g35bb328faa+a8ce1bb630,g3a166c0a6a+9634bc57db,g3e281a1b8c+9f2c4e2fc3,g414038480c+077ccc18e7,g41af890bb2+fde0dd39b6,g5fbc88fb19+17cd334064,g781aacb6e4+a8ce1bb630,g80478fca09+55a9465950,g82479be7b0+d730eedb7d,g858d7b2824+9c285cab97,g9125e01d80+a8ce1bb630,g9726552aa6+10f999ec6a,ga5288a1d22+2a84bb7594,gacf8899fa4+c69c5206e8,gae0086650b+a8ce1bb630,gb58c049af0+d64f4d3760,gc28159a63d+9634bc57db,gcf0d15dbbd+4b7d09cae4,gda3e153d99+9c285cab97,gda6a2b7d83+4b7d09cae4,gdaeeff99f8+1711a396fd,ge2409df99d+5e831397f4,ge79ae78c31+9634bc57db,gf0baf85859+147a0692ba,gf3967379c6+41c94011de,gf3fb38a9a8+8f07a9901b,gfb92a5be7c+9c285cab97,w.2024.46
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Attributes | List of all members
lsst::afw::table::FluxSlotDefinition Class Reference

SlotDefinition specialization for fluxes. More...

#include <slots.h>

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

Public Types

using MeasValue = double
 Type returned by accessing the slot measurement.
 
using ErrValue = double
 Type returned by accessing the slot uncertainty.
 
using MeasKey = Key<double>
 Key type used to access the slot measurement.
 
using ErrKey = Key<double>
 Key type used to access the slot uncertainty.
 

Public Member Functions

 FluxSlotDefinition (std::string const &name)
 Construct a SlotDefinition from the name of the slot (e.g. "PsfFlux")
 
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.
 
 FluxSlotDefinition (FluxSlotDefinition const &)=default
 
 FluxSlotDefinition (FluxSlotDefinition &&)=default
 
FluxSlotDefinitionoperator= (FluxSlotDefinition const &)=default
 
FluxSlotDefinitionoperator= (FluxSlotDefinition &&)=default
 
 ~FluxSlotDefinition ()=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 fluxes.

Definition at line 73 of file slots.h.

Member Typedef Documentation

◆ ErrKey

Key type used to access the slot uncertainty.

Definition at line 78 of file slots.h.

◆ ErrValue

Type returned by accessing the slot uncertainty.

Definition at line 76 of file slots.h.

◆ MeasKey

Key type used to access the slot measurement.

Definition at line 77 of file slots.h.

◆ MeasValue

Type returned by accessing the slot measurement.

Definition at line 75 of file slots.h.

Constructor & Destructor Documentation

◆ FluxSlotDefinition() [1/3]

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

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

Definition at line 81 of file slots.h.

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

◆ FluxSlotDefinition() [2/3]

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

◆ FluxSlotDefinition() [3/3]

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

◆ ~FluxSlotDefinition()

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

Return the cached Key used to access the slot uncertainty.

Definition at line 90 of file slots.h.

90{ return _errKey; }

◆ getFlagKey()

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

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

Definition at line 93 of file slots.h.

93{ return _flagKey; }

◆ getMeasKey()

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

Return the cached Key used to access the slot measurement.

Definition at line 87 of file slots.h.

87{ 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::FluxSlotDefinition::isValid ( ) const
inline

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

Definition at line 84 of file slots.h.

84{ return _measKey.isValid(); }
bool isValid() const noexcept
Return true if the key was initialized to valid offset.
Definition Key.h:97

◆ operator=() [1/2]

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

◆ operator=() [2/2]

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

◆ setKeys()

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

32 {
33 SubSchema s = schema["slot"][_name];
34 if (!alias.empty() && !startsWith(alias, s.getPrefix())) return;
35 _measKey = MeasKey();
36 _errKey = ErrKey();
37 _flagKey = Key<Flag>();
38 MeasFieldNameGetter helper(s["instFlux"], schema);
39 if (!helper.defined) {
40 return;
41 }
42 _measKey = helper.replaced;
43 try {
44 _errKey = s["instFluxErr"];
45 } catch (pex::exceptions::NotFoundError &) {
46 }
47 try {
48 _flagKey = s["flag"];
49 } catch (pex::exceptions::NotFoundError &) {
50 }
51}
Key< double > MeasKey
Key type used to access the slot measurement.
Definition slots.h:77
Key< double > ErrKey
Key type used to access the slot uncertainty.
Definition slots.h:78

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: