LSST Applications g0485b4d2cb+45260c2012,g0fba68d861+90dd06f399,g1ec0fe41b4+eb5f8a2046,g1fd858c14a+551e8cb373,g2440f9efcc+8c5ae1fdc5,g35bb328faa+8c5ae1fdc5,g4d2262a081+ba77bf3834,g53246c7159+8c5ae1fdc5,g56a49b3a55+c2ace9aa91,g60b5630c4e+9860a7649d,g65f11fe441+7edbc1d107,g67b6fd64d1+0750dd6554,g6ba5f4ee81+86bfe0b13d,g78460c75b0+7e33a9eb6d,g786e29fd12+668abc6043,g8352419a5c+8c5ae1fdc5,g8852436030+7a386a17a7,g89139ef638+0750dd6554,g94187f82dc+9860a7649d,g989de1cb63+0750dd6554,g9d31334357+9860a7649d,g9f33ca652e+e619319a72,gabe3b4be73+8856018cbb,gabf8522325+7d313c7892,gb1101e3267+e9bfafe6b0,gb89ab40317+0750dd6554,gc91f06edcd+1820ccfa51,gcef618a4dd+9860a7649d,gcf25f946ba+7a386a17a7,gd6cbbdb0b4+d675535a7f,gdb8242c116+6d284a1357,gde0f65d7ad+2573be6663,ge278dab8ac+edfcd09300,ge410e46f29+0750dd6554,gf35d7ec915+97dd712d81,gf5e32f922b+8c5ae1fdc5,gf67bdafdda+0750dd6554,gf6800124b1+167e910d43,w.2025.20
LSST Data Management Base Package
Loading...
Searching...
No Matches
lsst::meas::extensions::simpleShape::SimpleShapeResultKey Class Referenceabstract

#include <simpleShape.h>

Inheritance diagram for lsst::meas::extensions::simpleShape::SimpleShapeResultKey:
lsst::afw::table::FunctorKey< SimpleShapeResult > lsst::afw::table::OutputFunctorKey< SimpleShapeResult > lsst::afw::table::InputFunctorKey< SimpleShapeResult >

Public Types

using Value
 The data type for get and set.
 

Public Member Functions

 SimpleShapeResultKey ()
 
 SimpleShapeResultKey (lsst::afw::table::SubSchema const &s)
 Construct from a subschema, assuming _xx, _yy, etc.
 
virtual SimpleShapeResult get (afw::table::BaseRecord const &record) const
 
virtual void set (afw::table::BaseRecord &record, SimpleShapeResult const &value) const
 
bool operator== (SimpleShapeResultKey const &other) const
 Compare the FunctorKey for equality with another, using the underlying Keys.
 
bool operator!= (SimpleShapeResultKey const &other) const
 
bool isValid () const
 Return True if the key is valid.
 
lsst::meas::base::FlagHandler const & getFlagHandler () const
 
virtual void set (BaseRecord &record, SimpleShapeResult const &value) const=0
 
virtual void set (BaseRecord &record, SimpleShapeResult const &value) const=0
 

Static Public Member Functions

static SimpleShapeResultKey addFields (afw::table::Schema &schema, std::string const &name)
 

Detailed Description

Definition at line 52 of file simpleShape.h.

Member Typedef Documentation

◆ Value

The data type for get and set.

Definition at line 77 of file FunctorKey.h.

Constructor & Destructor Documentation

◆ SimpleShapeResultKey() [1/2]

lsst::meas::extensions::simpleShape::SimpleShapeResultKey::SimpleShapeResultKey ( )
inline

Definition at line 60 of file simpleShape.h.

60{}

◆ SimpleShapeResultKey() [2/2]

lsst::meas::extensions::simpleShape::SimpleShapeResultKey::SimpleShapeResultKey ( lsst::afw::table::SubSchema const & s)

Construct from a subschema, assuming _xx, _yy, etc.

subfields

If a schema has "a_xx", "a_yy", etc. fields, this constructor allows you to construct a SimpleShapeResultKey via:

Definition at line 336 of file simpleShape.cc.

336 :
337 _shapeResult(s),
338 _centroidResult(s),
339 _uncertantyResult(s, std::vector<std::string> ({"Ixx", "Iyy", "Ixy", "Ix", "Iy"})),
340 _flagHandler(s, SimpleShape::getFlagDefinitions())
341{}
static base::FlagDefinitionList const & getFlagDefinitions()

Member Function Documentation

◆ addFields()

SimpleShapeResultKey lsst::meas::extensions::simpleShape::SimpleShapeResultKey::addFields ( afw::table::Schema & schema,
std::string const & name )
static

Definition at line 319 of file simpleShape.cc.

322 {
324 r._shapeResult = lsst::afw::table::QuadrupoleKey::addFields(schema,
325 name, "elliptical Gaussian moments");
326 r._centroidResult = lsst::afw::table::Point2DKey::addFields(schema,
327 name, "elliptical Gaussian moments", "pixel");
329 std::vector<std::string> ({"Ixx", "Iyy", "Ixy",
330 "Ix", "Iy"}), "pixel");
331 r._flagHandler = lsst::meas::base::FlagHandler::addFields(schema,
333 return r;
334}
static CovarianceMatrixKey addFields(Schema &schema, std::string const &prefix, NameArray const &names, std::string const &unit, bool diagonalOnly=false)
Add covariance matrix fields to a Schema, and return a CovarianceMatrixKey to manage them.
static PointKey addFields(Schema &schema, std::string const &name, std::string const &doc, std::string const &unit)
static QuadrupoleKey addFields(Schema &schema, std::string const &name, std::string const &doc, CoordinateType coordType=CoordinateType::PIXEL)
Add a set of quadrupole subfields to a schema and return a QuadrupoleKey that points to them.
static FlagHandler addFields(afw::table::Schema &schema, std::string const &prefix, FlagDefinitionList const &flagDefs, FlagDefinitionList const &exclDefs=FlagDefinitionList::getEmptyList())
Add Flag fields to a schema, creating a FlagHandler object to manage them.

◆ get()

SimpleShapeResult lsst::meas::extensions::simpleShape::SimpleShapeResultKey::get ( afw::table::BaseRecord const & record) const
virtual

Implements lsst::afw::table::OutputFunctorKey< SimpleShapeResult >.

Definition at line 343 of file simpleShape.cc.

343 {
344 SimpleShapeResult result;
345 result.ellipse = record.get(_shapeResult);
346 result.center = record.get(_centroidResult);
347 result.covariance = record.get(_uncertantyResult);
348 for (std::size_t n = 0; n < SimpleShape::N_FLAGS; ++n) {
349 result.flags[n] = _flagHandler.getValue(record, n);
350 }
351 return result;
352}
decltype(sizeof(void *)) size_t
Definition doctest.h:524

◆ getFlagHandler()

lsst::meas::base::FlagHandler const & lsst::meas::extensions::simpleShape::SimpleShapeResultKey::getFlagHandler ( ) const
inline

Definition at line 85 of file simpleShape.h.

85{ return _flagHandler; }

◆ isValid()

bool lsst::meas::extensions::simpleShape::SimpleShapeResultKey::isValid ( ) const

Return True if the key is valid.

Definition at line 370 of file simpleShape.cc.

370 {
371 return _shapeResult.isValid() &&
372 _centroidResult.isValid() &&
373 _uncertantyResult.isValid();
374 //don't bother with flags - if we've gotten this far, it's basically impossible the flags don't match
375}

◆ operator!=()

bool lsst::meas::extensions::simpleShape::SimpleShapeResultKey::operator!= ( SimpleShapeResultKey const & other) const
inline

Definition at line 79 of file simpleShape.h.

79{ return !(*this == other); }

◆ operator==()

bool lsst::meas::extensions::simpleShape::SimpleShapeResultKey::operator== ( SimpleShapeResultKey const & other) const

Compare the FunctorKey for equality with another, using the underlying Keys.

Definition at line 363 of file simpleShape.cc.

363 {
364 return _shapeResult == other._shapeResult &&
365 _centroidResult == other._centroidResult &&
366 _uncertantyResult == other._uncertantyResult;
367 //don't bother with flags - if we've gotten this far, it's basically impossible the flags don't match
368}

◆ set() [1/3]

virtual void lsst::afw::table::InputFunctorKey< SimpleShapeResult >::set ( BaseRecord & record,
SimpleShapeResult const & value ) const
pure virtualinherited

◆ set() [2/3]

virtual void lsst::afw::table::InputFunctorKey< SimpleShapeResult >::set ( BaseRecord & record,
SimpleShapeResult const & value ) const
pure virtualinherited

◆ set() [3/3]

void lsst::meas::extensions::simpleShape::SimpleShapeResultKey::set ( afw::table::BaseRecord & record,
SimpleShapeResult const & value ) const
virtual

Definition at line 354 of file simpleShape.cc.

354 {
355 record.set(_shapeResult, value.ellipse);
356 record.set(_centroidResult, value.center);
357 record.set(_uncertantyResult, value.covariance);
358 for (std::size_t n = 0; n < SimpleShape::N_FLAGS; ++n) {
359 _flagHandler.setValue(record, n, value.flags[n]);
360 }
361}

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