lsst.afw gf03f0b42f3+e27ba6bf39
Loading...
Searching...
No Matches
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 const > getTable () 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 const * getElement (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:

  • Specific fields that must always be present, with specialized getters. The schema for a SourceTable should always be constructed by starting with the result of SourceTable::makeMinimalSchema.
  • A shared_ptr to a Footprint for each record.
  • A system of aliases (called slots) in which a SourceTable instance stores keys for particular measurements (a centroid, a shape, and a number of different fluxes) and SourceRecord uses this keys to provide custom getters and setters. These are not separate fields, but rather aliases that can point to custom fields. See the SlotDefinition hierarchy for more information.

Definition at line 78 of file Source.h.

Member Typedef Documentation

◆ Catalog

◆ ColumnView

◆ ConstCatalog

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

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

◆ _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.

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

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

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

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

◆ getApFluxFlag()

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

Return true if the measurement in the ApFlux slot failed.

Definition at line 541 of file Source.h.

◆ getApInstFlux()

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

Get the value of the ApFlux slot measurement.

Definition at line 533 of file Source.h.

◆ getApInstFluxErr()

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

Get the uncertainty on the ApFlux slot measurement.

Definition at line 537 of file Source.h.

◆ getCalibFluxFlag()

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

Return true if the measurement in the CalibFlux slot failed.

Definition at line 565 of file Source.h.

◆ getCalibInstFlux()

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

Get the value of the CalibFlux slot measurement.

Definition at line 557 of file Source.h.

◆ getCalibInstFluxErr()

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

Get the uncertainty on the CalibFlux slot measurement.

Definition at line 561 of file Source.h.

◆ getCentroid()

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

Get the value of the Centroid slot measurement.

Definition at line 569 of file Source.h.

◆ getCentroidErr()

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

Get the uncertainty on the Centroid slot measurement.

Definition at line 573 of file Source.h.

◆ getCentroidFlag()

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

Return true if the measurement in the Centroid slot failed.

Definition at line 577 of file Source.h.

◆ getCoord()

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

Definition at line 230 of file Simple.h.

◆ getDec()

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

Definition at line 238 of file Simple.h.

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

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

◆ getFootprint()

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

Definition at line 98 of file Source.h.

◆ getGaussianFluxFlag()

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

Return true if the measurement in the GaussianFlux slot failed.

Definition at line 553 of file Source.h.

◆ getGaussianInstFlux()

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

Get the value of the GaussianFlux slot measurement.

Definition at line 545 of file Source.h.

◆ getGaussianInstFluxErr()

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

Get the uncertainty on the GaussianFlux slot measurement.

Definition at line 549 of file Source.h.

◆ getId()

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

Convenience accessors for the keys in the minimal reference schema.

Definition at line 227 of file Simple.h.

◆ getIxx()

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

Return the shape slot Ixx value.

Definition at line 595 of file Source.h.

◆ getIxy()

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

Return the shape slot Ixy value.

Definition at line 597 of file Source.h.

◆ getIyy()

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

Return the shape slot Iyy value.

Definition at line 596 of file Source.h.

◆ getManager()

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

Definition at line 200 of file BaseRecord.h.

◆ getModelFluxFlag()

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

Return true if the measurement in the ModelFlux slot failed.

Definition at line 529 of file Source.h.

◆ getModelInstFlux()

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

Get the value of the ModelFlux slot measurement.

Definition at line 521 of file Source.h.

◆ getModelInstFluxErr()

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

Get the uncertainty on the ModelFlux slot measurement.

Definition at line 525 of file Source.h.

◆ getParent()

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

Convenience accessors for the keys in the minimal source schema.

Definition at line 591 of file Source.h.

◆ getPsfFluxFlag()

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

Return true if the measurement in the PsfFlux slot failed.

Definition at line 517 of file Source.h.

◆ getPsfInstFlux()

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

Get the value of the PsfFlux slot measurement.

Definition at line 509 of file Source.h.

◆ getPsfInstFluxErr()

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

Get the uncertainty on the PsfFlux slot measurement.

Definition at line 513 of file Source.h.

◆ getRa()

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

Definition at line 235 of file Simple.h.

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

◆ getShape()

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

Get the value of the Shape slot measurement.

Definition at line 581 of file Source.h.

◆ getShapeErr()

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

Get the uncertainty on the Shape slot measurement.

Definition at line 585 of file Source.h.

◆ getShapeFlag()

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

Return true if the measurement in the Shape slot failed.

Definition at line 589 of file Source.h.

◆ getTable()

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

Definition at line 102 of file Source.h.

◆ getX()

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

Return the centroid slot x coordinate.

Definition at line 593 of file Source.h.

◆ getY()

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

Return the centroid slot y coordinate.

Definition at line 594 of file Source.h.

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

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

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

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

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

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

◆ setCoord()

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

Definition at line 231 of file Simple.h.

◆ setDec()

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

Definition at line 239 of file Simple.h.

◆ setFootprint()

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

Definition at line 100 of file Source.h.

◆ setId()

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

Definition at line 228 of file Simple.h.

◆ setParent()

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

Definition at line 592 of file Source.h.

◆ setRa()

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

Definition at line 236 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 370 of file Source.cc.

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

Friends And Related Symbol Documentation

◆ SourceTable

friend class SourceTable
friend

Definition at line 207 of file Source.h.


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