Template Class SortedCatalogT¶
Defined in File fwd.h
Inheritance Relationships¶
Base Type¶
public lsst::afw::table::CatalogT< RecordT >
(Template Class CatalogT)
Derived Type¶
public lsst::afw::table::ExposureCatalogT< RecordT >
(Template Class ExposureCatalogT)
Class Documentation¶
-
template<typename
RecordT
>
classSortedCatalogT
: public lsst::afw::table::CatalogT<RecordT>¶ Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID.
For a record/table pair to be used with SortedCatalogT, the table class must provide a static getIdKey() member function that returns the key to the ID field.
Subclassed by lsst::afw::table::ExposureCatalogT< RecordT >
Unnamed Group
-
iterator
find
(RecordId id)¶ Return an iterator to the record with the given ID.
Returns end() if the Record cannot be found.
- Note
The vector must be sorted in ascending ID order before calling find (i.e. isSorted() must be true).
-
const_iterator
find
(RecordId id) const¶
Public Types
-
typedef RecordT
Record
¶
-
typedef Base::iterator
iterator
¶
-
typedef Base::const_iterator
const_iterator
¶
Public Functions
-
SortedCatalogT
(SortedCatalogT const&)¶
-
SortedCatalogT
(SortedCatalogT&&)¶
-
SortedCatalogT &
operator=
(SortedCatalogT const&)¶
-
SortedCatalogT &
operator=
(SortedCatalogT&&)¶
-
~SortedCatalogT
()¶
-
bool
isSorted
() const¶ Return true if the vector is in ascending ID order.
-
void
sort
()¶ Sort the vector in-place by ID.
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.
-
SortedCatalogT
(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
>SortedCatalogT
(SortedCatalogT<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.
-
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.
The returned array’s records are shallow copies, and hence will not in general be contiguous.
-
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.
Public Static Functions
-
static SortedCatalogT
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 SortedCatalogT
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 SortedCatalogT
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.
Protected Functions
-
SortedCatalogT
(Base const &other)¶
-
iterator