23 #ifndef AFW_TABLE_Exposure_h_INCLUDED
24 #define AFW_TABLE_Exposure_h_INCLUDED
34 namespace lsst {
namespace afw {
47 namespace geom {
namespace polygon {
60 class OutputArchiveHandle;
94 bool contains(
Coord const & coord,
bool includeValidPolygon=
false)
const;
170 Schema r = getMinimalSchema().schema;
191 static Key<RecordId> getIdKey() {
return getMinimalSchema().id; }
241 virtual PTR(
io::FitsWriter) makeFitsWriter(fits::Fits * fitsfile,
int flags) const;
242 PTR(io::FitsWriter) makeFitsWriter(
243 fits::Fits * fitsfile,
PTR(io::OutputArchive) archive,
int flags
255 template <
typename RecordT>
261 typedef typename Record::Table
Table;
287 template <
typename InputIterator>
289 Base(table, first, last, deep)
298 template <
typename OtherRecordT>
301 using Base::writeFits;
312 writer->write(*
this);
325 return io::FitsReader::apply<ExposureCatalogT>(filename, hdu, flags);
338 return io::FitsReader::apply<ExposureCatalogT>(manager, hdu, flags);
349 return io::FitsReader::apply<ExposureCatalogT>(fitsfile, flags);
359 return io::FitsReader::apply<ExposureCatalogT>(fitsfile, flags, archive);
413 bool includeValidPolygon=
false)
const;
430 #endif // !AFW_TABLE_Exposure_h_INCLUDED
Defines the fields and offsets for a table.
int contains(Schema const &other, int flags=EQUAL_KEYS) const
Test whether the given schema is a subset of this.
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
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...
boost::shared_ptr< geom::polygon::Polygon const > getValidPolygon() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
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.
Writer object for FITS binary tables.
static Key< RecordId > getIdKey()
Get keys for standard fields shared by all references.
boost::shared_ptr< image::VisitInfo const > _visitInfo
ExposureCatalogT< ExposureRecord const > ConstCatalog
ExposureCatalogT< ExposureRecord const > ConstExposureCatalog
void setPsf(boost::shared_ptr< detection::Psf const > psf)
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
ExposureCatalogT< Record > Catalog
An object passed to Persistable::write to allow it to persist itself.
ExposureCatalogT(boost::shared_ptr< Table > const &table, InputIterator first, InputIterator last, bool deep=false)
Construct a vector from a table and an iterator range.
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.
static PointKey< 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
afw::table::Schema schema
A thin wrapper around std::map to allow aperture corrections to be attached to Exposures.
ExposureCatalogT< Record const > ConstCatalog
A mapping between the keys of two Schemas, used to copy data between them.
boost::shared_ptr< image::Wcs const > _wcs
ExposureCatalogT(Schema const &schema)
Construct a vector from a schema, creating a table with Table::make(schema).
Information about a single exposure of an imaging camera.
ColumnViewT< ExposureRecord > ColumnView
boost::shared_ptr< image::VisitInfo const > getVisitInfo() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
Implementation of the WCS standard for a any projection.
void setCalib(boost::shared_ptr< image::Calib const > calib)
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
static PointKey< int > getBBoxMinKey()
Key for the minimum point of the bbox.
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Describe an exposure's calibration.
An integer coordinate rectangle.
boost::shared_ptr< detection::Psf const > getPsf() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
table::Key< table::Array< Kernel::Pixel > > image
boost::shared_ptr< ExposureTable const > getTable() const
boost::shared_ptr< detection::Psf const > _psf
A multi-catalog archive object used to save table::io::Persistable objects.
geom::Box2I getBBox() const
ColumnViewT< ExposureRecord > ColumnView
std::int64_t RecordId
Type used for unique IDs for records.
ExposureRecord(boost::shared_ptr< ExposureTable > const &table)
Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID.
void setBBox(geom::Box2I const &bbox)
Lifetime-management for memory that goes into FITS memory files.
std::map< Citizen const *, CitizenInfo > table
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid ExposureTable schema.
Iterator class for CatalogT.
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...
boost::shared_ptr< geom::polygon::Polygon const > _validPolygon
ExposureCatalogT subset(std::ptrdiff_t startd, std::ptrdiff_t stopd, std::ptrdiff_t step) const
Shallow copy a subset of another ExposureCatalog.
static ExposureCatalogT readFits(fits::MemFileManager &manager, int hdu=0, int flags=0)
Read a FITS binary table from a RAM file.
boost::shared_ptr< image::ApCorrMap const > getApCorrMap() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
ExposureCatalogT(ExposureCatalogT< OtherRecordT > const &other)
Shallow copy constructor from a container containing a related record type.
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::Fits &fitsfile, int flags=0)
Read a FITS binary table from a file object already at the correct extension.
boost::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
Base class for all records.
SortedCatalogT< RecordT > Base
boost::shared_ptr< image::Calib const > _calib
ExposureCatalogT(boost::shared_ptr< Table > const &table=boost::shared_ptr< Table >())
Construct a vector from a table (or nothing).
ExposureCatalogT< ExposureRecord > Catalog
void setWcs(boost::shared_ptr< image::Wcs const > wcs)
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
ExposureCatalogT(Base const &other)
Custom catalog class for ExposureRecord/Table.
void setApCorrMap(boost::shared_ptr< image::ApCorrMap const > apCorrMap)
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
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< image::Calib const > getCalib() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
void setValidPolygon(boost::shared_ptr< geom::polygon::Polygon const > polygon)
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
Record class used to store exposure metadata.
virtual void _assign(BaseRecord const &other)
Called by assign() after transferring fields to allow subclass data members to be copied...
void setVisitInfo(boost::shared_ptr< image::VisitInfo const > visitInfo)
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
boost::shared_ptr< image::Wcs const > getWcs() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
ExposureCatalogT< ExposureRecord > ExposureCatalog
#define CONST_PTR(...)
A shared pointer to a const object.
Base::const_iterator const_iterator
A polymorphic base class for representing an image's Point Spread Function.
This is the base class for spherical coordinates.
boost::shared_ptr< image::ApCorrMap const > _apCorrMap
Base class for all tables.