lsst.afw
19.0.0-22-gd98cb7f78
|
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 | |
ExposureCatalogT & | operator= (ExposureCatalogT const &)=default |
ExposureCatalogT & | operator= (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) | |
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.
typedef Base::const_iterator lsst::afw::table::ExposureCatalogT< RecordT >::const_iterator |
Definition at line 319 of file Exposure.h.
typedef Base::iterator lsst::afw::table::ExposureCatalogT< RecordT >::iterator |
Definition at line 318 of file Exposure.h.
typedef RecordT lsst::afw::table::ExposureCatalogT< RecordT >::Record |
Definition at line 315 of file Exposure.h.
typedef Record::Table lsst::afw::table::ExposureCatalogT< RecordT >::Table |
Definition at line 316 of file Exposure.h.
|
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.
|
inlineexplicit |
Construct a vector from a schema, creating a table with Table::make(schema).
Definition at line 330 of file Exposure.h.
|
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.
|
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.
|
default |
|
default |
|
default |
|
inlineexplicitprotected |
Definition at line 485 of file Exposure.h.
|
default |
|
default |
|
inlinestatic |
Read a FITS binary table from a file object already at the correct extension.
[in] | fitsfile | Fits file object to read from. |
[in] | flags | Table-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.
|
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.
|
inlinestatic |
Read a FITS binary table from a RAM file.
[in] | manager | Object that manages the memory to be read. |
[in] | hdu | Number 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] | flags | Table-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.
|
inlinestatic |
Read a FITS binary table from a regular file.
[in] | filename | Name of the file to read. |
[in] | hdu | Number 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] | flags | Table-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.
|
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.
|
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.
|
inline |
Shallow copy a subset of another ExposureCatalog.
Mostly here for use from python.
Definition at line 458 of file Exposure.h.
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.
Definition at line 483 of file Exposure.cc.
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.
Definition at line 471 of file Exposure.cc.
|
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.
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.