LSST Applications g0265f82a02+0e5473021a,g02d81e74bb+bd2ed33bd6,g1470d8bcf6+c6d6eb38e2,g14a832a312+9d12ad093c,g2079a07aa2+86d27d4dc4,g2305ad1205+91a32aca49,g295015adf3+88246b6574,g2bbee38e9b+0e5473021a,g337abbeb29+0e5473021a,g3ddfee87b4+c34e8be1fa,g487adcacf7+85dcfbcc36,g50ff169b8f+96c6868917,g52b1c1532d+585e252eca,g591dd9f2cf+ea1711114f,g5a732f18d5+53520f316c,g64a986408d+bd2ed33bd6,g858d7b2824+bd2ed33bd6,g8a8a8dda67+585e252eca,g99cad8db69+016a06b37a,g9ddcbc5298+9a081db1e4,ga1e77700b3+15fc3df1f7,ga8c6da7877+ef4e3a5875,gb0e22166c9+60f28cb32d,gb6a65358fc+0e5473021a,gba4ed39666+c2a2e4ac27,gbb8dafda3b+b6d7b42999,gc120e1dc64+f745648b3a,gc28159a63d+0e5473021a,gcf0d15dbbd+c34e8be1fa,gdaeeff99f8+f9a426f77a,ge6526c86ff+508d0e0a30,ge79ae78c31+0e5473021a,gee10cc3b42+585e252eca,gf18bd8381d+8d59551888,gf1cff7945b+bd2ed33bd6,w.2024.16
LSST Data Management Base Package
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Protected Member Functions | Friends | List of all members
lsst::afw::table::SourceRecord Class Reference

Record class that contains measurements made on a single exposure. More...

#include <Source.h>

Inheritance diagram for lsst::afw::table::SourceRecord:
lsst::afw::table::SimpleRecord lsst::afw::table::BaseRecord

Public Types

using Table = SourceTable
 
using ColumnView = SourceColumnViewT<SourceRecord>
 
using Catalog = SortedCatalogT<SourceRecord>
 
using ConstCatalog = SortedCatalogT<const SourceRecord>
 

Public Member Functions

 SourceRecord (ConstructionToken const &token, detail::RecordData &&data)
 Constructor used by SourceTable.
 
std::shared_ptr< FootprintgetFootprint () const
 
void setFootprint (std::shared_ptr< Footprint > const &footprint)
 
std::shared_ptr< SourceTable constgetTable () const
 
RecordId getParent () const
 Convenience accessors for the keys in the minimal source schema.
 
void setParent (RecordId id)
 
FluxSlotDefinition::MeasValue getPsfInstFlux () const
 Get the value of the PsfFlux slot measurement.
 
FluxSlotDefinition::ErrValue getPsfInstFluxErr () const
 Get the uncertainty on the PsfFlux slot measurement.
 
bool getPsfFluxFlag () const
 Return true if the measurement in the PsfFlux slot failed.
 
FluxSlotDefinition::MeasValue getModelInstFlux () const
 Get the value of the ModelFlux slot measurement.
 
FluxSlotDefinition::ErrValue getModelInstFluxErr () const
 Get the uncertainty on the ModelFlux slot measurement.
 
bool getModelFluxFlag () const
 Return true if the measurement in the ModelFlux slot failed.
 
FluxSlotDefinition::MeasValue getApInstFlux () const
 Get the value of the ApFlux slot measurement.
 
FluxSlotDefinition::ErrValue getApInstFluxErr () const
 Get the uncertainty on the ApFlux slot measurement.
 
bool getApFluxFlag () const
 Return true if the measurement in the ApFlux slot failed.
 
FluxSlotDefinition::MeasValue getGaussianInstFlux () const
 Get the value of the GaussianFlux slot measurement.
 
FluxSlotDefinition::ErrValue getGaussianInstFluxErr () const
 Get the uncertainty on the GaussianFlux slot measurement.
 
bool getGaussianFluxFlag () const
 Return true if the measurement in the GaussianFlux slot failed.
 
FluxSlotDefinition::MeasValue getCalibInstFlux () const
 Get the value of the CalibFlux slot measurement.
 
FluxSlotDefinition::ErrValue getCalibInstFluxErr () const
 Get the uncertainty on the CalibFlux slot measurement.
 
bool getCalibFluxFlag () const
 Return true if the measurement in the CalibFlux slot failed.
 
CentroidSlotDefinition::MeasValue getCentroid () const
 Get the value of the Centroid slot measurement.
 
CentroidSlotDefinition::ErrValue getCentroidErr () const
 Get the uncertainty on the Centroid slot measurement.
 
bool getCentroidFlag () const
 Return true if the measurement in the Centroid slot failed.
 
ShapeSlotDefinition::MeasValue getShape () const
 Get the value of the Shape slot measurement.
 
ShapeSlotDefinition::ErrValue getShapeErr () const
 Get the uncertainty on the Shape slot measurement.
 
bool getShapeFlag () const
 Return true if the measurement in the Shape slot failed.
 
double getX () const
 Return the centroid slot x coordinate.
 
double getY () const
 Return the centroid slot y coordinate.
 
double getIxx () const
 Return the shape slot Ixx value.
 
double getIyy () const
 Return the shape slot Iyy value.
 
double getIxy () const
 Return the shape slot Ixy value.
 
void updateCoord (geom::SkyWcs const &wcs, bool include_covariance=true)
 Update the coord field using the given Wcs and the field in the centroid slot.
 
void updateCoord (geom::SkyWcs const &wcs, PointKey< double > const &key, bool include_covariance=true)
 Update the coord field using the given Wcs and the image center from the given key.
 
 SourceRecord (const SourceRecord &)=delete
 
SourceRecordoperator= (const SourceRecord &)=delete
 
 SourceRecord (SourceRecord &&)=delete
 
SourceRecordoperator= (SourceRecord &&)=delete
 
 ~SourceRecord ()
 
RecordId getId () const
 Convenience accessors for the keys in the minimal reference schema.
 
void setId (RecordId id)
 
lsst::geom::SpherePoint getCoord () const
 
void setCoord (lsst::geom::SpherePoint const &coord)
 
lsst::geom::Angle getRa () const
 
void setRa (lsst::geom::Angle ra)
 
lsst::geom::Angle getDec () const
 
void setDec (lsst::geom::Angle dec)
 
Schema getSchema () const
 Return the Schema that holds this record's fields and keys.
 
template<typename T >
Field< T >::Element * getElement (Key< T > const &key)
 Return a pointer to the underlying elements of a field (non-const).
 
template<typename T >
Field< T >::Element constgetElement (Key< T > const &key) const
 Return a pointer to the underlying elements of a field (const).
 
template<typename T >
Field< T >::Reference operator[] (Key< T > const &key)
 Return a reference (or reference-like type) to the field's value.
 
template<typename T >
Field< T >::ConstReference operator[] (Key< T > const &key) const
 Return a const reference (or const-reference-like type) to the field's value.
 
template<typename Ref >
Ref operator[] (ReferenceFunctorKey< Ref > const &key)
 
template<typename ConstRef >
ConstRef operator[] (ConstReferenceFunctorKey< ConstRef > const &key) const
 
template<typename T >
Field< T >::Value get (Key< T > const &key) const
 Return the value of a field for the given key.
 
template<typename T >
get (OutputFunctorKey< T > const &key) const
 Compute a calculated or aggregate field.
 
template<typename T , typename U >
void set (Key< T > const &key, U const &value)
 Set value of a field for the given key.
 
template<typename T , typename U >
void set (InputFunctorKey< T > const &key, U const &value)
 Set a calculated or aggregate field.
 
void assign (BaseRecord const &other)
 Copy all field values from other to this, requiring that they have equal schemas.
 
void assign (BaseRecord const &other, SchemaMapper const &mapper)
 Copy field values from other to this, using a mapper.
 
ndarray::Manager::Ptr getManager () const
 

Protected Member Functions

virtual void _assign (BaseRecord const &other)
 Called by assign() after transferring fields to allow subclass data members to be copied.
 
virtual void _stream (std::ostream &os) const
 Called by operator<<.
 

Friends

class SourceTable
 

Detailed Description

Record class that contains measurements made on a single exposure.

Sources provide four additions to SimpleRecord / SimpleRecord:

Definition at line 78 of file Source.h.

Member Typedef Documentation

◆ Catalog

Definition at line 82 of file Source.h.

◆ ColumnView

Definition at line 81 of file Source.h.

◆ ConstCatalog

Definition at line 83 of file Source.h.

◆ Table

Definition at line 80 of file Source.h.

Constructor & Destructor Documentation

◆ SourceRecord() [1/3]

lsst::afw::table::SourceRecord::SourceRecord ( ConstructionToken const & token,
detail::RecordData && data )
inline

Constructor used by SourceTable.

While formally public, this constructor is conceptually and effectively protected, due to the (protected) ConstructionToken argument.

This is to allow make_shared to be used, as that cannot be used on a truly protected or private constructor.

Definition at line 94 of file Source.h.

94 :
96 {}
char * data
Definition BaseRecord.cc:61
SimpleRecord(ConstructionToken const &token, detail::RecordData &&data)
Constructor used by SimpleTable.
Definition Simple.h:64
T move(T... args)

◆ SourceRecord() [2/3]

lsst::afw::table::SourceRecord::SourceRecord ( const SourceRecord & )
delete

◆ SourceRecord() [3/3]

lsst::afw::table::SourceRecord::SourceRecord ( SourceRecord && )
delete

◆ ~SourceRecord()

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

Member Function Documentation

◆ _assign()

void lsst::afw::table::SourceRecord::_assign ( BaseRecord const & other)
protectedvirtual

Called by assign() after transferring fields to allow subclass data members to be copied.

Reimplemented from lsst::afw::table::BaseRecord.

Definition at line 392 of file Source.cc.

392 {
393 try {
394 SourceRecord const &s = dynamic_cast<SourceRecord const &>(other);
395 _footprint = s._footprint;
396 } catch (std::bad_cast &) {
397 }
398}

◆ _stream()

void lsst::afw::table::BaseRecord::_stream ( std::ostream & os) const
protectedvirtualinherited

Called by operator<<.

Overrides should call the base class implementation and append additional fields on new lines, with the syntax "%(name)s: %(value)s".

Definition at line 152 of file BaseRecord.cc.

152 {
153 getSchema().forEach([&os, this](auto const& item) {
154 os << item.field.getName() << ": " << this->get(item.key) << std::endl;
155 });
156}
Field< T >::Value get(Key< T > const &key) const
Return the value of a field for the given key.
Definition BaseRecord.h:151
Schema getSchema() const
Return the Schema that holds this record's fields and keys.
Definition BaseRecord.h:80
void forEach(F &func) const
Apply a functor to each SchemaItem in the Schema.
Definition Schema.h:214
T endl(T... args)

◆ assign() [1/2]

void lsst::afw::table::BaseRecord::assign ( BaseRecord const & other)
inherited

Copy all field values from other to this, requiring that they have equal schemas.

Definition at line 122 of file BaseRecord.cc.

122 {
123 if (this->getSchema() != other.getSchema()) {
124 throw LSST_EXCEPT(lsst::pex::exceptions::LogicError, "Unequal schemas in record assignment.");
125 }
126 this->getSchema().forEach(CopyValue(&other, this));
127 this->_assign(other); // let derived classes assign their own stuff
128}
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition Exception.h:48
virtual void _assign(BaseRecord const &other)
Called by assign() after transferring fields to allow subclass data members to be copied.
Definition BaseRecord.h:209
Reports errors in the logical structure of the program.
Definition Runtime.h:46

◆ assign() [2/2]

void lsst::afw::table::BaseRecord::assign ( BaseRecord const & other,
SchemaMapper const & mapper )
inherited

Copy field values from other to this, using a mapper.

Definition at line 130 of file BaseRecord.cc.

130 {
131 if (!other.getSchema().contains(mapper.getInputSchema())) {
133 "Unequal schemas between input record and mapper.");
134 }
135 if (!this->getSchema().contains(mapper.getOutputSchema())) {
137 "Unequal schemas between output record and mapper.");
138 }
139 mapper.forEach(CopyValue(&other, this)); // use the functor we defined above
140 this->_assign(other); // let derived classes assign their own stuff
141}
SchemaMapper * mapper

◆ get() [1/2]

template<typename T >
Field< T >::Value lsst::afw::table::BaseRecord::get ( Key< T > const & key) const
inlineinherited

Return the value of a field for the given key.

No checking is done to ensure the Key belongs to the correct schema.

Definition at line 151 of file BaseRecord.h.

151 {
152 return key.getValue(getElement(key), _manager);
153 }
Field< T >::Element * getElement(Key< T > const &key)
Return a pointer to the underlying elements of a field (non-const).
Definition BaseRecord.h:93

◆ get() [2/2]

template<typename T >
T lsst::afw::table::BaseRecord::get ( OutputFunctorKey< T > const & key) const
inlineinherited

Compute a calculated or aggregate field.

Definition at line 172 of file BaseRecord.h.

172 {
173 return key.get(*this);
174 }

◆ getApFluxFlag()

bool lsst::afw::table::SourceRecord::getApFluxFlag ( ) const
inline

Return true if the measurement in the ApFlux slot failed.

Definition at line 542 of file Source.h.

542 {
543 return this->get(getTable()->getApFluxSlot().getFlagKey());
544}
std::shared_ptr< SourceTable const > getTable() const
Definition Source.h:102

◆ getApInstFlux()

FluxSlotDefinition::MeasValue lsst::afw::table::SourceRecord::getApInstFlux ( ) const
inline

Get the value of the ApFlux slot measurement.

Definition at line 534 of file Source.h.

534 {
535 return this->get(getTable()->getApFluxSlot().getMeasKey());
536}

◆ getApInstFluxErr()

FluxSlotDefinition::ErrValue lsst::afw::table::SourceRecord::getApInstFluxErr ( ) const
inline

Get the uncertainty on the ApFlux slot measurement.

Definition at line 538 of file Source.h.

538 {
539 return this->get(getTable()->getApFluxSlot().getErrKey());
540}

◆ getCalibFluxFlag()

bool lsst::afw::table::SourceRecord::getCalibFluxFlag ( ) const
inline

Return true if the measurement in the CalibFlux slot failed.

Definition at line 566 of file Source.h.

566 {
567 return this->get(getTable()->getCalibFluxSlot().getFlagKey());
568}

◆ getCalibInstFlux()

FluxSlotDefinition::MeasValue lsst::afw::table::SourceRecord::getCalibInstFlux ( ) const
inline

Get the value of the CalibFlux slot measurement.

Definition at line 558 of file Source.h.

558 {
559 return this->get(getTable()->getCalibFluxSlot().getMeasKey());
560}

◆ getCalibInstFluxErr()

FluxSlotDefinition::ErrValue lsst::afw::table::SourceRecord::getCalibInstFluxErr ( ) const
inline

Get the uncertainty on the CalibFlux slot measurement.

Definition at line 562 of file Source.h.

562 {
563 return this->get(getTable()->getCalibFluxSlot().getErrKey());
564}

◆ getCentroid()

CentroidSlotDefinition::MeasValue lsst::afw::table::SourceRecord::getCentroid ( ) const
inline

Get the value of the Centroid slot measurement.

Definition at line 570 of file Source.h.

570 {
571 return this->get(getTable()->getCentroidSlot().getMeasKey());
572}

◆ getCentroidErr()

CentroidSlotDefinition::ErrValue lsst::afw::table::SourceRecord::getCentroidErr ( ) const
inline

Get the uncertainty on the Centroid slot measurement.

Definition at line 574 of file Source.h.

574 {
575 return this->get(getTable()->getCentroidSlot().getErrKey());
576}

◆ getCentroidFlag()

bool lsst::afw::table::SourceRecord::getCentroidFlag ( ) const
inline

Return true if the measurement in the Centroid slot failed.

Definition at line 578 of file Source.h.

578 {
579 return this->get(getTable()->getCentroidSlot().getFlagKey());
580}

◆ getCoord()

lsst::geom::SpherePoint lsst::afw::table::SimpleRecord::getCoord ( ) const
inlineinherited

Definition at line 231 of file Simple.h.

231{ return get(SimpleTable::getCoordKey()); }
static CoordKey getCoordKey()
Key for the celestial coordinates.
Definition Simple.h:172

◆ getDec()

lsst::geom::Angle lsst::afw::table::SimpleRecord::getDec ( ) const
inlineinherited

Definition at line 239 of file Simple.h.

239{ return get(SimpleTable::getCoordKey().getDec()); }
lsst::geom::Angle getDec() const
Definition Simple.h:239

◆ getElement() [1/2]

template<typename T >
Field< T >::Element * lsst::afw::table::BaseRecord::getElement ( Key< T > const & key)
inlineinherited

Return a pointer to the underlying elements of a field (non-const).

This low-level access is intended mostly for use with serialization; users should generally prefer the safer get(), set() and operator[] member functions.

Definition at line 93 of file BaseRecord.h.

93 {
94 if (!key.isValid()) {
95 throw LSST_EXCEPT(
96 pex::exceptions::LogicError,
97 "Key is not valid (if this is a SourceRecord, make sure slot aliases have been set up).");
98 }
99 return reinterpret_cast<typename Field<T>::Element*>(reinterpret_cast<char*>(_data) +
100 key.getOffset());
101 }

◆ getElement() [2/2]

template<typename T >
Field< T >::Element const * lsst::afw::table::BaseRecord::getElement ( Key< T > const & key) const
inlineinherited

Return a pointer to the underlying elements of a field (const).

This low-level access is intended mostly for use with serialization; users should generally prefer the safer get(), set() and operator[] member functions.

Definition at line 111 of file BaseRecord.h.

111 {
112 if (!key.isValid()) {
113 throw LSST_EXCEPT(
114 pex::exceptions::LogicError,
115 "Key is not valid (if this is a SourceRecord, make sure slot aliases have been set up).");
116 }
117 return reinterpret_cast<typename Field<T>::Element const*>(reinterpret_cast<char const*>(_data) +
118 key.getOffset());
119 }

◆ getFootprint()

std::shared_ptr< Footprint > lsst::afw::table::SourceRecord::getFootprint ( ) const
inline

Definition at line 98 of file Source.h.

98{ return _footprint; }

◆ getGaussianFluxFlag()

bool lsst::afw::table::SourceRecord::getGaussianFluxFlag ( ) const
inline

Return true if the measurement in the GaussianFlux slot failed.

Definition at line 554 of file Source.h.

554 {
555 return this->get(getTable()->getGaussianFluxSlot().getFlagKey());
556}

◆ getGaussianInstFlux()

FluxSlotDefinition::MeasValue lsst::afw::table::SourceRecord::getGaussianInstFlux ( ) const
inline

Get the value of the GaussianFlux slot measurement.

Definition at line 546 of file Source.h.

546 {
547 return this->get(getTable()->getGaussianFluxSlot().getMeasKey());
548}

◆ getGaussianInstFluxErr()

FluxSlotDefinition::ErrValue lsst::afw::table::SourceRecord::getGaussianInstFluxErr ( ) const
inline

Get the uncertainty on the GaussianFlux slot measurement.

Definition at line 550 of file Source.h.

550 {
551 return this->get(getTable()->getGaussianFluxSlot().getErrKey());
552}

◆ getId()

RecordId lsst::afw::table::SimpleRecord::getId ( ) const
inlineinherited

Convenience accessors for the keys in the minimal reference schema.

Definition at line 228 of file Simple.h.

228{ return get(SimpleTable::getIdKey()); }
static Key< RecordId > getIdKey()
Get keys for standard fields shared by all references.
Definition Simple.h:170

◆ getIxx()

double lsst::afw::table::SourceRecord::getIxx ( ) const
inline

Return the shape slot Ixx value.

Definition at line 596 of file Source.h.

596{ return get(getTable()->getShapeSlot().getMeasKey().getIxx()); }
double getIxx() const
Return the shape slot Ixx value.
Definition Source.h:596

◆ getIxy()

double lsst::afw::table::SourceRecord::getIxy ( ) const
inline

Return the shape slot Ixy value.

Definition at line 598 of file Source.h.

598{ return get(getTable()->getShapeSlot().getMeasKey().getIxy()); }
double getIxy() const
Return the shape slot Ixy value.
Definition Source.h:598

◆ getIyy()

double lsst::afw::table::SourceRecord::getIyy ( ) const
inline

Return the shape slot Iyy value.

Definition at line 597 of file Source.h.

597{ return get(getTable()->getShapeSlot().getMeasKey().getIyy()); }
double getIyy() const
Return the shape slot Iyy value.
Definition Source.h:597

◆ getManager()

ndarray::Manager::Ptr lsst::afw::table::BaseRecord::getManager ( ) const
inlineinherited

Definition at line 200 of file BaseRecord.h.

200{ return _manager; }

◆ getModelFluxFlag()

bool lsst::afw::table::SourceRecord::getModelFluxFlag ( ) const
inline

Return true if the measurement in the ModelFlux slot failed.

Definition at line 530 of file Source.h.

530 {
531 return this->get(getTable()->getModelFluxSlot().getFlagKey());
532}

◆ getModelInstFlux()

FluxSlotDefinition::MeasValue lsst::afw::table::SourceRecord::getModelInstFlux ( ) const
inline

Get the value of the ModelFlux slot measurement.

Definition at line 522 of file Source.h.

522 {
523 return this->get(getTable()->getModelFluxSlot().getMeasKey());
524}

◆ getModelInstFluxErr()

FluxSlotDefinition::ErrValue lsst::afw::table::SourceRecord::getModelInstFluxErr ( ) const
inline

Get the uncertainty on the ModelFlux slot measurement.

Definition at line 526 of file Source.h.

526 {
527 return this->get(getTable()->getModelFluxSlot().getErrKey());
528}

◆ getParent()

RecordId lsst::afw::table::SourceRecord::getParent ( ) const
inline

Convenience accessors for the keys in the minimal source schema.

Definition at line 592 of file Source.h.

592{ return get(SourceTable::getParentKey()); }
static Key< RecordId > getParentKey()
Key for the parent ID.
Definition Source.h:273

◆ getPsfFluxFlag()

bool lsst::afw::table::SourceRecord::getPsfFluxFlag ( ) const
inline

Return true if the measurement in the PsfFlux slot failed.

Definition at line 518 of file Source.h.

518 {
519 return this->get(getTable()->getPsfFluxSlot().getFlagKey());
520}

◆ getPsfInstFlux()

FluxSlotDefinition::MeasValue lsst::afw::table::SourceRecord::getPsfInstFlux ( ) const
inline

Get the value of the PsfFlux slot measurement.

Definition at line 510 of file Source.h.

510 {
511 return this->get(getTable()->getPsfFluxSlot().getMeasKey());
512}

◆ getPsfInstFluxErr()

FluxSlotDefinition::ErrValue lsst::afw::table::SourceRecord::getPsfInstFluxErr ( ) const
inline

Get the uncertainty on the PsfFlux slot measurement.

Definition at line 514 of file Source.h.

514 {
515 return this->get(getTable()->getPsfFluxSlot().getErrKey());
516}

◆ getRa()

lsst::geom::Angle lsst::afw::table::SimpleRecord::getRa ( ) const
inlineinherited

Definition at line 236 of file Simple.h.

236{ return get(SimpleTable::getCoordKey().getRa()); }
lsst::geom::Angle getRa() const
Definition Simple.h:236

◆ getSchema()

Schema lsst::afw::table::BaseRecord::getSchema ( ) const
inlineinherited

Return the Schema that holds this record's fields and keys.

Definition at line 80 of file BaseRecord.h.

80{ return _table->getSchema(); }

◆ getShape()

ShapeSlotDefinition::MeasValue lsst::afw::table::SourceRecord::getShape ( ) const
inline

Get the value of the Shape slot measurement.

Definition at line 582 of file Source.h.

582 {
583 return this->get(getTable()->getShapeSlot().getMeasKey());
584}

◆ getShapeErr()

ShapeSlotDefinition::ErrValue lsst::afw::table::SourceRecord::getShapeErr ( ) const
inline

Get the uncertainty on the Shape slot measurement.

Definition at line 586 of file Source.h.

586 {
587 return this->get(getTable()->getShapeSlot().getErrKey());
588}

◆ getShapeFlag()

bool lsst::afw::table::SourceRecord::getShapeFlag ( ) const
inline

Return true if the measurement in the Shape slot failed.

Definition at line 590 of file Source.h.

590{ return this->get(getTable()->getShapeSlot().getFlagKey()); }

◆ getTable()

std::shared_ptr< SourceTable const > lsst::afw::table::SourceRecord::getTable ( ) const
inline

Definition at line 102 of file Source.h.

102 {
103 return std::static_pointer_cast<SourceTable const>(BaseRecord::getTable());
104 }
std::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
Definition BaseRecord.h:83

◆ getX()

double lsst::afw::table::SourceRecord::getX ( ) const
inline

Return the centroid slot x coordinate.

Definition at line 594 of file Source.h.

594{ return get(getTable()->getCentroidSlot().getMeasKey().getX()); }
double getX() const
Return the centroid slot x coordinate.
Definition Source.h:594

◆ getY()

double lsst::afw::table::SourceRecord::getY ( ) const
inline

Return the centroid slot y coordinate.

Definition at line 595 of file Source.h.

595{ return get(getTable()->getCentroidSlot().getMeasKey().getY()); }
double getY() const
Return the centroid slot y coordinate.
Definition Source.h:595

◆ operator=() [1/2]

SourceRecord & lsst::afw::table::SourceRecord::operator= ( const SourceRecord & )
delete

◆ operator=() [2/2]

SourceRecord & lsst::afw::table::SourceRecord::operator= ( SourceRecord && )
delete

◆ operator[]() [1/4]

template<typename ConstRef >
ConstRef lsst::afw::table::BaseRecord::operator[] ( ConstReferenceFunctorKey< ConstRef > const & key) const
inlineinherited

Definition at line 190 of file BaseRecord.h.

190 {
191 return key.getConstReference(*this);
192 }

◆ operator[]() [2/4]

template<typename T >
Field< T >::Reference lsst::afw::table::BaseRecord::operator[] ( Key< T > const & key)
inlineinherited

Return a reference (or reference-like type) to the field's value.

Some field types (Point, Moments, Flag, Covariance, and SpherePoint) do not support reference access.

No checking is done to ensure the Key belongs to the correct schema.

Definition at line 129 of file BaseRecord.h.

129 {
130 return key.getReference(getElement(key), _manager);
131 }

◆ operator[]() [3/4]

template<typename T >
Field< T >::ConstReference lsst::afw::table::BaseRecord::operator[] ( Key< T > const & key) const
inlineinherited

Return a const reference (or const-reference-like type) to the field's value.

Some field types (Point, Moments, Flag, Covariance, and SpherePoint) do not support reference access.

No checking is done to ensure the Key belongs to the correct schema.

Definition at line 141 of file BaseRecord.h.

141 {
142 return key.getConstReference(getElement(key), _manager);
143 }

◆ operator[]() [4/4]

template<typename Ref >
Ref lsst::afw::table::BaseRecord::operator[] ( ReferenceFunctorKey< Ref > const & key)
inlineinherited

Definition at line 185 of file BaseRecord.h.

185 {
186 return key.getReference(*this);
187 }

◆ set() [1/2]

template<typename T , typename U >
void lsst::afw::table::BaseRecord::set ( InputFunctorKey< T > const & key,
U const & value )
inlineinherited

Set a calculated or aggregate field.

Definition at line 180 of file BaseRecord.h.

180 {
181 return key.set(*this, value);
182 }

◆ set() [2/2]

template<typename T , typename U >
void lsst::afw::table::BaseRecord::set ( Key< T > const & key,
U const & value )
inlineinherited

Set value of a field for the given key.

This method has an additional template parameter because some fields accept and convert different types to the stored field type.

No checking is done to ensure the Key belongs to the correct schema.

Definition at line 164 of file BaseRecord.h.

164 {
165 key.setValue(getElement(key), _manager, value);
166 }

◆ setCoord()

void lsst::afw::table::SimpleRecord::setCoord ( lsst::geom::SpherePoint const & coord)
inlineinherited

Definition at line 232 of file Simple.h.

232 {
234}
daf::base::PropertySet * set
Definition fits.cc:931

◆ setDec()

void lsst::afw::table::SimpleRecord::setDec ( lsst::geom::Angle dec)
inlineinherited

Definition at line 240 of file Simple.h.

double dec
Definition Match.cc:41

◆ setFootprint()

void lsst::afw::table::SourceRecord::setFootprint ( std::shared_ptr< Footprint > const & footprint)
inline

Definition at line 100 of file Source.h.

100{ _footprint = footprint; }

◆ setId()

void lsst::afw::table::SimpleRecord::setId ( RecordId id)
inlineinherited

Definition at line 229 of file Simple.h.

229{ set(SimpleTable::getIdKey(), id); }

◆ setParent()

void lsst::afw::table::SourceRecord::setParent ( RecordId id)
inline

Definition at line 593 of file Source.h.

◆ setRa()

void lsst::afw::table::SimpleRecord::setRa ( lsst::geom::Angle ra)
inlineinherited

Definition at line 237 of file Simple.h.

◆ updateCoord() [1/2]

void lsst::afw::table::SourceRecord::updateCoord ( geom::SkyWcs const & wcs,
bool include_covariance = true )

Update the coord field using the given Wcs and the field in the centroid slot.

Definition at line 368 of file Source.cc.

368 {
370 setCoord(wcs.pixelToSky(center));
371 if (include_covariance) {
372 // Get coordinate covariance:
373 auto err = getCentroidErr();
375 Eigen::Matrix2f skyCov = calculateCoordCovariance(wcs, center, err);
376 set(coordErrKey, skyCov);
377 }
378}
CovarianceMatrixKey< float, 2 > ErrorKey
Definition aggregates.h:304
static ErrorKey getErrorKey(Schema const &schema)
void setCoord(lsst::geom::SpherePoint const &coord)
Definition Simple.h:232
CentroidSlotDefinition::MeasValue getCentroid() const
Get the value of the Centroid slot measurement.
Definition Source.h:570
CentroidSlotDefinition::ErrValue getCentroidErr() const
Get the uncertainty on the Centroid slot measurement.
Definition Source.h:574
Eigen::Matrix2f calculateCoordCovariance(geom::SkyWcs const &wcs, lsst::geom::Point2D center, Eigen::Matrix2f err)
Calculate covariance for sky coordinates.
Definition wcsUtils.cc:95

◆ updateCoord() [2/2]

void lsst::afw::table::SourceRecord::updateCoord ( geom::SkyWcs const & wcs,
PointKey< double > const & key,
bool include_covariance = true )

Update the coord field using the given Wcs and the image center from the given key.

Definition at line 380 of file Source.cc.

380 {
381 lsst::geom::Point2D center = get(key);
382 setCoord(wcs.pixelToSky(center));
383 if (include_covariance) {
384 // Get coordinate covariance:
385 auto err = getCentroidErr();
387 Eigen::Matrix2f skyCov = calculateCoordCovariance(wcs, center, err);
388 set(coordErrKey, skyCov);
389 }
390}

Friends And Related Symbol Documentation

◆ SourceTable

Definition at line 207 of file Source.h.


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