lsst.afw  19.0.0-22-gd98cb7f78
Public Types | Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
lsst::afw::table::ExposureCatalogT< RecordT > Class Template Reference

Custom catalog class for ExposureRecord/Table. More...

#include <Exposure.h>

Public Types

typedef RecordT Record
 
typedef Record::Table Table
 
typedef Base::iterator iterator
 
typedef Base::const_iterator const_iterator
 

Public Member Functions

 ExposureCatalogT (std::shared_ptr< Table > const &table=std::shared_ptr< Table >())
 Construct a vector from a table (or nothing). More...
 
 ExposureCatalogT (Schema const &schema)
 Construct a vector from a schema, creating a table with Table::make(schema). More...
 
template<typename InputIterator >
 ExposureCatalogT (std::shared_ptr< Table > const &table, InputIterator first, InputIterator last, bool deep=false)
 Construct a vector from a table and an iterator range. More...
 
template<typename OtherRecordT >
 ExposureCatalogT (ExposureCatalogT< OtherRecordT > const &other)
 Shallow copy constructor from a container containing a related record type. More...
 
 ExposureCatalogT (ExposureCatalogT const &)=default
 
 ExposureCatalogT (ExposureCatalogT &&)=default
 
ExposureCatalogToperator= (ExposureCatalogT const &)=default
 
ExposureCatalogToperator= (ExposureCatalogT &&)=default
 
 ~ExposureCatalogT ()=default
 
void writeFits (fits::Fits &fitsfile, std::shared_ptr< io::OutputArchive > archive, int flags=0) const
 Write a FITS binary table to an open file object. More...
 
void writeToArchive (io::OutputArchiveHandle &handle, bool ignoreUnpersistable=true) const
 Convenience output function for Persistables that contain an ExposureCatalog. More...
 
ExposureCatalogT< RecordT > subset (ndarray::Array< bool const, 1 > const &mask) const
 Return the subset of a catalog corresponding to the True values of the given mask array. More...
 
ExposureCatalogT subset (std::ptrdiff_t startd, std::ptrdiff_t stopd, std::ptrdiff_t step) const
 Shallow copy a subset of another ExposureCatalog. More...
 
ExposureCatalogT subsetContaining (lsst::geom::SpherePoint const &coord, bool includeValidPolygon=false) const
 Return a shallow subset of the catalog with only those records that contain the given point. More...
 
ExposureCatalogT subsetContaining (lsst::geom::Point2D const &point, geom::SkyWcs const &wcs, bool includeValidPolygon=false) const
 Return a shallow subset of the catalog with only those records that contain the given point. More...
 

Static Public Member Functions

static ExposureCatalogT readFits (std::string const &filename, int hdu=fits::DEFAULT_HDU, int flags=0)
 Read a FITS binary table from a regular file. More...
 
static ExposureCatalogT readFits (fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU, int flags=0)
 Read a FITS binary table from a RAM file. More...
 
static ExposureCatalogT readFits (fits::Fits &fitsfile, int flags=0)
 Read a FITS binary table from a file object already at the correct extension. More...
 
static ExposureCatalogT readFits (fits::Fits &fitsfile, std::shared_ptr< io::InputArchive > archive, int flags=0)
 Read a FITS binary table from a file object already at the correct extension. More...
 
static ExposureCatalogT readFromArchive (io::InputArchive const &archive, BaseCatalog const &catalog)
 Convenience input function for Persistables that contain an ExposureCatalog. More...
 

Protected Member Functions

 ExposureCatalogT (Base const &other)
 

Detailed Description

template<typename RecordT>
class lsst::afw::table::ExposureCatalogT< RecordT >

Custom catalog class for ExposureRecord/Table.

We don't expect to subclass ExposureRecord/Table, so unlike other Catalogs we can (and do) define some ExposureCatalogT member functions in Exposure.cc where the explicit instantiation is done.

Definition at line 67 of file Exposure.h.

Member Typedef Documentation

◆ const_iterator

template<typename RecordT >
typedef Base::const_iterator lsst::afw::table::ExposureCatalogT< RecordT >::const_iterator

Definition at line 319 of file Exposure.h.

◆ iterator

template<typename RecordT >
typedef Base::iterator lsst::afw::table::ExposureCatalogT< RecordT >::iterator

Definition at line 318 of file Exposure.h.

◆ Record

template<typename RecordT >
typedef RecordT lsst::afw::table::ExposureCatalogT< RecordT >::Record

Definition at line 315 of file Exposure.h.

◆ Table

template<typename RecordT >
typedef Record::Table lsst::afw::table::ExposureCatalogT< RecordT >::Table

Definition at line 316 of file Exposure.h.

Constructor & Destructor Documentation

◆ ExposureCatalogT() [1/7]

template<typename RecordT >
lsst::afw::table::ExposureCatalogT< RecordT >::ExposureCatalogT ( std::shared_ptr< Table > const &  table = std::shared_ptr<Table>())
inlineexplicit

Construct a vector from a table (or nothing).

A vector with no table is considered invalid; a valid table must be assigned to it before it can be used.

Definition at line 327 of file Exposure.h.

◆ ExposureCatalogT() [2/7]

template<typename RecordT >
lsst::afw::table::ExposureCatalogT< RecordT >::ExposureCatalogT ( Schema const &  schema)
inlineexplicit

Construct a vector from a schema, creating a table with Table::make(schema).

Definition at line 330 of file Exposure.h.

◆ ExposureCatalogT() [3/7]

template<typename RecordT >
template<typename InputIterator >
lsst::afw::table::ExposureCatalogT< RecordT >::ExposureCatalogT ( std::shared_ptr< Table > const &  table,
InputIterator  first,
InputIterator  last,
bool  deep = false 
)
inline

Construct a vector from a table and an iterator range.

If deep is true, new records will be created using table->copyRecord before being inserted. If deep is false, records will be not be copied, but they must already be associated with the given table. The table itself is never deep-copied.

The iterator must dereference to a record reference or const reference rather than a pointer, but should be implicitly convertible to a record pointer as well (see CatalogIterator).

Definition at line 343 of file Exposure.h.

◆ ExposureCatalogT() [4/7]

template<typename RecordT >
template<typename OtherRecordT >
lsst::afw::table::ExposureCatalogT< RecordT >::ExposureCatalogT ( ExposureCatalogT< OtherRecordT > const &  other)
inline

Shallow copy constructor from a container containing a related record type.

This conversion only succeeds if OtherRecordT is convertible to RecordT and OtherTable is convertible to Table.

Definition at line 354 of file Exposure.h.

◆ ExposureCatalogT() [5/7]

template<typename RecordT >
lsst::afw::table::ExposureCatalogT< RecordT >::ExposureCatalogT ( ExposureCatalogT< RecordT > const &  )
default

◆ ExposureCatalogT() [6/7]

template<typename RecordT >
lsst::afw::table::ExposureCatalogT< RecordT >::ExposureCatalogT ( ExposureCatalogT< RecordT > &&  )
default

◆ ~ExposureCatalogT()

template<typename RecordT >
lsst::afw::table::ExposureCatalogT< RecordT >::~ExposureCatalogT ( )
default

◆ ExposureCatalogT() [7/7]

template<typename RecordT >
lsst::afw::table::ExposureCatalogT< RecordT >::ExposureCatalogT ( Base const &  other)
inlineexplicitprotected

Definition at line 485 of file Exposure.h.

Member Function Documentation

◆ operator=() [1/2]

template<typename RecordT >
ExposureCatalogT& lsst::afw::table::ExposureCatalogT< RecordT >::operator= ( ExposureCatalogT< RecordT > &&  )
default

◆ operator=() [2/2]

template<typename RecordT >
ExposureCatalogT& lsst::afw::table::ExposureCatalogT< RecordT >::operator= ( ExposureCatalogT< RecordT > const &  )
default

◆ readFits() [1/4]

template<typename RecordT >
static ExposureCatalogT lsst::afw::table::ExposureCatalogT< RecordT >::readFits ( fits::Fits fitsfile,
int  flags = 0 
)
inlinestatic

Read a FITS binary table from a file object already at the correct extension.

Parameters
[in]fitsfileFits file object to read from.
[in]flagsTable-subclass-dependent bitflags that control the details of how to read the catalog. See e.g. SourceFitsFlags.

Definition at line 413 of file Exposure.h.

◆ readFits() [2/4]

template<typename RecordT >
static ExposureCatalogT lsst::afw::table::ExposureCatalogT< RecordT >::readFits ( fits::Fits fitsfile,
std::shared_ptr< io::InputArchive archive,
int  flags = 0 
)
inlinestatic

Read a FITS binary table from a file object already at the correct extension.

This overload reads nested Persistables from the given archive instead of loading a new archive from the HDUs following the catalog.

Definition at line 423 of file Exposure.h.

◆ readFits() [3/4]

template<typename RecordT >
static ExposureCatalogT lsst::afw::table::ExposureCatalogT< RecordT >::readFits ( fits::MemFileManager manager,
int  hdu = fits::DEFAULT_HDU,
int  flags = 0 
)
inlinestatic

Read a FITS binary table from a RAM file.

Parameters
[in]managerObject that manages the memory to be read.
[in]hduNumber of the "header-data unit" to read (where 0 is the Primary HDU). The default value of afw::fits::DEFAULT_HDU is interpreted as "the first HDU with NAXIS != 0".
[in]flagsTable-subclass-dependent bitflags that control the details of how to read the catalog. See e.g. SourceFitsFlags.

Definition at line 401 of file Exposure.h.

◆ readFits() [4/4]

template<typename RecordT >
static ExposureCatalogT lsst::afw::table::ExposureCatalogT< RecordT >::readFits ( std::string const &  filename,
int  hdu = fits::DEFAULT_HDU,
int  flags = 0 
)
inlinestatic

Read a FITS binary table from a regular file.

Parameters
[in]filenameName of the file to read.
[in]hduNumber of the "header-data unit" to read (where 0 is the Primary HDU). The default value of afw::fits::DEFAULT_HDU is interpreted as "the first HDU with NAXIS != 0".
[in]flagsTable-subclass-dependent bitflags that control the details of how to read the catalog. See e.g. SourceFitsFlags.

Definition at line 386 of file Exposure.h.

◆ readFromArchive()

template<typename RecordT >
ExposureCatalogT< RecordT > lsst::afw::table::ExposureCatalogT< RecordT >::readFromArchive ( io::InputArchive const &  archive,
BaseCatalog const &  catalog 
)
static

Convenience input function for Persistables that contain an ExposureCatalog.

Unlike the FITS read methods, this reader is not polymorphically aware - it always tries to create an ExposureTable rather than infer the type of table from the data.

Definition at line 456 of file Exposure.cc.

◆ subset() [1/2]

template<typename RecordT >
ExposureCatalogT<RecordT> lsst::afw::table::ExposureCatalogT< RecordT >::subset ( ndarray::Array< bool const, 1 > const &  mask) const
inline

Return the subset of a catalog corresponding to the True values of the given mask array.

The returned array's records are shallow copies, and hence will not in general be contiguous.

Definition at line 450 of file Exposure.h.

◆ subset() [2/2]

template<typename RecordT >
ExposureCatalogT lsst::afw::table::ExposureCatalogT< RecordT >::subset ( std::ptrdiff_t  startd,
std::ptrdiff_t  stopd,
std::ptrdiff_t  step 
) const
inline

Shallow copy a subset of another ExposureCatalog.

Mostly here for use from python.

Definition at line 458 of file Exposure.h.

◆ subsetContaining() [1/2]

template<typename RecordT >
ExposureCatalogT< RecordT > lsst::afw::table::ExposureCatalogT< RecordT >::subsetContaining ( lsst::geom::Point2D const &  point,
geom::SkyWcs const &  wcs,
bool  includeValidPolygon = false 
) const

Return a shallow subset of the catalog with only those records that contain the given point.

If includeValidPolygon is true we check that the point is within the validPolygon of those records which have one; if they don't, this argument is ignored.

See also
ExposureRecord::contains

Definition at line 483 of file Exposure.cc.

◆ subsetContaining() [2/2]

template<typename RecordT >
ExposureCatalogT< RecordT > lsst::afw::table::ExposureCatalogT< RecordT >::subsetContaining ( lsst::geom::SpherePoint const &  coord,
bool  includeValidPolygon = false 
) const

Return a shallow subset of the catalog with only those records that contain the given point.

If includeValidPolygon is true we check that the point is within the validPolygon of those records which have one; if they don't, this argument is ignored.

See also
ExposureRecord::contains

Definition at line 471 of file Exposure.cc.

◆ writeFits()

template<typename RecordT >
void lsst::afw::table::ExposureCatalogT< RecordT >::writeFits ( fits::Fits fitsfile,
std::shared_ptr< io::OutputArchive archive,
int  flags = 0 
) const
inline

Write a FITS binary table to an open file object.

Instead of writing nested Persistables to an internal archive and appending it to the FITS file, this overload inserts nested Persistables into the given archive and does not save it, leaving it to the user to save it later.

Definition at line 371 of file Exposure.h.

◆ writeToArchive()

template<typename RecordT >
void lsst::afw::table::ExposureCatalogT< RecordT >::writeToArchive ( io::OutputArchiveHandle handle,
bool  ignoreUnpersistable = true 
) const

Convenience output function for Persistables that contain an ExposureCatalog.

Unlike writeFits, this saves main catalog to one of the tables within the archive, as part of a Persistable's set of catalogs, rather than saving it to a separate HDU not managed by the archive.

Definition at line 444 of file Exposure.cc.


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