lsst.afw  14.0-69-ge506bfb5f
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | 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 lsst::daf::base::Citizen

Public Types

typedef SourceTable Table
 
typedef SourceColumnViewT< SourceRecord > ColumnView
 
typedef SortedCatalogT< SourceRecord > Catalog
 
typedef SortedCatalogT< SourceRecord const > ConstCatalog
 
typedef unsigned long memId
 
typedef memId(* memNewCallback) (const memId cid)
 
typedef memId(* memCallback) (const Citizen *ptr)
 

Public Member Functions

std::shared_ptr< Footprint > getFootprint () const
 
void setFootprint (std::shared_ptr< Footprint > const &footprint)
 
std::shared_ptr< SourceTable const > getTable () const
 
FluxSlotDefinition::MeasValue getPsfFlux () const
 Get the value of the PsfFlux slot measurement. More...
 
FluxSlotDefinition::ErrValue getPsfFluxErr () 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 getModelFlux () const
 Get the value of the ModelFlux slot measurement. More...
 
FluxSlotDefinition::ErrValue getModelFluxErr () 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 getApFlux () const
 Get the value of the ApFlux slot measurement. More...
 
FluxSlotDefinition::ErrValue getApFluxErr () 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 getInstFlux () const
 Get the value of the InstFlux slot measurement. More...
 
FluxSlotDefinition::ErrValue getInstFluxErr () const
 Get the uncertainty on the InstFlux slot measurement. More...
 
bool getInstFluxFlag () const
 Return true if the measurement in the InstFlux slot failed. More...
 
FluxSlotDefinition::MeasValue getCalibFlux () const
 Get the value of the CalibFlux slot measurement. More...
 
FluxSlotDefinition::ErrValue getCalibFluxErr () 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
 
SourceRecord & operator= (const SourceRecord &)=delete
 
 SourceRecord (SourceRecord &&)=delete
 
SourceRecord & operator= (SourceRecord &&)=delete
 
 ~SourceRecord ()
 
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 >
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
 
std::string repr () const
 
void markPersistent (void)
 
RecordId getParent () const
 Convenience accessors for the keys in the minimal source schema. More...
 
void setParent (RecordId id)
 Convenience accessors for the keys in the minimal source schema. More...
 
RecordId getId () const
 Convenience accessors for the keys in the minimal reference schema. More...
 
void setId (RecordId id)
 Convenience accessors for the keys in the minimal reference schema. More...
 
SpherePoint getCoord () const
 Convenience accessors for the keys in the minimal reference schema. More...
 
void setCoord (SpherePoint const &coord)
 Convenience accessors for the keys in the minimal reference schema. More...
 
Angle getRa () const
 Convenience accessors for the keys in the minimal reference schema. More...
 
void setRa (Angle ra)
 Convenience accessors for the keys in the minimal reference schema. More...
 
Angle getDec () const
 Convenience accessors for the keys in the minimal reference schema. More...
 
void setDec (Angle dec)
 Convenience accessors for the keys in the minimal reference schema. More...
 

Static Public Member Functions

static bool hasBeenCorrupted ()
 
static memId getNextMemId ()
 
static int init ()
 
static int census (int, memId startingMemId=0)
 
static void census (std::ostream &stream, memId startingMemId=0)
 
static const std::vector< const Citizen *> * census ()
 
static int census (int, memId startingMemId=0)
 
static void census (std::ostream &stream, memId startingMemId=0)
 
static const std::vector< const Citizen *> * census ()
 
static memId setNewCallbackId (memId id)
 
static memId setNewCallbackId (memId id)
 
static memId setDeleteCallbackId (memId id)
 
static memId setDeleteCallbackId (memId id)
 
static memNewCallback setNewCallback (memNewCallback func)
 
static memCallback setDeleteCallback (memCallback func)
 
static memCallback setCorruptionCallback (memCallback func)
 

Public Attributes

 magicSentinel
 

Protected Member Functions

 SourceRecord (std::shared_ptr< SourceTable > const &table)
 
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 85 of file Source.h.

◆ ColumnView

Definition at line 84 of file Source.h.

◆ ConstCatalog

Definition at line 86 of file Source.h.

◆ Table

Definition at line 83 of file Source.h.

Constructor & Destructor Documentation

◆ SourceRecord() [1/3]

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

◆ SourceRecord() [2/3]

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

◆ ~SourceRecord()

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

◆ SourceRecord() [3/3]

lsst::afw::table::SourceRecord::SourceRecord ( std::shared_ptr< SourceTable > const &  table)
explicitprotected

Member Function Documentation

◆ _assign()

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

◆ _stream()

virtual 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".

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

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

◆ 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 125 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 146 of file BaseRecord.h.

◆ getApFlux()

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

Get the value of the ApFlux slot measurement.

Definition at line 880 of file Source.h.

◆ getApFluxErr()

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

Get the uncertainty on the ApFlux slot measurement.

Definition at line 884 of file Source.h.

◆ getApFluxFlag()

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

Return true if the measurement in the ApFlux slot failed.

Definition at line 888 of file Source.h.

◆ getCalibFlux()

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

Get the value of the CalibFlux slot measurement.

Definition at line 904 of file Source.h.

◆ getCalibFluxErr()

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

Get the uncertainty on the CalibFlux slot measurement.

Definition at line 908 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 912 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 916 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 920 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 924 of file Source.h.

◆ getCoord()

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

Convenience accessors for the keys in the minimal reference schema.

Definition at line 220 of file Simple.h.

◆ getDec()

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

Convenience accessors for the keys in the minimal reference schema.

Definition at line 226 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 67 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 85 of file BaseRecord.h.

◆ getFootprint()

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

Definition at line 88 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 217 of file Simple.h.

◆ getInstFlux()

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

Get the value of the InstFlux slot measurement.

Definition at line 892 of file Source.h.

◆ getInstFluxErr()

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

Get the uncertainty on the InstFlux slot measurement.

Definition at line 896 of file Source.h.

◆ getInstFluxFlag()

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

Return true if the measurement in the InstFlux slot failed.

Definition at line 900 of file Source.h.

◆ getIxx()

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

Return the shape slot Ixx value.

Definition at line 949 of file Source.h.

◆ getIxy()

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

Return the shape slot Ixy value.

Definition at line 955 of file Source.h.

◆ getIyy()

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

Return the shape slot Iyy value.

Definition at line 952 of file Source.h.

◆ getManager()

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

Definition at line 174 of file BaseRecord.h.

◆ getModelFlux()

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

Get the value of the ModelFlux slot measurement.

Definition at line 868 of file Source.h.

◆ getModelFluxErr()

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

Get the uncertainty on the ModelFlux slot measurement.

Definition at line 872 of file Source.h.

◆ getModelFluxFlag()

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

Return true if the measurement in the ModelFlux slot failed.

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

◆ getPsfFlux()

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

Get the value of the PsfFlux slot measurement.

Definition at line 856 of file Source.h.

◆ getPsfFluxErr()

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

Get the uncertainty on the PsfFlux slot measurement.

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

◆ getRa()

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

Convenience accessors for the keys in the minimal reference schema.

Definition at line 223 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 54 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 928 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 932 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 936 of file Source.h.

◆ getTable()

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

Definition at line 92 of file Source.h.

◆ getX()

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

Return the centroid slot x coordinate.

Definition at line 943 of file Source.h.

◆ getY()

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

Return the centroid slot y coordinate.

Definition at line 946 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 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 103 of file BaseRecord.h.

◆ operator[]() [2/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 115 of file BaseRecord.h.

◆ operator[]() [3/4]

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

Definition at line 159 of file BaseRecord.h.

◆ operator[]() [4/4]

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

Definition at line 164 of file BaseRecord.h.

◆ set() [1/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 138 of file BaseRecord.h.

◆ set() [2/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 154 of file BaseRecord.h.

◆ setCoord()

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

Convenience accessors for the keys in the minimal reference schema.

Definition at line 221 of file Simple.h.

◆ setDec()

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

Convenience accessors for the keys in the minimal reference schema.

Definition at line 227 of file Simple.h.

◆ setFootprint()

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

Definition at line 90 of file Source.h.

◆ setId()

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

Convenience accessors for the keys in the minimal reference schema.

Definition at line 218 of file Simple.h.

◆ setParent()

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

Convenience accessors for the keys in the minimal source schema.

Definition at line 942 of file Source.h.

◆ setRa()

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

Convenience accessors for the keys in the minimal reference schema.

Definition at line 224 of file Simple.h.

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

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

Friends And Related Function Documentation

◆ SourceTable

friend class SourceTable
friend

Definition at line 201 of file Source.h.


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