LSSTApplications
20.0.0
LSSTDataManagementBasePackage
|
Go to the documentation of this file.
23 #ifndef AFW_TABLE_SortedCatalog_h_INCLUDED
24 #define AFW_TABLE_SortedCatalog_h_INCLUDED
41 template <
typename RecordT>
42 class SortedCatalogT :
public CatalogT<RecordT> {
43 typedef CatalogT<RecordT> Base;
47 typedef typename Record::Table
Table;
102 template <
typename InputIterator>
113 template <
typename OtherRecordT>
127 return io::FitsReader::apply<SortedCatalogT>(filename, hdu, flags);
142 return io::FitsReader::apply<SortedCatalogT>(manager, hdu, flags);
153 return io::FitsReader::apply<SortedCatalogT>(fitsfile, flags);
180 #endif // !AFW_TABLE_SortedCatalog_h_INCLUDED
SortedCatalogT(SortedCatalogT &&)=default
const int DEFAULT_HDU
Specify that the default HDU should be read.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
const_iterator find(RecordId id) const
SortedCatalogT & operator=(SortedCatalogT const &)=default
Defines the fields and offsets for a table.
Base::const_iterator const_iterator
Lifetime-management for memory that goes into FITS memory files.
bool isSorted() const
Return true if the vector is in ascending ID order.
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.
iterator find(RecordId id)
Return an iterator to the record with the given ID.
static SortedCatalogT readFits(fits::MemFileManager &manager, int hdu=fits::DEFAULT_HDU, int flags=0)
Read a FITS binary table from a RAM file.
SortedCatalogT subset(std::ptrdiff_t startd, std::ptrdiff_t stopd, std::ptrdiff_t step) const
Shallow copy a subset of another SortedCatalog.
ItemVariant const * other
iterator find(typename Field< T >::Value const &value, Key< T > const &key)
Return an iterator to the record with the given value.
bool isSorted(Key< T > const &key) const
Return true if the catalog is in ascending order according to the given key.
Iterator class for CatalogT.
SortedCatalogT(SortedCatalogT const &)=default
SortedCatalogT(Schema const &schema)
Construct a vector from a schema, creating a table with Table::make(schema).
void sort(Key< T > const &key)
Sort the catalog in-place by the field with the given key.
SortedCatalogT(SortedCatalogT< OtherRecordT > const &other)
Shallow copy constructor from a container containing a related record type.
A base class for image defects.
SortedCatalogT(std::shared_ptr< Table > const &table=std::shared_ptr< Table >())
Construct a vector from a table (or nothing).
SortedCatalogT & operator=(SortedCatalogT &&)=default
void sort()
Sort the vector in-place by ID.
SortedCatalogT(Base const &other)
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.
~SortedCatalogT()=default
A custom container class for records, based on std::vector.
static SortedCatalogT readFits(fits::Fits &fitsfile, int flags=0)
Read a FITS binary table from a file object already at the correct extension.
static SortedCatalogT readFits(std::string const &filename, int hdu=fits::DEFAULT_HDU, int flags=0)
Read a FITS binary table from a regular file.
Custom catalog class for record/table subclasses that are guaranteed to have an ID,...
SortedCatalogT(std::shared_ptr< Table > const &table, InputIterator first, InputIterator last, bool deep=false)
Construct a vector from a table and an iterator range.