23 #ifndef AFW_TABLE_Exposure_h_INCLUDED
24 #define AFW_TABLE_Exposure_h_INCLUDED
34 namespace lsst {
namespace afw {
46 namespace geom {
namespace polygon {
59 class OutputArchiveHandle;
93 bool contains(
Coord const & coord,
bool includeValidPolygon=
false)
const;
165 Schema r = getMinimalSchema().schema;
186 static Key<RecordId> getIdKey() {
return getMinimalSchema().id; }
236 virtual PTR(
io::FitsWriter) makeFitsWriter(fits::Fits * fitsfile,
int flags) const;
237 PTR(io::FitsWriter) makeFitsWriter(
238 fits::Fits * fitsfile,
PTR(io::OutputArchive) archive,
int flags
250 template <
typename RecordT>
256 typedef typename Record::Table
Table;
282 template <
typename InputIterator>
284 Base(table, first, last, deep)
293 template <
typename OtherRecordT>
296 using Base::writeFits;
307 writer->write(*
this);
320 return io::FitsReader::apply<ExposureCatalogT>(filename, hdu, flags);
333 return io::FitsReader::apply<ExposureCatalogT>(manager, hdu, flags);
344 return io::FitsReader::apply<ExposureCatalogT>(fitsfile, flags);
354 return io::FitsReader::apply<ExposureCatalogT>(fitsfile, flags, archive);
408 bool includeValidPolygon=
false)
const;
425 #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, Calib, or ApCorrMap. 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 object for FITS binary tables.
boost::shared_ptr< image::Calib const > getCalib() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. 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, Calib, or ApCorrMap. No copies are made.
An object passed to Persistable::write to allow it to persist itself.
Table class used to store exposure metadata.
A custom container class for records, based on std::vector.
ColumnViewT< ExposureRecord > ExposureColumnView
A thin wrapper around std::map to allow aperture corrections to be attached to Exposures.
A mapping between the keys of two Schemas, used to copy data between them.
static PointKey< 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, Calib, or ApCorrMap. No copies are made.
boost::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
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)
boost::shared_ptr< image::ApCorrMap const > getApCorrMap() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
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.
void setValidPolygon(boost::shared_ptr< geom::polygon::Polygon const > polygon)
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
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.
std::map< Citizen const *, CitizenInfo > table
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.
boost::shared_ptr< geom::polygon::Polygon const > getValidPolygon() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
static PointKey< int > getBBoxMaxKey()
Key for the maximum point of the bbox.
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, Calib, or ApCorrMap. 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.
boost::shared_ptr< geom::polygon::Polygon const > _validPolygon
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.
void setApCorrMap(boost::shared_ptr< image::ApCorrMap const > apCorrMap)
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
static ExposureCatalogT readFits(std::string const &filename, int hdu=0, int flags=0)
Read a FITS binary table from a regular file.
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, Calib, or ApCorrMap. 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.
bool contains(Coord const &coord, bool includeValidPolygon=false) const
Return true if the bounding box contains the given celestial coordinate point, taking into account th...
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.
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
boost::shared_ptr< image::ApCorrMap const > _apCorrMap