LSST Applications  21.0.0+04719a4bac,21.0.0-1-ga51b5d4+f5e6047307,21.0.0-11-g2b59f77+a9c1acf22d,21.0.0-11-ga42c5b2+86977b0b17,21.0.0-12-gf4ce030+76814010d2,21.0.0-13-g1721dae+760e7a6536,21.0.0-13-g3a573fe+768d78a30a,21.0.0-15-g5a7caf0+f21cbc5713,21.0.0-16-g0fb55c1+b60e2d390c,21.0.0-19-g4cded4ca+71a93a33c0,21.0.0-2-g103fe59+bb20972958,21.0.0-2-g45278ab+04719a4bac,21.0.0-2-g5242d73+3ad5d60fb1,21.0.0-2-g7f82c8f+8babb168e8,21.0.0-2-g8f08a60+06509c8b61,21.0.0-2-g8faa9b5+616205b9df,21.0.0-2-ga326454+8babb168e8,21.0.0-2-gde069b7+5e4aea9c2f,21.0.0-2-gecfae73+1d3a86e577,21.0.0-2-gfc62afb+3ad5d60fb1,21.0.0-25-g1d57be3cd+e73869a214,21.0.0-3-g357aad2+ed88757d29,21.0.0-3-g4a4ce7f+3ad5d60fb1,21.0.0-3-g4be5c26+3ad5d60fb1,21.0.0-3-g65f322c+e0b24896a3,21.0.0-3-g7d9da8d+616205b9df,21.0.0-3-ge02ed75+a9c1acf22d,21.0.0-4-g591bb35+a9c1acf22d,21.0.0-4-g65b4814+b60e2d390c,21.0.0-4-gccdca77+0de219a2bc,21.0.0-4-ge8a399c+6c55c39e83,21.0.0-5-gd00fb1e+05fce91b99,21.0.0-6-gc675373+3ad5d60fb1,21.0.0-64-g1122c245+4fb2b8f86e,21.0.0-7-g04766d7+cd19d05db2,21.0.0-7-gdf92d54+04719a4bac,21.0.0-8-g5674e7b+d1bd76f71f,master-gac4afde19b+a9c1acf22d,w.2021.13
LSST Data Management Base Package
Source.h
Go to the documentation of this file.
1 // -*- lsst-c++ -*-
2 /*
3  * LSST Data Management System
4  * Copyright 2008-2014, 2011 LSST Corporation.
5  *
6  * This product includes software developed by the
7  * LSST Project (http://www.lsst.org/).
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the LSST License Statement and
20  * the GNU General Public License along with this program. If not,
21  * see <http://www.lsstcorp.org/LegalNotices/>.
22  */
23 
24 #ifndef AFW_TABLE_Source_h_INCLUDED
25 #define AFW_TABLE_Source_h_INCLUDED
26 
27 #include "boost/array.hpp"
28 #include "boost/type_traits/is_convertible.hpp"
29 
31 #include "lsst/afw/table/Simple.h"
34 #include "lsst/afw/table/Catalog.h"
36 #include "lsst/afw/table/slots.h"
38 
39 namespace lsst {
40 namespace afw {
41 
42 namespace geom {
43 class SkyWcs;
44 } // namespace geom
45 
46 namespace table {
47 
57 };
58 
60 
61 class SourceRecord;
62 class SourceTable;
63 
64 template <typename RecordT>
65 class SourceColumnViewT;
66 
80 class SourceRecord : public SimpleRecord {
81 public:
82  typedef SourceTable Table;
86 
97  SimpleRecord(token, std::move(data))
98  {}
99 
100  std::shared_ptr<Footprint> getFootprint() const { return _footprint; }
101 
102  void setFootprint(std::shared_ptr<Footprint> const &footprint) { _footprint = footprint; }
103 
105  return std::static_pointer_cast<SourceTable const>(BaseRecord::getTable());
106  }
107 
109  RecordId getParent() const;
111  void setParent(RecordId id);
113 
116 
119 
121  bool getPsfFluxFlag() const;
122 
125 
128 
130  bool getModelFluxFlag() const;
131 
134 
137 
139  bool getApFluxFlag() const;
140 
143 
146 
148  bool getGaussianFluxFlag() const;
149 
152 
155 
157  bool getCalibFluxFlag() const;
158 
161 
164 
166  bool getCentroidFlag() const;
167 
170 
173 
175  bool getShapeFlag() const;
176 
178  double getX() const;
179 
181  double getY() const;
182 
184  double getIxx() const;
185 
187  double getIyy() const;
188 
190  double getIxy() const;
191 
193  void updateCoord(geom::SkyWcs const &wcs);
194 
196  void updateCoord(geom::SkyWcs const &wcs, PointKey<double> const &key);
197 
198  SourceRecord(const SourceRecord &) = delete;
199  SourceRecord &operator=(const SourceRecord &) = delete;
203 
204 protected:
205 
206  virtual void _assign(BaseRecord const &other);
207 
208 private:
209  friend class SourceTable;
210 
211  std::shared_ptr<Footprint> _footprint;
212 };
213 
219 class SourceTable : public SimpleTable {
220 public:
225 
237  std::shared_ptr<IdFactory> const &idFactory);
238 
247  return make(schema, IdFactory::makeSimple());
248  }
249 
261  Schema r = getMinimalSchema().schema;
262  r.disconnectAliases();
263  return r;
264  }
265 
272  static bool checkSchema(Schema const &other) { return other.contains(getMinimalSchema().schema); }
273 
275  static Key<RecordId> getParentKey() { return getMinimalSchema().parent; }
276 
278  std::shared_ptr<SourceTable> clone() const { return std::static_pointer_cast<SourceTable>(_clone()); }
279 
282  return std::static_pointer_cast<SourceRecord>(_makeRecord());
283  }
284 
287  return std::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other));
288  }
289 
292  return std::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other, mapper));
293  }
294 
295  FluxSlotDefinition const &getPsfFluxSlot() const { return _slots.defPsfFlux; }
296 
305  getSchema().getAliasMap()->set(getPsfFluxSlot().getAlias(), name);
306  }
307 
308  FluxSlotDefinition const &getModelFluxSlot() const { return _slots.defModelFlux; }
309 
318  getSchema().getAliasMap()->set(getModelFluxSlot().getAlias(), name);
319  }
320 
321  FluxSlotDefinition const &getApFluxSlot() const { return _slots.defApFlux; }
322 
331  getSchema().getAliasMap()->set(getApFluxSlot().getAlias(), name);
332  }
333 
334  FluxSlotDefinition const &getGaussianFluxSlot() const { return _slots.defGaussianFlux; }
335 
344  getSchema().getAliasMap()->set(getGaussianFluxSlot().getAlias(), name);
345  }
346 
347  FluxSlotDefinition const &getCalibFluxSlot() const { return _slots.defCalibFlux; }
348 
357  getSchema().getAliasMap()->set(getCalibFluxSlot().getAlias(), name);
358  }
359 
360  CentroidSlotDefinition const &getCentroidSlot() const { return _slots.defCentroid; }
361 
370  getSchema().getAliasMap()->set(getCentroidSlot().getAlias(), name);
371  }
372 
373  ShapeSlotDefinition const &getShapeSlot() const { return _slots.defShape; }
374 
382  void defineShape(std::string const &name) {
383  getSchema().getAliasMap()->set(getShapeSlot().getAlias(), name);
384  }
385 
386  SourceTable &operator=(SourceTable const &) = delete;
388 
389 protected:
390  SourceTable(Schema const &schema, std::shared_ptr<IdFactory> const &idFactory);
391 
392  SourceTable(SourceTable const &other);
394 
395  void handleAliasChange(std::string const &alias) override;
396 
397  std::shared_ptr<BaseTable> _clone() const override;
398 
400 
401 private:
402  // Struct that holds the minimal schema and the special keys we've added to it.
403  struct MinimalSchema {
404  Schema schema;
405  Key<RecordId> parent;
406 
407  MinimalSchema();
408  };
409 
410  // Return the singleton minimal schema.
411  static MinimalSchema &getMinimalSchema();
412 
413  friend class io::FitsWriter;
414  friend class SourceRecord;
415 
416  // Return a writer object that knows how to save in FITS format. See also FitsWriter.
417  std::shared_ptr<io::FitsWriter> makeFitsWriter(fits::Fits *fitsfile, int flags) const override;
418 
419  SlotSuite _slots;
420 };
421 
422 template <typename RecordT>
423 class SourceColumnViewT : public ColumnViewT<RecordT> {
424 public:
425  typedef RecordT Record;
426  typedef typename RecordT::Table Table;
427 
428  // See the documentation for BaseColumnView for an explanation of why these
429  // accessors *appear* to violate const-correctness.
430 
432  ndarray::Array<double, 1> getPsfInstFlux() const {
433  return this->operator[](this->getTable()->getPsfFluxSlot().getMeasKey());
434  }
436  ndarray::Array<double, 1> getPsfInstFluxErr() const {
437  return this->operator[](this->getTable()->getPsfFluxSlot().getErrKey());
438  }
439 
441  ndarray::Array<double, 1> getApInstFlux() const {
442  return this->operator[](this->getTable()->getApFluxSlot().getMeasKey());
443  }
445  ndarray::Array<double, 1> getApInstFluxErr() const {
446  return this->operator[](this->getTable()->getApFluxSlot().getErrKey());
447  }
448 
450  ndarray::Array<double, 1> getModelInstFlux() const {
451  return this->operator[](this->getTable()->getModelFluxSlot().getMeasKey());
452  }
454  ndarray::Array<double, 1> getModelInstFluxErr() const {
455  return this->operator[](this->getTable()->getModelFluxSlot().getErrKey());
456  }
457 
459  ndarray::Array<double, 1> getGaussianInstFlux() const {
460  return this->operator[](this->getTable()->getGaussianFluxSlot().getMeasKey());
461  }
463  ndarray::Array<double, 1> getGaussianInstFluxErr() const {
464  return this->operator[](this->getTable()->getGaussianFluxSlot().getErrKey());
465  }
466 
468  ndarray::Array<double, 1> getCalibInstFlux() const {
469  return this->operator[](this->getTable()->getCalibFluxSlot().getMeasKey());
470  }
472  ndarray::Array<double, 1> getCalibInstFluxErr() const {
473  return this->operator[](this->getTable()->getCalibFluxSlot().getErrKey());
474  }
475 
476  ndarray::Array<double, 1> const getX() const {
477  return this->operator[](this->getTable()->getCentroidSlot().getMeasKey().getX());
478  }
479  ndarray::Array<double, 1> const getY() const {
480  return this->operator[](this->getTable()->getCentroidSlot().getMeasKey().getY());
481  }
482 
483  ndarray::Array<double, 1> const getIxx() const {
484  return this->operator[](this->getTable()->getShapeSlot().getMeasKey().getIxx());
485  }
486  ndarray::Array<double, 1> const getIyy() const {
487  return this->operator[](this->getTable()->getShapeSlot().getMeasKey().getIyy());
488  }
489  ndarray::Array<double, 1> const getIxy() const {
490  return this->operator[](this->getTable()->getShapeSlot().getMeasKey().getIxy());
491  }
492 
494  template <typename InputIterator>
495  static SourceColumnViewT make(std::shared_ptr<Table> const &table, InputIterator first,
496  InputIterator last) {
497  return SourceColumnViewT(BaseColumnView::make(table, first, last));
498  }
499 
504  ~SourceColumnViewT() = default;
505 
506 protected:
507  explicit SourceColumnViewT(BaseColumnView const &base) : ColumnViewT<RecordT>(base) {}
508 };
509 
510 typedef SourceColumnViewT<SourceRecord> SourceColumnView;
511 
513  return this->get(getTable()->getPsfFluxSlot().getMeasKey());
514 }
515 
517  return this->get(getTable()->getPsfFluxSlot().getErrKey());
518 }
519 
520 inline bool SourceRecord::getPsfFluxFlag() const {
521  return this->get(getTable()->getPsfFluxSlot().getFlagKey());
522 }
523 
525  return this->get(getTable()->getModelFluxSlot().getMeasKey());
526 }
527 
529  return this->get(getTable()->getModelFluxSlot().getErrKey());
530 }
531 
532 inline bool SourceRecord::getModelFluxFlag() const {
533  return this->get(getTable()->getModelFluxSlot().getFlagKey());
534 }
535 
537  return this->get(getTable()->getApFluxSlot().getMeasKey());
538 }
539 
541  return this->get(getTable()->getApFluxSlot().getErrKey());
542 }
543 
544 inline bool SourceRecord::getApFluxFlag() const {
545  return this->get(getTable()->getApFluxSlot().getFlagKey());
546 }
547 
549  return this->get(getTable()->getGaussianFluxSlot().getMeasKey());
550 }
551 
553  return this->get(getTable()->getGaussianFluxSlot().getErrKey());
554 }
555 
557  return this->get(getTable()->getGaussianFluxSlot().getFlagKey());
558 }
559 
561  return this->get(getTable()->getCalibFluxSlot().getMeasKey());
562 }
563 
565  return this->get(getTable()->getCalibFluxSlot().getErrKey());
566 }
567 
568 inline bool SourceRecord::getCalibFluxFlag() const {
569  return this->get(getTable()->getCalibFluxSlot().getFlagKey());
570 }
571 
573  return this->get(getTable()->getCentroidSlot().getMeasKey());
574 }
575 
577  return this->get(getTable()->getCentroidSlot().getErrKey());
578 }
579 
580 inline bool SourceRecord::getCentroidFlag() const {
581  return this->get(getTable()->getCentroidSlot().getFlagKey());
582 }
583 
585  return this->get(getTable()->getShapeSlot().getMeasKey());
586 }
587 
589  return this->get(getTable()->getShapeSlot().getErrKey());
590 }
591 
592 inline bool SourceRecord::getShapeFlag() const { return this->get(getTable()->getShapeSlot().getFlagKey()); }
593 
596 inline double SourceRecord::getX() const { return get(getTable()->getCentroidSlot().getMeasKey().getX()); }
597 inline double SourceRecord::getY() const { return get(getTable()->getCentroidSlot().getMeasKey().getY()); }
598 inline double SourceRecord::getIxx() const { return get(getTable()->getShapeSlot().getMeasKey().getIxx()); }
599 inline double SourceRecord::getIyy() const { return get(getTable()->getShapeSlot().getMeasKey().getIyy()); }
600 inline double SourceRecord::getIxy() const { return get(getTable()->getShapeSlot().getMeasKey().getIxy()); }
601 
602 } // namespace table
603 } // namespace afw
604 } // namespace lsst
605 
606 #endif // !AFW_TABLE_Source_h_INCLUDED
table::Key< std::string > name
Definition: Amplifier.cc:116
char * data
Definition: BaseRecord.cc:62
ItemVariant const * other
Definition: Schema.cc:56
Key< U > key
Definition: Schema.cc:281
SchemaMapper * mapper
Definition: SchemaMapper.cc:78
table::Key< table::Array< std::uint8_t > > wcs
Definition: SkyWcs.cc:71
table::Schema schema
Definition: python.h:134
Class to describe the properties of a detected object from an image.
Definition: Footprint.h:63
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Definition: fits.h:297
An ellipse core with quadrupole moments as parameters.
Definition: Quadrupole.h:47
Column-wise view into a sequence of records that have been allocated contiguously.
static BaseColumnView make(std::shared_ptr< BaseTable > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
ndarray::ArrayRef< T, 1 > const operator[](Key< T > const &key) const
Return a 1-d array corresponding to a scalar field (or subfield).
Base class for all records.
Definition: BaseRecord.h:31
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Definition: BaseRecord.h:164
Field< T >::Value get(Key< T > const &key) const
Return the value of a field for the given key.
Definition: BaseRecord.h:151
std::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
Definition: BaseRecord.h:83
Schema getSchema() const
Return the table's schema.
Definition: BaseTable.h:137
std::shared_ptr< BaseRecord > copyRecord(BaseRecord const &input)
Deep-copy a record, requiring that it have the same schema as this table.
Definition: BaseTable.cc:125
SlotDefinition specialization for centroids.
Definition: slots.h:120
Eigen::Matrix< float, 2, 2 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:123
std::shared_ptr< Table > getTable() const
Return the table that owns the records.
SlotDefinition specialization for fluxes.
Definition: slots.h:73
double ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:76
double MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:75
static std::shared_ptr< IdFactory > makeSimple()
Return a simple IdFactory that simply counts from 1.
Definition: IdFactory.cc:70
A class used as a handle to a particular field in a table.
Definition: Key.h:53
Defines the fields and offsets for a table.
Definition: Schema.h:50
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
Definition: Schema.cc:729
std::shared_ptr< AliasMap > getAliasMap() const
Return the map of aliases.
Definition: Schema.h:269
A mapping between the keys of two Schemas, used to copy data between them.
Definition: SchemaMapper.h:21
SlotDefinition specialization for shapes.
Definition: slots.h:167
Eigen::Matrix< float, 3, 3 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:170
Record class that must contain a unique ID field and a celestial coordinate field.
Definition: Simple.h:48
Table class that must contain a unique ID field and a celestial coordinate field.
Definition: Simple.h:102
Custom catalog class for record/table subclasses that are guaranteed to have an ID,...
Definition: SortedCatalog.h:42
SourceColumnViewT & operator=(SourceColumnViewT const &)=default
ndarray::Array< double, 1 > getPsfInstFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:436
ndarray::Array< double, 1 > getApInstFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:441
ndarray::Array< double, 1 > const getY() const
Definition: Source.h:479
ndarray::Array< double, 1 > getApInstFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:445
SourceColumnViewT(BaseColumnView const &base)
Definition: Source.h:507
ndarray::Array< double, 1 > getCalibInstFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:468
ndarray::Array< double, 1 > getGaussianInstFluxErr() const
Get the uncertainty on the GaussianFlux slot measurement.
Definition: Source.h:463
ndarray::Array< double, 1 > getPsfInstFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:432
SourceColumnViewT & operator=(SourceColumnViewT &&)=default
ndarray::Array< double, 1 > const getIxy() const
Definition: Source.h:489
ndarray::Array< double, 1 > getModelInstFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:450
static SourceColumnViewT make(std::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
Definition: Source.h:495
SourceColumnViewT(SourceColumnViewT &&)=default
ndarray::Array< double, 1 > getGaussianInstFlux() const
Get the value of the GaussianFlux slot measurement.
Definition: Source.h:459
SourceColumnViewT(SourceColumnViewT const &)=default
ndarray::Array< double, 1 > const getX() const
Definition: Source.h:476
ndarray::Array< double, 1 > const getIyy() const
Definition: Source.h:486
ndarray::Array< double, 1 > getModelInstFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:454
ndarray::Array< double, 1 > const getIxx() const
Definition: Source.h:483
ndarray::Array< double, 1 > getCalibInstFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:472
Record class that contains measurements made on a single exposure.
Definition: Source.h:80
FluxSlotDefinition::ErrValue getCalibInstFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:564
virtual void _assign(BaseRecord const &other)
Called by assign() after transferring fields to allow subclass data members to be copied.
Definition: Source.cc:374
double getIxx() const
Return the shape slot Ixx value.
Definition: Source.h:598
std::shared_ptr< SourceTable const > getTable() const
Definition: Source.h:104
SourceRecord & operator=(SourceRecord &&)=delete
bool getCalibFluxFlag() const
Return true if the measurement in the CalibFlux slot failed.
Definition: Source.h:568
FluxSlotDefinition::ErrValue getGaussianInstFluxErr() const
Get the uncertainty on the GaussianFlux slot measurement.
Definition: Source.h:552
SourceRecord & operator=(const SourceRecord &)=delete
bool getShapeFlag() const
Return true if the measurement in the Shape slot failed.
Definition: Source.h:592
SortedCatalogT< SourceRecord const > ConstCatalog
Definition: Source.h:85
double getX() const
Return the centroid slot x coordinate.
Definition: Source.h:596
void updateCoord(geom::SkyWcs const &wcs)
Update the coord field using the given Wcs and the field in the centroid slot.
Definition: Source.cc:368
double getY() const
Return the centroid slot y coordinate.
Definition: Source.h:597
FluxSlotDefinition::MeasValue getGaussianInstFlux() const
Get the value of the GaussianFlux slot measurement.
Definition: Source.h:548
double getIyy() const
Return the shape slot Iyy value.
Definition: Source.h:599
CentroidSlotDefinition::MeasValue getCentroid() const
Get the value of the Centroid slot measurement.
Definition: Source.h:572
bool getCentroidFlag() const
Return true if the measurement in the Centroid slot failed.
Definition: Source.h:580
FluxSlotDefinition::MeasValue getApInstFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:536
bool getModelFluxFlag() const
Return true if the measurement in the ModelFlux slot failed.
Definition: Source.h:532
void setParent(RecordId id)
Definition: Source.h:595
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:83
FluxSlotDefinition::MeasValue getModelInstFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:524
double getIxy() const
Return the shape slot Ixy value.
Definition: Source.h:600
SourceRecord(const SourceRecord &)=delete
SortedCatalogT< SourceRecord > Catalog
Definition: Source.h:84
ShapeSlotDefinition::ErrValue getShapeErr() const
Get the uncertainty on the Shape slot measurement.
Definition: Source.h:588
FluxSlotDefinition::ErrValue getPsfInstFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:516
ShapeSlotDefinition::MeasValue getShape() const
Get the value of the Shape slot measurement.
Definition: Source.h:584
RecordId getParent() const
Convenience accessors for the keys in the minimal source schema.
Definition: Source.h:594
CentroidSlotDefinition::ErrValue getCentroidErr() const
Get the uncertainty on the Centroid slot measurement.
Definition: Source.h:576
FluxSlotDefinition::MeasValue getPsfInstFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:512
FluxSlotDefinition::ErrValue getApInstFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:540
std::shared_ptr< Footprint > getFootprint() const
Definition: Source.h:100
SourceRecord(SourceRecord &&)=delete
void setFootprint(std::shared_ptr< Footprint > const &footprint)
Definition: Source.h:102
bool getGaussianFluxFlag() const
Return true if the measurement in the GaussianFlux slot failed.
Definition: Source.h:556
FluxSlotDefinition::ErrValue getModelInstFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:528
FluxSlotDefinition::MeasValue getCalibInstFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:560
bool getPsfFluxFlag() const
Return true if the measurement in the PsfFlux slot failed.
Definition: Source.h:520
SourceRecord(ConstructionToken const &token, detail::RecordData &&data)
Constructor used by SourceTable.
Definition: Source.h:96
bool getApFluxFlag() const
Return true if the measurement in the ApFlux slot failed.
Definition: Source.h:544
Table class that contains measurements made on a single exposure.
Definition: Source.h:219
SourceTable & operator=(SourceTable &&)=delete
void defineCalibFlux(std::string const &name)
Set the measurement used for the CalibFlux slot.
Definition: Source.h:356
static std::shared_ptr< SourceTable > make(Schema const &schema, std::shared_ptr< IdFactory > const &idFactory)
Construct a new table.
Definition: Source.cc:382
std::shared_ptr< SourceTable > clone() const
Return a polymorphic deep copy of the table.
Definition: Source.h:278
FluxSlotDefinition const & getPsfFluxSlot() const
Definition: Source.h:295
SourceTable(Schema const &schema, std::shared_ptr< IdFactory > const &idFactory)
Definition: Source.cc:391
FluxSlotDefinition const & getApFluxSlot() const
Definition: Source.h:321
FluxSlotDefinition const & getGaussianFluxSlot() const
Definition: Source.h:334
std::shared_ptr< SourceRecord > copyRecord(BaseRecord const &other, SchemaMapper const &mapper)
Deep-copy a record, requiring that it have the same schema as this table.
Definition: Source.h:291
void defineApFlux(std::string const &name)
Set the measurement used for the ApFlux slot.
Definition: Source.h:330
std::shared_ptr< BaseRecord > _makeRecord() override
Default-construct an associated record (protected implementation).
Definition: Source.cc:423
void definePsfFlux(std::string const &name)
Set the measurement used for the PsfFlux slot.
Definition: Source.h:304
static Key< RecordId > getParentKey()
Key for the parent ID.
Definition: Source.h:275
static Schema makeMinimalSchema()
Return a minimal schema for Source tables and records.
Definition: Source.h:260
static std::shared_ptr< SourceTable > make(Schema const &schema)
Construct a new table.
Definition: Source.h:246
SourceTable & operator=(SourceTable const &)=delete
SortedCatalogT< Record > Catalog
Definition: Source.h:223
FluxSlotDefinition const & getModelFluxSlot() const
Definition: Source.h:308
ShapeSlotDefinition const & getShapeSlot() const
Definition: Source.h:373
void defineGaussianFlux(std::string const &name)
Set the measurement used for the GaussianFlux slot.
Definition: Source.h:343
std::shared_ptr< SourceRecord > makeRecord()
Default-construct an associated record.
Definition: Source.h:281
void defineShape(std::string const &name)
Set the measurement used for the Shape slot.
Definition: Source.h:382
std::shared_ptr< BaseTable > _clone() const override
Clone implementation with noncovariant return types.
Definition: Source.cc:419
FluxSlotDefinition const & getCalibFluxSlot() const
Definition: Source.h:347
CentroidSlotDefinition const & getCentroidSlot() const
Definition: Source.h:360
void handleAliasChange(std::string const &alias) override
Definition: Source.cc:398
void defineCentroid(std::string const &name)
Set the measurement used for the Centroid slot.
Definition: Source.h:369
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:222
std::shared_ptr< SourceRecord > copyRecord(BaseRecord const &other)
Deep-copy a record, requiring that it have the same schema as this table.
Definition: Source.h:286
void defineModelFlux(std::string const &name)
Set the measurement used for the ModelFlux slot.
Definition: Source.h:317
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid SourceTable schema.
Definition: Source.h:272
SortedCatalogT< Record const > ConstCatalog
Definition: Source.h:224
Writer object for FITS binary tables.
Definition: FitsWriter.h:25
lsst::afw::detection::Footprint Footprint
Definition: Source.h:59
SourceColumnViewT< SourceRecord > SourceColumnView
Definition: fwd.h:83
SourceFitsFlags
Bitflags to be passed to SourceCatalog::readFits and SourceCatalog::writeFits.
Definition: Source.h:54
@ SOURCE_IO_NO_FOOTPRINTS
Do not read/write footprints at all.
Definition: Source.h:55
@ SOURCE_IO_NO_HEAVY_FOOTPRINTS
Read/write heavy footprints as non-heavy footprints.
Definition: Source.h:56
A base class for image defects.
STL namespace.
An aggregate containing all of the current slots used in SourceTable.
Definition: slots.h:219
CentroidSlotDefinition defCentroid
Definition: slots.h:225
FluxSlotDefinition defModelFlux
Definition: slots.h:223
FluxSlotDefinition defCalibFlux
Definition: slots.h:224
FluxSlotDefinition defApFlux
Definition: slots.h:221
FluxSlotDefinition defPsfFlux
Definition: slots.h:220
ShapeSlotDefinition defShape
Definition: slots.h:226
FluxSlotDefinition defGaussianFlux
Definition: slots.h:222
Helper struct that contains the information passed from BaseTable to BaseRecord at construction.
Definition: BaseTable.h:32