23 #ifndef AFW_TABLE_Exposure_h_INCLUDED
24 #define AFW_TABLE_Exposure_h_INCLUDED
33 namespace lsst {
namespace afw {
53 class OutputArchiveHandle;
147 Schema r = getMinimalSchema().schema;
168 static Key<RecordId> getIdKey() {
return getMinimalSchema().id; }
218 virtual PTR(
io::FitsWriter) makeFitsWriter(fits::Fits * fitsfile,
int flags) const;
219 PTR(io::FitsWriter) makeFitsWriter(
220 fits::Fits * fitsfile,
PTR(io::OutputArchive) archive,
int flags
232 template <
typename RecordT>
238 typedef typename Record::Table
Table;
264 template <
typename InputIterator>
266 Base(table, first, last, deep)
275 template <
typename OtherRecordT>
278 using Base::writeFits;
289 writer->write(*
this);
302 return io::FitsReader::apply<ExposureCatalogT>(filename, hdu, flags);
315 return io::FitsReader::apply<ExposureCatalogT>(manager, hdu, flags);
326 return io::FitsReader::apply<ExposureCatalogT>(fitsfile, flags);
336 return io::FitsReader::apply<ExposureCatalogT>(fitsfile, archive, flags);
404 #endif // !AFW_TABLE_Exposure_h_INCLUDED
Defines the fields and offsets for a table.
static Key< RecordId > getIdKey()
Key for the unique ID.
void setPsf(boost::shared_ptr< detection::Psf const > psf)
Get/Set the the attached Wcs, Psf, or Calib. No copies are made.
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.
boost::shared_ptr< image::Wcs const > _wcs
Writer subclass for FITS binary tables.
boost::shared_ptr< image::Calib const > getCalib() const
Get/Set the the attached Wcs, Psf, or Calib. No copies are made.
void setBBox(geom::Box2I const &bbox)
boost::shared_ptr< detection::Psf const > _psf
ExposureCatalogT< ExposureRecord const > ConstExposureCatalog
void setWcs(boost::shared_ptr< image::Wcs const > wcs)
Get/Set the the attached Wcs, Psf, or Calib. No copies are made.
An object passed to Persistable::write to allow it to persist itself.
static Key< Point< int > > getBBoxMaxKey()
Key for the maximum point of the bbox.
Table class used to store exposure metadata.
A custom container class for records, based on std::vector.
ColumnViewT< ExposureRecord > ExposureColumnView
A mapping between the keys of two Schemas, used to copy data between them.
static Key< Point< int > > getBBoxMinKey()
Key for the minimum point of the bbox.
boost::shared_ptr< detection::Psf const > getPsf() const
Get/Set the the attached Wcs, Psf, or Calib. No copies are made.
boost::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
bool contains(Coord const &coord) const
Return true if the bounding box contains the given celestial coordinate point, taking into account th...
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...
ExposureCatalogT(Base const &other)
ExposureCatalogT< ExposureRecord const > ConstCatalog
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.
Implementation of the WCS standard for a any projection.
static ExposureCatalogT readFits(fits::Fits &fitsfile, int flags=0)
Read a FITS binary table from a file object already at the correct extension.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
ExposureCatalogT< Record > Catalog
An integer coordinate rectangle.
table::Key< table::Array< Kernel::Pixel > > image
A multi-catalog archive object used to save table::io::Persistable objects.
Base::const_iterator const_iterator
ExposureCatalogT< Record const > ConstCatalog
virtual void _assign(BaseRecord const &other)
Called by assign() after transferring fields to allow subclass data members to be copied...
int contains(Schema const &other, int flags=EQUAL_KEYS) const
Test whether the given schema is a subset of this.
Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID.
Lifetime-management for memory that goes into FITS memory files.
ExposureRecord(boost::shared_ptr< ExposureTable > const &table)
Iterator class for CatalogT.
boost::shared_ptr< image::Wcs const > getWcs() const
Get/Set the the attached Wcs, Psf, or Calib. No copies are made.
ExposureCatalogT(Schema const &schema)
Construct a vector from a schema, creating a table with Table::make(schema).
boost::shared_ptr< ExposureTable const > getTable() const
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.
geom::Box2I getBBox() const
boost::shared_ptr< BaseRecord > copyRecord(BaseRecord const &input)
Deep-copy a record, requiring that it have the same schema as this table.
A multidimensional strided array.
Base class for all records.
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
static ExposureCatalogT readFits(std::string const &filename, int hdu=0, int flags=0)
Read a FITS binary table from a regular file.
Key< Point< int > > bboxMax
static ExposureCatalogT readFits(fits::MemFileManager &manager, int hdu=0, int flags=0)
Read a FITS binary table from a RAM file.
Custom catalog class for ExposureRecord/Table.
ExposureCatalogT(ExposureCatalogT< OtherRecordT > const &other)
Shallow copy constructor from a container containing a related record type.
void setCalib(boost::shared_ptr< image::Calib const > calib)
Get/Set the the attached Wcs, Psf, or Calib. No copies are made.
ColumnViewT< ExposureRecord > ColumnView
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
ExposureCatalogT(boost::shared_ptr< Table > const &table, InputIterator first, InputIterator last, bool deep=false)
Construct a vector from a table and an iterator range.
ExposureCatalogT< ExposureRecord > Catalog
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid ExposureTable schema.
Record class used to store exposure metadata.
ExposureCatalogT< ExposureRecord > ExposureCatalog
SortedCatalogT< RecordT > Base
A polymorphic base class for representing an image's Point Spread Function.
boost::shared_ptr< image::Calib const > _calib
boost::int64_t RecordId
Type used for unique IDs for records.
std::map< Citizen const *, CitizenInfo > table
Key< Point< int > > bboxMin
ExposureCatalogT(boost::shared_ptr< Table > const &table=boost::shared_ptr< Table >())
Construct a vector from a table (or nothing).
Base class for all tables.
ColumnViewT< ExposureRecord > ColumnView