LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
LSSTDataManagementBasePackage
Namespaces | Classes | Typedefs | Enumerations | Functions
lsst.afw.table Namespace Reference

Namespaces

 _syntax
 
 detail
 
 io
 
 tableEnumDicts
 

Classes

class  PointKey
 A FunctorKey used to get or set a geom::Point from an (x,y) pair of int or double Keys. More...
 
class  CoordKey
 A FunctorKey used to get or set celestial coordiantes from a pair of Angle keys. More...
 
class  QuadrupoleKey
 A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys. More...
 
class  EllipseKey
 A FunctorKey used to get or set a geom::ellipses::Ellipse from an (xx,yy,xy,x,y) tuple of Keys. More...
 
class  CovarianceMatrixKey
 
class  AliasMap
 Mapping class that holds aliases for a Schema. More...
 
class  AmpInfoRecord
 Geometry and electronic information about raw amplifier images. More...
 
class  AmpInfoTable
 Table of amplifier information (AmpInfoRecord records) More...
 
class  ArrayKey
 A FunctorKey used to get or set a ndarray::Array from a sequence of scalar Keys. More...
 
class  BitsColumn
 A packed representation of a collection of Flag field columns. More...
 
class  BaseColumnView
 Column-wise view into a sequence of records that have been allocated contiguously. More...
 
class  ColumnViewT
 
class  BaseRecord
 Base class for all records. More...
 
class  BaseTable
 Base class for all tables. More...
 
class  CatalogIterator
 Iterator class for CatalogT. More...
 
class  CatalogT
 A custom container class for records, based on std::vector. More...
 
struct  SchemaItem
 A simple pair-like struct for mapping a Field (name and description) with a Key (used for actual data access). More...
 
class  ExposureCatalogT
 Custom catalog class for ExposureRecord/Table. More...
 
class  ExposureRecord
 Record class used to store exposure metadata. More...
 
class  ExposureTable
 Table class used to store exposure metadata. More...
 
struct  Field
 A description of a field in a table. More...
 
struct  FieldBase
 Field base class default implementation (used for numeric scalars and Angle). More...
 
struct  FieldBase< Array< U > >
 Field base class specialization for arrays. More...
 
struct  FieldBase< std::string >
 Field base class specialization for strings. More...
 
struct  FieldBase< Flag >
 Specialization for Flag fields. More...
 
class  KeyBase< Flag >
 A base class for Key that allows the underlying storage field to be extracted. More...
 
class  Key< Flag >
 Key specialization for Flag. More...
 
class  OutputFunctorKey
 
class  InputFunctorKey
 
class  FunctorKey
 
class  ReferenceFunctorKey
 
class  ConstReferenceFunctorKey
 
class  Key
 A class used as a handle to a particular field in a table. More...
 
class  SortedCatalogT
 Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID. More...
 
class  SourceColumnViewT
 
struct  Match
 Lightweight representation of a geometric match between two records. More...
 
class  IdFactory
 A polymorphic functor base class for generating record IDs for a table. More...
 
class  KeyBase
 A base class for Key that allows subfield keys to be extracted for some field types. More...
 
class  KeyBase< Array< U > >
 KeyBase specialization for Arrays. More...
 
class  Array
 Tag types used to declare specialized field types. More...
 
class  Schema
 Defines the fields and offsets for a table. More...
 
class  SubSchema
 A proxy type for name lookups in a Schema. More...
 
class  SchemaMapper
 A mapping between the keys of two Schemas, used to copy data between them. More...
 
class  SimpleRecord
 Record class that must contain a unique ID field and a celestial coordinate field. More...
 
class  SimpleTable
 Table class that must contain a unique ID field and a celestial coordinate field. More...
 
class  SlotDefinition
 
class  FluxSlotDefinition
 SlotDefinition specialization for fluxes. More...
 
class  CentroidSlotDefinition
 SlotDefinition specialization for centroids. More...
 
class  ShapeSlotDefinition
 SlotDefinition specialization for shapes. More...
 
struct  SlotSuite
 
class  SourceRecord
 Record class that contains measurements made on a single exposure. More...
 
class  SourceTable
 Table class that contains measurements made on a single exposure. More...
 

Typedefs

typedef PointKey< int > Point2IKey
 
typedef PointKey< double > Point2DKey
 
typedef ColumnViewT
< ExposureRecord
ExposureColumnView
 
typedef ExposureCatalogT
< ExposureRecord
ExposureCatalog
 
typedef ExposureCatalogT
< ExposureRecord const > 
ConstExposureCatalog
 
typedef CatalogT< BaseRecordBaseCatalog
 
typedef CatalogT< BaseRecord
const > 
ConstBaseCatalog
 
typedef ColumnViewT< SimpleRecordSimpleColumnView
 
typedef SortedCatalogT
< SimpleRecord
SimpleCatalog
 
typedef SortedCatalogT
< SimpleRecord const > 
ConstSimpleCatalog
 
typedef SourceColumnViewT
< SourceRecord
SourceColumnView
 
typedef SortedCatalogT
< SourceRecord
SourceCatalog
 
typedef SortedCatalogT
< SourceRecord const > 
ConstSourceCatalog
 
typedef ColumnViewT
< AmpInfoRecord
AmpInfoColumnView
 
typedef CatalogT< AmpInfoRecordAmpInfoCatalog
 
typedef CatalogT
< AmpInfoRecord const > 
ConstAmpInfoCatalog
 
typedef Match< SimpleRecord,
SimpleRecord
SimpleMatch
 
typedef Match< SimpleRecord,
SourceRecord
ReferenceMatch
 
typedef Match< SourceRecord,
SourceRecord
SourceMatch
 
typedef std::vector< SimpleMatchSimpleMatchVector
 
typedef std::vector
< ReferenceMatch
ReferenceMatchVector
 
typedef std::vector< SourceMatchSourceMatchVector
 
typedef boost::int64_t RecordId
 Type used for unique IDs for records. More...
 
typedef
lsst::afw::detection::Footprint 
Footprint
 
typedef boost::mpl::vector
< RecordId, boost::uint16_t,
boost::int32_t, float, double,
Angle
ScalarFieldTypes
 An MPL vector of scalar field types. More...
 
typedef boost::mpl::vector
< RecordId, boost::uint16_t,
boost::int32_t, float, double,
Angle, Flag, std::string,
Array< boost::uint16_t >
, Array< int >, Array< float >
, Array< double > > 
FieldTypes
 An MPL vector of all field types. More...
 
typedef lsst::afw::coord::Coord Coord
 
typedef lsst::afw::coord::IcrsCoord IcrsCoord
 
typedef lsst::afw::geom::Angle Angle
 

Enumerations

enum  ReadoutCorner { LL, LR, UR, UL }
 
enum  CoordinateType { CoordinateType::PIXEL, CoordinateType::CELESTIAL }
 
enum  SourceFitsFlags { SOURCE_IO_NO_FOOTPRINTS = 0x1, SOURCE_IO_NO_HEAVY_FOOTPRINTS = 0x2 }
 Bitflags to be passed to SourceCatalog::readFits and SourceCatalog::writeFits. More...
 

Functions

SourceMatchVector matchXy (SourceCatalog const &cat1, SourceCatalog const &cat2, double radius, bool closest=true)
 
SourceMatchVector matchXy (SourceCatalog const &cat, double radius, bool symmetric=true)
 
template<typename Cat1 , typename Cat2 >
std::vector< Match< typename
Cat1::Record, typename
Cat2::Record > > 
matchRaDec (Cat1 const &cat1, Cat2 const &cat2, Angle radius, bool closest=true)
 
template<typename Cat >
std::vector< Match< typename
Cat::Record, typename
Cat::Record > > 
matchRaDec (Cat const &cat, Angle radius, bool symmetric=true)
 
template<typename Record1 , typename Record2 >
BaseCatalog packMatches (std::vector< Match< Record1, Record2 > > const &matches)
 Return a table representation of a MatchVector that can be used to persist it. More...
 
template<typename Cat1 , typename Cat2 >
std::vector< Match< typename
Cat1::Record, typename
Cat2::Record > > 
unpackMatches (BaseCatalog const &matches, Cat1 const &cat1, Cat2 const &cat2)
 Reconstruct a MatchVector from a BaseCatalog representation of the matches and a pair of catalogs. More...
 
bool operator== (CoordKey const &lhs, CoordKey const &rhs)
 Compare CoordKeys for equality using the constituent Keys. More...
 
bool operator!= (CoordKey const &lhs, CoordKey const &rhs)
 Compare CoordKeys for equality using the constituent Keys. More...
 
template<typename RecordT , typename Catalog , typename T >
boost::shared_ptr< RecordT > _Catalog_find (Catalog const &catalog, T const &value, Key< T > const &key)
 
template<typename Catalog , typename T >
int _Catalog_lower_bound (Catalog const &catalog, T const &value, Key< T > const &key)
 
template<typename Catalog , typename T >
int _Catalog_upper_bound (Catalog const &catalog, T const &value, Key< T > const &key)
 
template<typename Catalog , typename T >
std::pair< int, int > _Catalog_equal_range (Catalog const &catalog, T const &value, Key< T > const &key)
 

Typedef Documentation

Definition at line 87 of file fwd.h.

Definition at line 85 of file fwd.h.

Definition at line 39 of file misc.h.

Definition at line 61 of file fwd.h.

Definition at line 88 of file fwd.h.

Definition at line 63 of file fwd.h.

Definition at line 416 of file Exposure.h.

Definition at line 70 of file fwd.h.

Definition at line 76 of file fwd.h.

Definition at line 36 of file misc.h.

Definition at line 415 of file Exposure.h.

Definition at line 414 of file Exposure.h.

typedef boost::mpl::vector< RecordId, boost::uint16_t, boost::int32_t, float, double, Angle , Flag, std::string, Array<boost::uint16_t>, Array<int>, Array<float>, Array<double> > lsst::afw::table.FieldTypes

An MPL vector of all field types.

Definition at line 55 of file types.h.

Definition at line 61 of file Source.h.

Definition at line 38 of file misc.h.

Definition at line 111 of file aggregates.h.

Definition at line 110 of file aggregates.h.

typedef boost::int64_t lsst::afw::table.RecordId

Type used for unique IDs for records.

FITS isn't fond of uint64, so we can save a lot of pain by using signed ints here unless we really need unsigned.

Definition at line 21 of file misc.h.

Definition at line 93 of file fwd.h.

Definition at line 97 of file fwd.h.

typedef boost::mpl::vector< RecordId, boost::uint16_t, boost::int32_t, float, double, Angle > lsst::afw::table.ScalarFieldTypes

An MPL vector of scalar field types.

Definition at line 52 of file types.h.

Definition at line 69 of file fwd.h.

Definition at line 67 of file fwd.h.

Definition at line 90 of file fwd.h.

Definition at line 96 of file fwd.h.

Definition at line 75 of file fwd.h.

Definition at line 73 of file fwd.h.

Definition at line 94 of file fwd.h.

Definition at line 98 of file fwd.h.

Enumeration Type Documentation

Enumerator
PIXEL 
CELESTIAL 

Definition at line 23 of file misc.h.

Readout corner, in the frame of reference of the assembled image

Enumerator
LL 
LR 
UR 
UL 

Definition at line 37 of file AmpInfo.h.

37  {
38  LL,
39  LR,
40  UR,
41  UL,
42 };

Bitflags to be passed to SourceCatalog::readFits and SourceCatalog::writeFits.

Note that these flags may also be passed when reading/writing SourceCatalogs via the Butler, by passing a "flags" key/value pair as part of the data ID.

Enumerator
SOURCE_IO_NO_FOOTPRINTS 

Do not read/write footprints at all.

SOURCE_IO_NO_HEAVY_FOOTPRINTS 

Read/write heavy footprints as non-heavy footprints.

Definition at line 56 of file Source.h.

56  {
59 };
Do not read/write footprints at all.
Definition: Source.h:57
Read/write heavy footprints as non-heavy footprints.
Definition: Source.h:58

Function Documentation

template<typename Catalog , typename T >
std::pair<int,int> lsst::afw::table::_Catalog_equal_range ( Catalog const &  catalog,
T const &  value,
Key< T > const &  key 
)

Definition at line 887 of file Catalog.h.

887  {
888  std::pair<typename Catalog::const_iterator,typename Catalog::const_iterator> p
889  = catalog.equal_range(value, key);
890  return std::pair<int,int>(p.first - catalog.begin(), p.second - catalog.begin());
891 }
template<typename RecordT , typename Catalog , typename T >
boost::shared_ptr< RecordT > lsst::afw::table::_Catalog_find ( Catalog const &  catalog,
T const &  value,
Key< T > const &  key 
)

Definition at line 868 of file Catalog.h.

868  {
869  typename Catalog::const_iterator iter = catalog.find(value, key);
870  if (iter == catalog.end()) {
871  return PTR(RecordT)();
872  }
873  return iter; // n.b. CatalogIterator is explicitly convertible to shared_ptr
874 }
int iter
#define PTR(...)
Definition: base.h:41
template<typename Catalog , typename T >
int lsst::afw::table::_Catalog_lower_bound ( Catalog const &  catalog,
T const &  value,
Key< T > const &  key 
)

Definition at line 877 of file Catalog.h.

877  {
878  return catalog.lower_bound(value, key) - catalog.begin();
879 }
template<typename Catalog , typename T >
int lsst::afw::table::_Catalog_upper_bound ( Catalog const &  catalog,
T const &  value,
Key< T > const &  key 
)

Definition at line 882 of file Catalog.h.

882  {
883  return catalog.upper_bound(value, key) - catalog.begin();
884 }
template<typename Cat1 , typename Cat2 >
std::vector< Match< typename Cat1::Record, typename Cat2::Record> > lsst::afw::table::matchRaDec ( Cat1 const &  cat1,
Cat2 const &  cat2,
Angle  radius,
bool  closest = true 
)

Compute all tuples (s1,s2,d) where s1 belings to cat1, s2 belongs to cat2 and d, the distance between s1 and s2, is at most radius. If cat1 and cat2 are identical, then this call is equivalent to matchRaDec(cat1,radius,true). The match is performed in ra, dec space.

Parameters
[in]cat1first catalog
[in]cat2second catalog
[in]radiusmatch radius
[in]closestif true then just return the closest match

This is instantiated for Simple-Simple, Simple-Source, and Source-Source catalog combinations.

template<typename Cat >
std::vector< Match< typename Cat::Record, typename Cat::Record> > lsst::afw::table::matchRaDec ( Cat const &  cat,
Angle  radius,
bool  symmetric = true 
)
SourceMatchVector lsst::afw::table::matchXy ( SourceCatalog const &  cat1,
SourceCatalog const &  cat2,
double  radius,
bool  closest = true 
)

Compute all tuples (s1,s2,d) where s1 belings to cat1, s2 belongs to cat2 and d, the distance between s1 and s2, in pixels, is at most radius. If cat1 and cat2 are identical, then this call is equivalent to matchXy(cat1,radius,true). The match is performed in pixel space (2d cartesian).

Parameters
[in]cat1first catalog
[in]cat2second catalog
[in]radiusmatch radius (pixels)
[in]closestif true then just return the closest match
SourceMatchVector lsst::afw::table::matchXy ( SourceCatalog const &  cat,
double  radius,
bool  symmetric = true 
)

Compute all tuples (s1,s2,d) where s1 != s2, s1 and s2 both belong to cat, and d, the distance between s1 and s2, in pixels, is at most radius. The match is performed in pixel space (2d cartesian).

Parameters
[in]catthe catalog to self-match
[in]radiusmatch radius (pixels)
[in]symmetricif cat to true symmetric matches are produced: i.e. if (s1, s2, d) is reported, then so is (s2, s1, d).
bool lsst::afw::table::operator!= ( CoordKey const &  lhs,
CoordKey const &  rhs 
)

Compare CoordKeys for equality using the constituent Keys.

bool lsst::afw::table::operator== ( CoordKey const &  lhs,
CoordKey const &  rhs 
)

Compare CoordKeys for equality using the constituent Keys.

template<typename Record1 , typename Record2 >
BaseCatalog lsst::afw::table::packMatches ( std::vector< Match< Record1, Record2 > > const &  matches)

Return a table representation of a MatchVector that can be used to persist it.

The schema of the returned object has "first" (RecordId), "second" (RecordID), and "distance" (double) fields.

Parameters
[in]matchesA std::vector of Match objects to convert to table form.
template<typename Cat1 , typename Cat2 >
std::vector< Match< typename Cat1::Record, typename Cat2::Record> > lsst::afw::table::unpackMatches ( BaseCatalog const &  matches,
Cat1 const &  cat1,
Cat2 const &  cat2 
)

Reconstruct a MatchVector from a BaseCatalog representation of the matches and a pair of catalogs.

Note
The first and second catalog arguments must be sorted in ascending ID order on input; this will allow us to use binary search algorithms to find the records referred to by the match table.

If an ID cannot be found in the given tables, that pointer will be set to null in the returned match vector.

Parameters
[in]matchesA normalized BaseCatalog representation, as produced by packMatches.
[in]cat1A CatalogT containing the records used on the 'first' side of the match, sorted by ascending ID.
[in]cat2A CatalogT containing the records used on the 'second' side of the match, sorted by ascending ID. May be the same as first.

This is instantiated for Simple-Simple, Simple-Source, and Source-Source catalog combinations.