LSSTApplications
10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
LSSTDataManagementBasePackage
|
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 Types inherited from lsst::afw::table::SortedCatalogT< RecordT > | |
typedef RecordT | Record |
typedef Record::Table | Table |
typedef Base::iterator | iterator |
typedef Base::const_iterator | const_iterator |
Public Types inherited from lsst::afw::table::CatalogT< RecordT > | |
typedef RecordT | Record |
typedef Record::Table | Table |
typedef Record::ColumnView | ColumnView |
typedef RecordT | value_type |
typedef RecordT & | reference |
typedef boost::shared_ptr < RecordT > | pointer |
typedef Internal::size_type | size_type |
typedef Internal::difference_type | difference_type |
typedef CatalogIterator < typename Internal::iterator > | iterator |
typedef CatalogIterator < typename Internal::const_iterator > | const_iterator |
Public Member Functions | |
ExposureCatalogT (boost::shared_ptr< Table > const &table=boost::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 (boost::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... | |
void | writeFits (fits::Fits &fitsfile, boost::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. Mostly here for use from python. More... | |
ExposureCatalogT | subsetContaining (Coord 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. More... | |
ExposureCatalogT | subsetContaining (geom::Point2D const &point, image::Wcs 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. More... | |
Public Member Functions inherited from lsst::afw::table::SortedCatalogT< RecordT > | |
bool | isSorted () const |
Return true if the vector is in ascending ID order. More... | |
void | sort () |
Sort the vector in-place by ID. More... | |
SortedCatalogT (boost::shared_ptr< Table > const &table=boost::shared_ptr< Table >()) | |
Construct a vector from a table (or nothing). More... | |
SortedCatalogT (Schema const &schema) | |
Construct a vector from a schema, creating a table with Table::make(schema). More... | |
template<typename InputIterator > | |
SortedCatalogT (boost::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 > | |
SortedCatalogT (SortedCatalogT< OtherRecordT > const &other) | |
Shallow copy constructor from a container containing a related record type. More... | |
SortedCatalogT< 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... | |
SortedCatalogT | subset (std::ptrdiff_t startd, std::ptrdiff_t stopd, std::ptrdiff_t step) const |
Shallow copy a subset of another SortedCatalog. Mostly here for use from python. More... | |
iterator | find (RecordId id) |
Return an iterator to the record with the given ID. More... | |
const_iterator | find (RecordId id) const |
Return an iterator to the record with the given ID. More... | |
Public Member Functions inherited from lsst::afw::table::CatalogT< RecordT > | |
boost::shared_ptr< Table > | getTable () const |
Return the table associated with the catalog. More... | |
Schema | getSchema () const |
Return the schema associated with the catalog's table. More... | |
CatalogT (boost::shared_ptr< Table > const &table=boost::shared_ptr< Table >()) | |
Construct a catalog from a table (or nothing). More... | |
CatalogT (Schema const &schema) | |
Construct a catalog from a schema, creating a table with Table::make(schema). More... | |
template<typename InputIterator > | |
CatalogT (boost::shared_ptr< Table > const &table, InputIterator first, InputIterator last, bool deep=false) | |
Construct a catalog from a table and an iterator range. More... | |
CatalogT (CatalogT const &other) | |
Shallow copy constructor. More... | |
template<typename OtherRecordT > | |
CatalogT (CatalogT< OtherRecordT > const &other) | |
Shallow copy constructor from a container containing a related record type. More... | |
CatalogT & | operator= (CatalogT const &other) |
Shallow assigment. More... | |
CatalogT< 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... | |
CatalogT< RecordT > | subset (std::ptrdiff_t startd, std::ptrdiff_t stopd, std::ptrdiff_t step) const |
Returns a shallow copy of a subset of this Catalog. The arguments correspond to python's slice() syntax. More... | |
void | writeFits (std::string const &filename, std::string const &mode="w", int flags=0) const |
Write a FITS binary table to a regular file. More... | |
void | writeFits (fits::MemFileManager &manager, std::string const &mode="w", int flags=0) const |
Write a FITS binary table to a RAM file. More... | |
void | writeFits (fits::Fits &fitsfile, int flags=0) const |
Write a FITS binary table to an open file object. More... | |
ColumnView | getColumnView () const |
Return a ColumnView of this catalog's records. More... | |
bool | isContiguous () const |
Return true if all records are contiguous. More... | |
bool | empty () const |
Return true if the catalog has no records. More... | |
size_type | size () const |
Return the number of elements in the catalog. More... | |
size_type | max_size () const |
Return the maximum number of elements allowed in a catalog. More... | |
size_type | capacity () const |
Return the capacity of the catalog. More... | |
void | reserve (size_type n) |
Increase the capacity of the catalog to the given size. More... | |
reference | operator[] (size_type i) const |
Return the record at index i. More... | |
reference | at (size_type i) const |
Return the record at index i (throws std::out_of_range). More... | |
reference | front () const |
Return the first record. More... | |
reference | back () const |
Return the last record. More... | |
boost::shared_ptr< RecordT > const | get (size_type i) const |
Return a pointer to the record at index i. More... | |
void | set (size_type i, boost::shared_ptr< RecordT > const &p) |
Set the record at index i to a pointer. More... | |
template<typename InputIterator > | |
void | assign (InputIterator first, InputIterator last, bool deep=false) |
Replace the contents of the table with an iterator range. More... | |
void | push_back (Record const &r) |
Add a copy of the given record to the end of the catalog. More... | |
void | push_back (boost::shared_ptr< RecordT > const &p) |
Add the given record to the end of the catalog without copying. More... | |
boost::shared_ptr< RecordT > | addNew () |
Create a new record, add it to the end of the catalog, and return a pointer to it. More... | |
void | pop_back () |
Remove the last record in the catalog. More... | |
CatalogT | copy () const |
Deep-copy the catalog using a cloned table. More... | |
template<typename InputIterator > | |
void | insert (iterator pos, InputIterator first, InputIterator last, bool deep=false) |
Insert an iterator range into the table. More... | |
template<typename InputIterator > | |
void | insert (SchemaMapper const &mapper, iterator pos, InputIterator first, InputIterator last) |
Insert a range of records into the catalog by copying them with a SchemaMapper. More... | |
iterator | insert (iterator pos, Record const &r) |
Insert a copy of the given record at the given position. More... | |
iterator | insert (iterator pos, boost::shared_ptr< RecordT > const &p) |
Insert the given record at the given position without copying. More... | |
iterator | erase (iterator pos) |
Erase the record pointed to by pos, and return an iterator the next record. More... | |
iterator | erase (iterator first, iterator last) |
Erase the records in the range [first, last). More... | |
void | swap (CatalogT &other) |
Shallow swap of two catalogs. More... | |
void | clear () |
Remove all records from the catalog. More... | |
template<typename T > | |
bool | isSorted (Key< T > const &key) const |
Return true if the catalog is in ascending order according to the given key. More... | |
template<typename Compare > | |
bool | isSorted (Compare cmp) const |
Return true if the catalog is in ascending order according to the given predicate. More... | |
template<typename T > | |
void | sort (Key< T > const &key) |
Sort the catalog in-place by the field with the given key. More... | |
template<typename Compare > | |
void | sort (Compare cmp) |
Sort the catalog in-place by the field with the given predicate. More... | |
template<typename T > | |
CatalogT< RecordT >::iterator | find (typename Field< T >::Value const &value, Key< T > const &key) |
template<typename T > | |
CatalogT< RecordT >::const_iterator | find (typename Field< T >::Value const &value, Key< T > const &key) const |
template<typename T > | |
CatalogT< RecordT >::iterator | lower_bound (typename Field< T >::Value const &value, Key< T > const &key) |
template<typename T > | |
CatalogT< RecordT >::const_iterator | lower_bound (typename Field< T >::Value const &value, Key< T > const &key) const |
template<typename T > | |
CatalogT< RecordT >::iterator | upper_bound (typename Field< T >::Value const &value, Key< T > const &key) |
template<typename T > | |
CatalogT< RecordT >::const_iterator | upper_bound (typename Field< T >::Value const &value, Key< T > const &key) const |
template<typename T > | |
std::pair< typename CatalogT < RecordT >::iterator, typename CatalogT< RecordT > ::iterator > | equal_range (typename Field< T >::Value const &value, Key< T > const &key) |
template<typename T > | |
std::pair< typename CatalogT < RecordT >::const_iterator, typename CatalogT< RecordT > ::const_iterator > | equal_range (typename Field< T >::Value const &value, Key< T > const &key) const |
iterator | begin () |
iterator | end () |
const_iterator | begin () const |
const_iterator | end () const |
template<typename T > | |
iterator | find (typename Field< T >::Value const &value, Key< T > const &key) |
Return an iterator to the record with the given value. More... | |
template<typename T > | |
const_iterator | find (typename Field< T >::Value const &value, Key< T > const &key) const |
Return an iterator to the record with the given value. More... | |
template<typename T > | |
iterator | lower_bound (typename Field< T >::Value const &value, Key< T > const &key) |
Performed binary searches on sorted fields. More... | |
template<typename T > | |
const_iterator | lower_bound (typename Field< T >::Value const &value, Key< T > const &key) const |
Performed binary searches on sorted fields. More... | |
template<typename T > | |
iterator | upper_bound (typename Field< T >::Value const &value, Key< T > const &key) |
Performed binary searches on sorted fields. More... | |
template<typename T > | |
const_iterator | upper_bound (typename Field< T >::Value const &value, Key< T > const &key) const |
Performed binary searches on sorted fields. More... | |
template<typename T > | |
std::pair< iterator, iterator > | equal_range (typename Field< T >::Value const &value, Key< T > const &key) |
Performed binary searches on sorted fields. More... | |
template<typename T > | |
std::pair< const_iterator, const_iterator > | equal_range (typename Field< T >::Value const &value, Key< T > const &key) const |
Performed binary searches on sorted fields. More... | |
Internal & | getInternal () |
Return a reference to the internal vector-of-shared_ptr. More... | |
Internal const & | getInternal () const |
Return a reference to the internal vector-of-shared_ptr. More... | |
Static Public Member Functions | |
static ExposureCatalogT | readFits (std::string const &filename, int hdu=0, int flags=0) |
Read a FITS binary table from a regular file. More... | |
static ExposureCatalogT | readFits (fits::MemFileManager &manager, int hdu=0, 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, boost::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... | |
Static Public Member Functions inherited from lsst::afw::table::SortedCatalogT< RecordT > | |
static SortedCatalogT | readFits (std::string const &filename, int hdu=0, int flags=0) |
Read a FITS binary table from a regular file. More... | |
static SortedCatalogT | readFits (fits::MemFileManager &manager, int hdu=0, int flags=0) |
Read a FITS binary table from a RAM file. More... | |
static SortedCatalogT | readFits (fits::Fits &fitsfile, int flags=0) |
Read a FITS binary table from a file object already at the correct extension. More... | |
Static Public Member Functions inherited from lsst::afw::table::CatalogT< RecordT > | |
static CatalogT | readFits (std::string const &filename, int hdu=0, int flags=0) |
Read a FITS binary table from a regular file. More... | |
static CatalogT | readFits (fits::MemFileManager &manager, int hdu=0, int flags=0) |
Read a FITS binary table from a RAM file. More... | |
static CatalogT | readFits (fits::Fits &fitsfile, int flags=0) |
Read a FITS binary table from a file object already at the correct extension. More... | |
Protected Member Functions | |
ExposureCatalogT (Base const &other) | |
Protected Member Functions inherited from lsst::afw::table::SortedCatalogT< RecordT > | |
SortedCatalogT (Base const &other) | |
Private Types | |
typedef SortedCatalogT< RecordT > | Base |
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 55 of file Exposure.h.
|
private |
Definition at line 252 of file Exposure.h.
typedef Base::const_iterator lsst::afw::table::ExposureCatalogT< RecordT >::const_iterator |
Definition at line 259 of file Exposure.h.
typedef Base::iterator lsst::afw::table::ExposureCatalogT< RecordT >::iterator |
Definition at line 258 of file Exposure.h.
typedef RecordT lsst::afw::table::ExposureCatalogT< RecordT >::Record |
Definition at line 255 of file Exposure.h.
typedef Record::Table lsst::afw::table::ExposureCatalogT< RecordT >::Table |
Definition at line 256 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 267 of file Exposure.h.
|
inlineexplicit |
Construct a vector from a schema, creating a table with Table::make(schema).
Definition at line 270 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 283 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 294 of file Exposure.h.
|
inlineexplicitprotected |
Definition at line 411 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 1 is the Primary HDU). The default value of 0 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 319 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 1 is the Primary HDU). The default value of 0 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 332 of file Exposure.h.
|
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 343 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 353 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.
|
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 379 of file Exposure.h.
|
inline |
Shallow copy a subset of another ExposureCatalog. Mostly here for use from python.
Definition at line 387 of file Exposure.h.
ExposureCatalogT lsst::afw::table::ExposureCatalogT< RecordT >::subsetContaining | ( | Coord 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 lsst::afw::table::ExposureCatalogT< RecordT >::subsetContaining | ( | geom::Point2D const & | point, |
image::Wcs 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.
|
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 305 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.