Template Class ExposureCatalogT¶
Defined in File Exposure.h
Inheritance Relationships¶
Base Type¶
public lsst::afw::table::SortedCatalogT< RecordT >
(Template Class SortedCatalogT)
Class Documentation¶
-
template<typename
RecordT
>
classExposureCatalogT
: public lsst::afw::table::SortedCatalogT<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.
Public Types
-
typedef RecordT
Record
¶
-
typedef Base::iterator
iterator
¶
-
typedef Base::const_iterator
const_iterator
¶
Public Functions
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.
-
ExposureCatalogT
(Schema const &schema)¶ Construct a vector from a schema, creating a table with Table::make(schema).
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).
-
template<typename
OtherRecordT
>ExposureCatalogT
(ExposureCatalogT<OtherRecordT> const &other)¶ 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.
-
ExposureCatalogT
(ExposureCatalogT const&)¶
-
ExposureCatalogT
(ExposureCatalogT&&)¶
-
ExposureCatalogT &
operator=
(ExposureCatalogT const&)¶
-
ExposureCatalogT &
operator=
(ExposureCatalogT&&)¶
-
~ExposureCatalogT
()¶
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.
-
void
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.
-
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.
The returned array’s records are shallow copies, and hence will not in general be contiguous.
-
ExposureCatalogT
subset
(std::ptrdiff_t startd, std::ptrdiff_t stopd, std::ptrdiff_t step) const¶ Shallow copy a subset of another ExposureCatalog. Mostly here for use from python.
-
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.
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.
-
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.
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.
Public Static 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.
- Parameters
[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.
-
static ExposureCatalogT
readFits
(fits::MemFileManager &manager, int hdu = fits::DEFAULT_HDU, int flags = 0)¶ Read a FITS binary table from a RAM file.
- Parameters
[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.
-
static ExposureCatalogT
readFits
(fits::Fits &fitsfile, int flags = 0)¶ Read a FITS binary table from a file object already at the correct extension.
- Parameters
[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.
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.
-
static ExposureCatalogT
readFromArchive
(io::InputArchive const &archive, BaseCatalog const &catalog)¶ 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.
Protected Functions
-
ExposureCatalogT
(Base const &other)¶
-
typedef RecordT