23 #ifndef AFW_DETECTION_Peak_h_INCLUDED
24 #define AFW_DETECTION_Peak_h_INCLUDED
49 std::shared_ptr<PeakTable const>
getTable()
const {
77 explicit PeakRecord(std::shared_ptr<PeakTable>
const& table);
130 std::shared_ptr<afw::table::IdFactory>
getIdFactory() {
return _idFactory; }
133 std::shared_ptr<afw::table::IdFactory const>
getIdFactory()
const {
return _idFactory; }
136 void setIdFactory(std::shared_ptr<afw::table::IdFactory> f) { _idFactory = f; }
174 std::shared_ptr<afw::table::BaseTable>
_clone()
const override;
176 std::shared_ptr<afw::table::BaseRecord>
_makeRecord()
override;
180 struct MinimalSchema {
193 static MinimalSchema& getMinimalSchema();
198 std::shared_ptr<afw::table::io::FitsWriter> makeFitsWriter(
fits::Fits* fitsfile,
199 int flags)
const override;
201 std::shared_ptr<afw::table::IdFactory> _idFactory;
229 #endif // !AFW_DETECTION_Peak_h_INCLUDED
std::int64_t RecordId
Type used for unique IDs for records.
Defines the fields and offsets for a table.
static afw::table::Key< float > getFxKey()
Get keys for standard fields shared by all peaks.
Writer object for FITS binary tables.
std::shared_ptr< afw::table::IdFactory const > getIdFactory() const
Return the object that generates IDs for the table (may be null).
std::ostream & operator<<(std::ostream &os, PeakRecord const &record)
std::shared_ptr< afw::table::IdFactory > getIdFactory()
Return the object that generates IDs for the table (may be null).
std::shared_ptr< PeakRecord > makeRecord()
static afw::table::Schema makeMinimalSchema()
Return a minimal schema for Peak tables and records.
afw::geom::Point2D getF() const
Convenience accessors for the keys in the minimal schema.
A mapping between the keys of two Schemas, used to copy data between them.
afw::table::CatalogT< PeakRecord > Catalog
afw::table::CatalogT< Record const > ConstCatalog
Table class for Peaks in Footprints.
static std::shared_ptr< PeakTable > make(afw::table::Schema const &schema, bool forceNew=false)
Obtain a table that can be used to create records with given schema.
std::shared_ptr< afw::table::BaseRecord > _makeRecord() override
Default-construct an associated record (protected implementation).
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
static afw::table::Key< float > getPeakValueKey()
Get keys for standard fields shared by all peaks.
void setId(afw::table::RecordId id)
Convenience accessors for the keys in the minimal schema.
static afw::table::Key< float > getFyKey()
Get keys for standard fields shared by all peaks.
std::shared_ptr< BaseRecord > copyRecord(BaseRecord const &input)
Deep-copy a record, requiring that it have the same schema as this table.
void setIy(int iy)
Convenience accessors for the keys in the minimal schema.
afw::table::CatalogT< PeakRecord const > ConstCatalog
int getIy() const
Convenience accessors for the keys in the minimal schema.
std::shared_ptr< PeakRecord > copyRecord(afw::table::BaseRecord const &other)
afw::table::CatalogT< PeakRecord const > ConstPeakCatalog
afw::geom::Point2I getCentroid(bool) const
Convenience accessors for the keys in the minimal schema.
PeakTable(afw::table::Schema const &schema, std::shared_ptr< afw::table::IdFactory > const &idFactory)
void setFy(float fy)
Convenience accessors for the keys in the minimal schema.
afw::table::CatalogT< PeakRecord > PeakCatalog
afw::table::CatalogT< Record > Catalog
Point< double, 2 > Point2D
std::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
afw::table::ColumnViewT< PeakRecord > PeakColumnView
std::shared_ptr< PeakRecord > copyRecord(afw::table::BaseRecord const &other, afw::table::SchemaMapper const &mapper)
int getIx() const
Convenience accessors for the keys in the minimal schema.
static afw::table::Key< afw::table::RecordId > getIdKey()
Get keys for standard fields shared by all peaks.
std::shared_ptr< PeakTable const > getTable() const
static bool checkSchema(afw::table::Schema const &other)
Return true if the given schema is a valid PeakTable schema.
afw::table::ColumnViewT< PeakRecord > ColumnView
Base class for all records.
int contains(Schema const &other, int flags=EQUAL_KEYS) const
Test whether the given schema is a subset of this.
afw::geom::Point2D getCentroid() const
Convenience accessors for the keys in the minimal schema.
float getFy() const
Convenience accessors for the keys in the minimal schema.
void setIdFactory(std::shared_ptr< afw::table::IdFactory > f)
Switch to a new IdFactory – object that generates IDs for the table (may be null).
static afw::table::Key< int > getIyKey()
Get keys for standard fields shared by all peaks.
void setPeakValue(float peakValue)
Convenience accessors for the keys in the minimal schema.
void setIx(int ix)
Convenience accessors for the keys in the minimal schema.
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
float getPeakValue() const
Convenience accessors for the keys in the minimal schema.
float getFx() const
Convenience accessors for the keys in the minimal schema.
void setFx(float fx)
Convenience accessors for the keys in the minimal schema.
PeakRecord(std::shared_ptr< PeakTable > const &table)
std::shared_ptr< afw::table::BaseTable > _clone() const override
Clone implementation with noncovariant return types.
Record class that represents a peak in a Footprint.
afw::table::ColumnViewT< PeakRecord > ColumnView
Base class for all tables.
afw::table::Schema schema
afw::table::RecordId getId() const
Convenience accessors for the keys in the minimal schema.
afw::geom::Point2I getI() const
Convenience accessors for the keys in the minimal schema.
static afw::table::Key< int > getIxKey()
Get keys for standard fields shared by all peaks.
std::shared_ptr< PeakTable > clone() const