LSSTApplications  19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
LSSTDataManagementBasePackage
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

typedef SourceTable Table
 
typedef SourceColumnViewT< SourceRecordColumnView
 
typedef SortedCatalogT< SourceRecordCatalog
 
typedef SortedCatalogT< SourceRecord const > ConstCatalog
 

Public Member Functions

 SourceRecord (ConstructionToken const &token, detail::RecordData &&data)
 Constructor used by SourceTable. More...
 
std::shared_ptr< FootprintgetFootprint () const
 
void setFootprint (std::shared_ptr< Footprint > const &footprint)
 
std::shared_ptr< SourceTable const > getTable () const
 
RecordId getParent () const
 Convenience accessors for the keys in the minimal source schema. More...
 
void setParent (RecordId id)
 
FluxSlotDefinition::MeasValue getPsfInstFlux () const
 Get the value of the PsfFlux slot measurement. More...
 
FluxSlotDefinition::ErrValue getPsfInstFluxErr () const
 Get the uncertainty on the PsfFlux slot measurement. More...
 
bool getPsfFluxFlag () const
 Return true if the measurement in the PsfFlux slot failed. More...
 
FluxSlotDefinition::MeasValue getModelInstFlux () const
 Get the value of the ModelFlux slot measurement. More...
 
FluxSlotDefinition::ErrValue getModelInstFluxErr () const
 Get the uncertainty on the ModelFlux slot measurement. More...
 
bool getModelFluxFlag () const
 Return true if the measurement in the ModelFlux slot failed. More...
 
FluxSlotDefinition::MeasValue getApInstFlux () const
 Get the value of the ApFlux slot measurement. More...
 
FluxSlotDefinition::ErrValue getApInstFluxErr () const
 Get the uncertainty on the ApFlux slot measurement. More...
 
bool getApFluxFlag () const
 Return true if the measurement in the ApFlux slot failed. More...
 
FluxSlotDefinition::MeasValue getGaussianInstFlux () const
 Get the value of the GaussianFlux slot measurement. More...
 
FluxSlotDefinition::ErrValue getGaussianInstFluxErr () const
 Get the uncertainty on the GaussianFlux slot measurement. More...
 
bool getGaussianFluxFlag () const
 Return true if the measurement in the GaussianFlux slot failed. More...
 
FluxSlotDefinition::MeasValue getCalibInstFlux () const
 Get the value of the CalibFlux slot measurement. More...
 
FluxSlotDefinition::ErrValue getCalibInstFluxErr () const
 Get the uncertainty on the CalibFlux slot measurement. More...
 
bool getCalibFluxFlag () const
 Return true if the measurement in the CalibFlux slot failed. More...
 
CentroidSlotDefinition::MeasValue getCentroid () const
 Get the value of the Centroid slot measurement. More...
 
CentroidSlotDefinition::ErrValue getCentroidErr () const
 Get the uncertainty on the Centroid slot measurement. More...
 
bool getCentroidFlag () const
 Return true if the measurement in the Centroid slot failed. More...
 
ShapeSlotDefinition::MeasValue getShape () const
 Get the value of the Shape slot measurement. More...
 
ShapeSlotDefinition::ErrValue getShapeErr () const
 Get the uncertainty on the Shape slot measurement. More...
 
bool getShapeFlag () const
 Return true if the measurement in the Shape slot failed. More...
 
double getX () const
 Return the centroid slot x coordinate. More...
 
double getY () const
 Return the centroid slot y coordinate. More...
 
double getIxx () const
 Return the shape slot Ixx value. More...
 
double getIyy () const
 Return the shape slot Iyy value. More...
 
double getIxy () const
 Return the shape slot Ixy value. More...
 
void updateCoord (geom::SkyWcs const &wcs)
 Update the coord field using the given Wcs and the field in the centroid slot. More...
 
void updateCoord (geom::SkyWcs const &wcs, PointKey< double > const &key)
 Update the coord field using the given Wcs and the image center from the given key. More...
 
 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. More...
 
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. More...
 
template<typename T >
Field< T >::Element * getElement (Key< T > const &key)
 Return a pointer to the underlying elements of a field (non-const). More...
 
template<typename T >
Field< T >::Element const * getElement (Key< T > const &key) const
 Return a pointer to the underlying elements of a field (const). More...
 
template<typename T >
Field< T >::Reference operator[] (Key< T > const &key)
 Return a reference (or reference-like type) to the field's value. More...
 
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. More...
 
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. More...
 
template<typename T >
get (OutputFunctorKey< T > const &key) const
 Compute a calculated or aggregate field. More...
 
template<typename T , typename U >
void set (Key< T > const &key, U const &value)
 Set value of a field for the given key. More...
 
template<typename T , typename U >
void set (InputFunctorKey< T > const &key, U const &value)
 Set a calculated or aggregate field. More...
 
void assign (BaseRecord const &other)
 Copy all field values from other to this, requiring that they have equal schemas. More...
 
void assign (BaseRecord const &other, SchemaMapper const &mapper)
 Copy field values from other to this, using a mapper. More...
 
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. More...
 
virtual void _stream (std::ostream &os) const
 Called by operator<<. More...
 

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 80 of file Source.h.

Member Typedef Documentation

◆ Catalog

Definition at line 84 of file Source.h.

◆ ColumnView

Definition at line 83 of file Source.h.

◆ ConstCatalog

Definition at line 85 of file Source.h.

◆ Table

Definition at line 82 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 96 of file Source.h.

96  :
97  SimpleRecord(token, std::move(data))
98  {}

◆ 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 374 of file Source.cc.

374  {
375  try {
376  SourceRecord const &s = dynamic_cast<SourceRecord const &>(other);
377  _footprint = s._footprint;
378  } catch (std::bad_cast &) {
379  }
380 }

◆ _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 153 of file BaseRecord.cc.

153  {
154  getSchema().forEach([&os, this](auto const& item) {
155  os << item.field.getName() << ": " << this->get(item.key) << std::endl;
156  });
157 }

◆ 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 123 of file BaseRecord.cc.

123  {
124  if (this->getSchema() != other.getSchema()) {
125  throw LSST_EXCEPT(lsst::pex::exceptions::LogicError, "Unequal schemas in record assignment.");
126  }
127  this->getSchema().forEach(CopyValue(&other, this));
128  this->_assign(other); // let derived classes assign their own stuff
129 }

◆ 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 131 of file BaseRecord.cc.

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

◆ 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  }

◆ 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 544 of file Source.h.

544  {
545  return this->get(getTable()->getApFluxSlot().getFlagKey());
546 }

◆ getApInstFlux()

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

Get the value of the ApFlux slot measurement.

Definition at line 536 of file Source.h.

536  {
537  return this->get(getTable()->getApFluxSlot().getMeasKey());
538 }

◆ getApInstFluxErr()

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

Get the uncertainty on the ApFlux slot measurement.

Definition at line 540 of file Source.h.

540  {
541  return this->get(getTable()->getApFluxSlot().getErrKey());
542 }

◆ getCalibFluxFlag()

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

Return true if the measurement in the CalibFlux slot failed.

Definition at line 568 of file Source.h.

568  {
569  return this->get(getTable()->getCalibFluxSlot().getFlagKey());
570 }

◆ getCalibInstFlux()

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

Get the value of the CalibFlux slot measurement.

Definition at line 560 of file Source.h.

560  {
561  return this->get(getTable()->getCalibFluxSlot().getMeasKey());
562 }

◆ getCalibInstFluxErr()

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

Get the uncertainty on the CalibFlux slot measurement.

Definition at line 564 of file Source.h.

564  {
565  return this->get(getTable()->getCalibFluxSlot().getErrKey());
566 }

◆ getCentroid()

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

Get the value of the Centroid slot measurement.

Definition at line 572 of file Source.h.

572  {
573  return this->get(getTable()->getCentroidSlot().getMeasKey());
574 }

◆ getCentroidErr()

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

Get the uncertainty on the Centroid slot measurement.

Definition at line 576 of file Source.h.

576  {
577  return this->get(getTable()->getCentroidSlot().getErrKey());
578 }

◆ getCentroidFlag()

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

Return true if the measurement in the Centroid slot failed.

Definition at line 580 of file Source.h.

580  {
581  return this->get(getTable()->getCentroidSlot().getFlagKey());
582 }

◆ getCoord()

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

Definition at line 231 of file Simple.h.

231 { return get(SimpleTable::getCoordKey()); }

◆ 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()); }

◆ 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 100 of file Source.h.

100 { return _footprint; }

◆ getGaussianFluxFlag()

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

Return true if the measurement in the GaussianFlux slot failed.

Definition at line 556 of file Source.h.

556  {
557  return this->get(getTable()->getGaussianFluxSlot().getFlagKey());
558 }

◆ getGaussianInstFlux()

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

Get the value of the GaussianFlux slot measurement.

Definition at line 548 of file Source.h.

548  {
549  return this->get(getTable()->getGaussianFluxSlot().getMeasKey());
550 }

◆ getGaussianInstFluxErr()

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

Get the uncertainty on the GaussianFlux slot measurement.

Definition at line 552 of file Source.h.

552  {
553  return this->get(getTable()->getGaussianFluxSlot().getErrKey());
554 }

◆ 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()); }

◆ getIxx()

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

Return the shape slot Ixx value.

Definition at line 598 of file Source.h.

598 { return get(getTable()->getShapeSlot().getMeasKey().getIxx()); }

◆ getIxy()

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

Return the shape slot Ixy value.

Definition at line 600 of file Source.h.

600 { return get(getTable()->getShapeSlot().getMeasKey().getIxy()); }

◆ getIyy()

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

Return the shape slot Iyy value.

Definition at line 599 of file Source.h.

599 { return get(getTable()->getShapeSlot().getMeasKey().getIyy()); }

◆ 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 532 of file Source.h.

532  {
533  return this->get(getTable()->getModelFluxSlot().getFlagKey());
534 }

◆ getModelInstFlux()

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

Get the value of the ModelFlux slot measurement.

Definition at line 524 of file Source.h.

524  {
525  return this->get(getTable()->getModelFluxSlot().getMeasKey());
526 }

◆ getModelInstFluxErr()

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

Get the uncertainty on the ModelFlux slot measurement.

Definition at line 528 of file Source.h.

528  {
529  return this->get(getTable()->getModelFluxSlot().getErrKey());
530 }

◆ getParent()

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

Convenience accessors for the keys in the minimal source schema.

Definition at line 594 of file Source.h.

594 { return get(SourceTable::getParentKey()); }

◆ getPsfFluxFlag()

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

Return true if the measurement in the PsfFlux slot failed.

Definition at line 520 of file Source.h.

520  {
521  return this->get(getTable()->getPsfFluxSlot().getFlagKey());
522 }

◆ getPsfInstFlux()

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

Get the value of the PsfFlux slot measurement.

Definition at line 512 of file Source.h.

512  {
513  return this->get(getTable()->getPsfFluxSlot().getMeasKey());
514 }

◆ getPsfInstFluxErr()

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

Get the uncertainty on the PsfFlux slot measurement.

Definition at line 516 of file Source.h.

516  {
517  return this->get(getTable()->getPsfFluxSlot().getErrKey());
518 }

◆ 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()); }

◆ 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 584 of file Source.h.

584  {
585  return this->get(getTable()->getShapeSlot().getMeasKey());
586 }

◆ getShapeErr()

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

Get the uncertainty on the Shape slot measurement.

Definition at line 588 of file Source.h.

588  {
589  return this->get(getTable()->getShapeSlot().getErrKey());
590 }

◆ getShapeFlag()

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

Return true if the measurement in the Shape slot failed.

Definition at line 592 of file Source.h.

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

◆ getTable()

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

Definition at line 104 of file Source.h.

104  {
105  return std::static_pointer_cast<SourceTable const>(BaseRecord::getTable());
106  }

◆ getX()

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

Return the centroid slot x coordinate.

Definition at line 596 of file Source.h.

596 { return get(getTable()->getCentroidSlot().getMeasKey().getX()); }

◆ getY()

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

Return the centroid slot y coordinate.

Definition at line 597 of file Source.h.

597 { return get(getTable()->getCentroidSlot().getMeasKey().getY()); }

◆ 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  {
233  set(SimpleTable::getCoordKey(), coord);
234 }

◆ setDec()

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

Definition at line 240 of file Simple.h.

◆ setFootprint()

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

Definition at line 102 of file Source.h.

102 { _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 595 of file Source.h.

595 { set(SourceTable::getParentKey(), id); }

◆ setRa()

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

Definition at line 237 of file Simple.h.

237 { set(SimpleTable::getCoordKey().getRa(), ra); }

◆ updateCoord() [1/2]

void lsst::afw::table::SourceRecord::updateCoord ( geom::SkyWcs const &  wcs)

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

Definition at line 368 of file Source.cc.

368 { setCoord(wcs.pixelToSky(getCentroid())); }

◆ updateCoord() [2/2]

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

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

Definition at line 370 of file Source.cc.

370  {
371  setCoord(wcs.pixelToSky(get(key)));
372 }

Friends And Related Function Documentation

◆ SourceTable

friend class SourceTable
friend

Definition at line 209 of file Source.h.


The documentation for this class was generated from the following files:
std::move
T move(T... args)
lsst::afw::table::BaseRecord::get
Field< T >::Value get(Key< T > const &key) const
Return the value of a field for the given key.
Definition: BaseRecord.h:151
lsst::afw::table::SourceRecord::getCentroid
CentroidSlotDefinition::MeasValue getCentroid() const
Get the value of the Centroid slot measurement.
Definition: Source.h:572
lsst::afw::table::SimpleRecord::getDec
lsst::geom::Angle getDec() const
Definition: Simple.h:239
wcs
table::Key< table::Array< std::uint8_t > > wcs
Definition: SkyWcs.cc:71
lsst::afw::table::SourceRecord::getIyy
double getIyy() const
Return the shape slot Iyy value.
Definition: Source.h:599
lsst::afw::table::SimpleTable::getIdKey
static Key< RecordId > getIdKey()
Get keys for standard fields shared by all references.
Definition: Simple.h:170
dec
double dec
Definition: Match.cc:41
lsst::afw::table::SourceTable::getParentKey
static Key< RecordId > getParentKey()
Key for the parent ID.
Definition: Source.h:275
lsst::afw::table::SourceRecord::SourceRecord
SourceRecord(ConstructionToken const &token, detail::RecordData &&data)
Constructor used by SourceTable.
Definition: Source.h:96
lsst::afw::table::BaseRecord::getElement
Field< T >::Element * getElement(Key< T > const &key)
Return a pointer to the underlying elements of a field (non-const).
Definition: BaseRecord.h:93
lsst::afw::table::Schema::forEach
void forEach(F &&func) const
Apply a functor to each SchemaItem in the Schema.
Definition: Schema.h:212
lsst::afw::table::SourceRecord::getIxy
double getIxy() const
Return the shape slot Ixy value.
Definition: Source.h:600
std::bad_cast
STL class.
lsst::afw::table::SimpleTable::getCoordKey
static CoordKey getCoordKey()
Key for the celestial coordinates.
Definition: Simple.h:172
data
char * data
Definition: BaseRecord.cc:62
lsst::afw::table::BaseRecord::_assign
virtual void _assign(BaseRecord const &other)
Called by assign() after transferring fields to allow subclass data members to be copied.
Definition: BaseRecord.h:209
lsst::afw::table::SimpleRecord::SimpleRecord
SimpleRecord(ConstructionToken const &token, detail::RecordData &&data)
Constructor used by SimpleTable.
Definition: Simple.h:64
astshim.fitsChanContinued.contains
def contains(self, name)
Definition: fitsChanContinued.py:127
other
ItemVariant const * other
Definition: Schema.cc:56
lsst::afw::table::SourceRecord::getX
double getX() const
Return the centroid slot x coordinate.
Definition: Source.h:596
lsst.pex::exceptions::LogicError
Reports errors in the logical structure of the program.
Definition: Runtime.h:46
lsst::afw::table::SourceRecord::getIxx
double getIxx() const
Return the shape slot Ixx value.
Definition: Source.h:598
LSST_EXCEPT
#define LSST_EXCEPT(type,...)
Create an exception with a given type.
Definition: Exception.h:48
lsst::afw::table::SourceRecord::getY
double getY() const
Return the centroid slot y coordinate.
Definition: Source.h:597
lsst::afw::table::SourceRecord::getTable
std::shared_ptr< SourceTable const > getTable() const
Definition: Source.h:104
os
std::ostream * os
Definition: Schema.cc:746
std::endl
T endl(T... args)
key
Key< U > key
Definition: Schema.cc:281
mapper
SchemaMapper * mapper
Definition: SchemaMapper.cc:78
lsst::afw::table::BaseRecord::getTable
std::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
Definition: BaseRecord.h:83
lsst::afw::table::BaseRecord::getSchema
Schema getSchema() const
Return the Schema that holds this record's fields and keys.
Definition: BaseRecord.h:80
lsst::afw::table::Field::Element
FieldBase< T >::Element Element
Type used to store field data in the table (a field may have multiple elements).
Definition: Field.h:26
lsst::afw::table::BaseRecord::set
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Definition: BaseRecord.h:164
lsst::afw::table::SimpleRecord::getRa
lsst::geom::Angle getRa() const
Definition: Simple.h:236
lsst::afw::table::SimpleRecord::setCoord
void setCoord(lsst::geom::SpherePoint const &coord)
Definition: Simple.h:232