23 #ifndef AFW_TABLE_Exposure_h_INCLUDED
24 #define AFW_TABLE_Exposure_h_INCLUDED
34 namespace lsst {
namespace afw {
46 namespace geom {
namespace polygon {
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.
boost::shared_ptr< BaseRecord > copyRecord(BaseRecord const &input)
Deep-copy a record, requiring that it have the same schema as this table.
ExposureRecord(boost::shared_ptr< ExposureTable > const &table)
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.
Writer object for FITS binary tables.
ColumnViewT< ExposureRecord > ColumnView
ExposureCatalogT< ExposureRecord const > ConstExposureCatalog
SortedCatalogT< RecordT > Base
An object passed to Persistable::write to allow it to persist itself.
ExposureCatalogT(Base const &other)
static ExposureCatalogT readFits(std::string const &filename, int hdu=0, int flags=0)
Read a FITS binary table from a regular file.
void setBBox(geom::Box2I const &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.
A mapping between the keys of two Schemas, used to copy data between them.
ExposureCatalogT(boost::shared_ptr< Table > const &table, InputIterator first, InputIterator last, bool deep=false)
Construct a vector from a table and an iterator range.
boost::shared_ptr< ExposureTable const > getTable() const
ExposureCatalogT< Record const > ConstCatalog
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
boost::shared_ptr< detection::Psf const > getPsf() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
Implementation of the WCS standard for a any projection.
ColumnViewT< ExposureRecord > ColumnView
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
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(fits::Fits &fitsfile, int flags=0)
Read a FITS binary table from a file object already at the correct extension.
ExposureCatalogT(ExposureCatalogT< OtherRecordT > const &other)
Shallow copy constructor from a container containing a related record type.
ExposureCatalogT< Record > Catalog
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...
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.
ExposureCatalogT< ExposureRecord const > ConstCatalog
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...
geom::Box2I getBBox() const
boost::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
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.
ExposureCatalogT(boost::shared_ptr< Table > const &table=boost::shared_ptr< Table >())
Construct a vector from a table (or nothing).
Iterator class for CatalogT.
void setWcs(boost::shared_ptr< image::Wcs const > wcs)
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
static PointKey< int > getBBoxMinKey()
Key for the minimum point of the bbox.
static Key< RecordId > getIdKey()
Key for the unique ID.
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.
boost::shared_ptr< image::Wcs const > _wcs
boost::shared_ptr< image::Wcs const > getWcs() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
A multidimensional strided array.
Base class for all records.
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid ExposureTable schema.
Base::const_iterator const_iterator
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.
int contains(Schema const &other, int flags=EQUAL_KEYS) const
Test whether the given schema is a subset of this.
boost::shared_ptr< image::Calib const > getCalib() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
Custom catalog class for ExposureRecord/Table.
boost::shared_ptr< image::ApCorrMap const > getApCorrMap() 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.
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Record class used to store exposure metadata.
void setCalib(boost::shared_ptr< image::Calib const > calib)
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
ExposureCatalogT< ExposureRecord > ExposureCatalog
ExposureCatalogT< ExposureRecord > Catalog
boost::shared_ptr< image::ApCorrMap const > _apCorrMap
static ExposureCatalogT readFits(fits::MemFileManager &manager, int hdu=0, int flags=0)
Read a FITS binary table from a RAM file.
A polymorphic base class for representing an image's Point Spread Function.
void setPsf(boost::shared_ptr< detection::Psf const > psf)
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< geom::polygon::Polygon const > _validPolygon
boost::int64_t RecordId
Type used for unique IDs for records.
boost::shared_ptr< geom::polygon::Polygon const > getValidPolygon() const
Get/Set the the attached Wcs, Psf, Calib, or ApCorrMap. No copies are made.
Base class for all tables.
virtual void _assign(BaseRecord const &other)
Called by assign() after transferring fields to allow subclass data members to be copied...
boost::shared_ptr< detection::Psf const > _psf
boost::shared_ptr< image::Calib const > _calib
static PointKey< int > getBBoxMaxKey()
Key for the maximum point of the bbox.