lsst.afw  14.0-59-g0c7cc230b
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 // THIS FILE IS AUTOMATICALLY GENERATED from Source.h.m4, AND WILL BE OVERWRITTEN IF EDITED MANUALLY.
25 
26 #ifndef AFW_TABLE_Source_h_INCLUDED
27 #define AFW_TABLE_Source_h_INCLUDED
28 
29 #include "boost/array.hpp"
30 #include "boost/type_traits/is_convertible.hpp"
31 
33 #include "lsst/afw/table/Simple.h"
36 #include "lsst/afw/table/Catalog.h"
38 #include "lsst/afw/table/slots.h"
40 
41 namespace lsst { namespace afw {
42 
43 namespace geom {
44 class SkyWcs;
45 } // namespace image
46 
47 namespace table {
48 
58 };
59 
61 
62 class SourceRecord;
63 class SourceTable;
64 
65 template <typename RecordT> class SourceColumnViewT;
66 
80 class SourceRecord : public SimpleRecord {
81 public:
82 
83  typedef SourceTable Table;
87 
89 
90  void setFootprint(std::shared_ptr<Footprint> const & footprint) { _footprint = footprint; }
91 
93  return std::static_pointer_cast<SourceTable const>(BaseRecord::getTable());
94  }
95 
97  RecordId getParent() const;
99  void setParent(RecordId id);
101 
103  FluxSlotDefinition::MeasValue getPsfFlux() const;
104 
106  FluxSlotDefinition::ErrValue getPsfFluxErr() const;
107 
109  bool getPsfFluxFlag() const;
110 
112  FluxSlotDefinition::MeasValue getModelFlux() const;
113 
115  FluxSlotDefinition::ErrValue getModelFluxErr() const;
116 
118  bool getModelFluxFlag() const;
119 
121  FluxSlotDefinition::MeasValue getApFlux() const;
122 
124  FluxSlotDefinition::ErrValue getApFluxErr() const;
125 
127  bool getApFluxFlag() const;
128 
130  FluxSlotDefinition::MeasValue getInstFlux() const;
131 
133  FluxSlotDefinition::ErrValue getInstFluxErr() const;
134 
136  bool getInstFluxFlag() const;
137 
139  FluxSlotDefinition::MeasValue getCalibFlux() const;
140 
142  FluxSlotDefinition::ErrValue getCalibFluxErr() const;
143 
145  bool getCalibFluxFlag() const;
146 
148  CentroidSlotDefinition::MeasValue getCentroid() const;
149 
151  CentroidSlotDefinition::ErrValue getCentroidErr() const;
152 
154  bool getCentroidFlag() const;
155 
157  ShapeSlotDefinition::MeasValue getShape() const;
158 
160  ShapeSlotDefinition::ErrValue getShapeErr() const;
161 
163  bool getShapeFlag() const;
164 
165 
167  double getX() const;
168 
170  double getY() const;
171 
173  double getIxx() const;
174 
176  double getIyy() const;
177 
179  double getIxy() const;
180 
182  void updateCoord(geom::SkyWcs const & wcs);
183 
185  void updateCoord(geom::SkyWcs const & wcs, PointKey<double> const & key);
186 
187  SourceRecord(const SourceRecord&) = delete;
188  SourceRecord& operator=(const SourceRecord&) = delete;
189  SourceRecord(SourceRecord&&) = delete;
190  SourceRecord& operator=(SourceRecord&&) = delete;
191  ~SourceRecord();
192 
193 protected:
194 
195  explicit SourceRecord(std::shared_ptr<SourceTable> const & table);
196 
197  virtual void _assign(BaseRecord const & other);
198 
199 private:
200 
201  friend class SourceTable;
202 
204 };
205 
211 class SourceTable : public SimpleTable {
212 public:
213 
218 
230 
238  static std::shared_ptr<SourceTable> make(Schema const & schema) { return make(schema, IdFactory::makeSimple()); }
239 
251  Schema r = getMinimalSchema().schema;
252  r.disconnectAliases();
253  return r;
254  }
255 
262  static bool checkSchema(Schema const & other) {
263  return other.contains(getMinimalSchema().schema);
264  }
265 
267  static Key<RecordId> getParentKey() { return getMinimalSchema().parent; }
268 
271 
274 
277  return std::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other));
278  }
279 
282  return std::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other, mapper));
283  }
284 
285 
286  FluxSlotDefinition const & getPsfFluxSlot() const { return _slots.defPsfFlux; }
287 
296  getSchema().getAliasMap()->set(getPsfFluxSlot().getAlias(), name);
297  }
298 
309  return getSchema().getAliasMap()->get(getPsfFluxSlot().getAlias());
310  }
311 
317  bool hasPsfFluxSlot() const {
318  return getPsfFluxSlot().isValid();
319  }
320 
327  return getPsfFluxSlot().getMeasKey();
328  }
329 
336  return getPsfFluxSlot().getErrKey();
337  }
338 
345  return getPsfFluxSlot().getFlagKey();
346  }
347 
348 
349  FluxSlotDefinition const & getModelFluxSlot() const { return _slots.defModelFlux; }
350 
359  getSchema().getAliasMap()->set(getModelFluxSlot().getAlias(), name);
360  }
361 
372  return getSchema().getAliasMap()->get(getModelFluxSlot().getAlias());
373  }
374 
380  bool hasModelFluxSlot() const {
381  return getModelFluxSlot().isValid();
382  }
383 
390  return getModelFluxSlot().getMeasKey();
391  }
392 
399  return getModelFluxSlot().getErrKey();
400  }
401 
408  return getModelFluxSlot().getFlagKey();
409  }
410 
411 
412  FluxSlotDefinition const & getApFluxSlot() const { return _slots.defApFlux; }
413 
421  void defineApFlux(std::string const & name) {
422  getSchema().getAliasMap()->set(getApFluxSlot().getAlias(), name);
423  }
424 
435  return getSchema().getAliasMap()->get(getApFluxSlot().getAlias());
436  }
437 
443  bool hasApFluxSlot() const {
444  return getApFluxSlot().isValid();
445  }
446 
453  return getApFluxSlot().getMeasKey();
454  }
455 
462  return getApFluxSlot().getErrKey();
463  }
464 
471  return getApFluxSlot().getFlagKey();
472  }
473 
474 
475  FluxSlotDefinition const & getInstFluxSlot() const { return _slots.defInstFlux; }
476 
485  getSchema().getAliasMap()->set(getInstFluxSlot().getAlias(), name);
486  }
487 
498  return getSchema().getAliasMap()->get(getInstFluxSlot().getAlias());
499  }
500 
506  bool hasInstFluxSlot() const {
507  return getInstFluxSlot().isValid();
508  }
509 
516  return getInstFluxSlot().getMeasKey();
517  }
518 
525  return getInstFluxSlot().getErrKey();
526  }
527 
534  return getInstFluxSlot().getFlagKey();
535  }
536 
537 
538  FluxSlotDefinition const & getCalibFluxSlot() const { return _slots.defCalibFlux; }
539 
548  getSchema().getAliasMap()->set(getCalibFluxSlot().getAlias(), name);
549  }
550 
561  return getSchema().getAliasMap()->get(getCalibFluxSlot().getAlias());
562  }
563 
569  bool hasCalibFluxSlot() const {
570  return getCalibFluxSlot().isValid();
571  }
572 
579  return getCalibFluxSlot().getMeasKey();
580  }
581 
588  return getCalibFluxSlot().getErrKey();
589  }
590 
597  return getCalibFluxSlot().getFlagKey();
598  }
599 
600 
601  CentroidSlotDefinition const & getCentroidSlot() const { return _slots.defCentroid; }
602 
611  getSchema().getAliasMap()->set(getCentroidSlot().getAlias(), name);
612  }
613 
624  return getSchema().getAliasMap()->get(getCentroidSlot().getAlias());
625  }
626 
632  bool hasCentroidSlot() const {
633  return getCentroidSlot().isValid();
634  }
635 
642  return getCentroidSlot().getMeasKey();
643  }
644 
651  return getCentroidSlot().getErrKey();
652  }
653 
660  return getCentroidSlot().getFlagKey();
661  }
662 
663 
664  ShapeSlotDefinition const & getShapeSlot() const { return _slots.defShape; }
665 
673  void defineShape(std::string const & name) {
674  getSchema().getAliasMap()->set(getShapeSlot().getAlias(), name);
675  }
676 
687  return getSchema().getAliasMap()->get(getShapeSlot().getAlias());
688  }
689 
695  bool hasShapeSlot() const {
696  return getShapeSlot().isValid();
697  }
698 
705  return getShapeSlot().getMeasKey();
706  }
707 
714  return getShapeSlot().getErrKey();
715  }
716 
723  return getShapeSlot().getFlagKey();
724  }
725 
726 
727  SourceTable & operator=(SourceTable const &) = delete;
728  SourceTable & operator=(SourceTable &&) = delete;
729 
730 protected:
731 
733 
734  SourceTable(SourceTable const & other);
735  SourceTable(SourceTable && other);
736 
737  void handleAliasChange(std::string const & alias) override;
738 
739  std::shared_ptr<BaseTable> _clone() const override;
740 
741  std::shared_ptr<BaseRecord> _makeRecord() override;
742 
743 private:
744 
745  // Struct that holds the minimal schema and the special keys we've added to it.
746  struct MinimalSchema {
747  Schema schema;
748  Key<RecordId> parent;
749 
750  MinimalSchema();
751  };
752 
753  // Return the singleton minimal schema.
754  static MinimalSchema & getMinimalSchema();
755 
756  friend class io::FitsWriter;
757  friend class SourceRecord;
758 
759  // Return a writer object that knows how to save in FITS format. See also FitsWriter.
760  std::shared_ptr<io::FitsWriter> makeFitsWriter(fits::Fits * fitsfile, int flags) const override;
761 
762  SlotSuite _slots;
763 };
764 
765 template <typename RecordT>
766 class SourceColumnViewT : public ColumnViewT<RecordT> {
767 public:
768 
769  typedef RecordT Record;
770  typedef typename RecordT::Table Table;
771 
772  // See the documentation for BaseColumnView for an explanation of why these
773  // accessors *appear* to violate const-correctness.
774 
776  ndarray::Array<double,1> getPsfFlux() const {
777  return this->operator[](this->getTable()->getPsfFluxSlot().getMeasKey());
778  }
780  ndarray::Array<double,1> getPsfFluxErr() const {
781  return this->operator[](this->getTable()->getPsfFluxSlot().getErrKey());
782  }
783 
785  ndarray::Array<double,1> getApFlux() const {
786  return this->operator[](this->getTable()->getApFluxSlot().getMeasKey());
787  }
789  ndarray::Array<double,1> getApFluxErr() const {
790  return this->operator[](this->getTable()->getApFluxSlot().getErrKey());
791  }
792 
794  ndarray::Array<double,1> getModelFlux() const {
795  return this->operator[](this->getTable()->getModelFluxSlot().getMeasKey());
796  }
798  ndarray::Array<double,1> getModelFluxErr() const {
799  return this->operator[](this->getTable()->getModelFluxSlot().getErrKey());
800  }
801 
803  ndarray::Array<double,1> getInstFlux() const {
804  return this->operator[](this->getTable()->getInstFluxSlot().getMeasKey());
805  }
807  ndarray::Array<double,1> getInstFluxErr() const {
808  return this->operator[](this->getTable()->getInstFluxSlot().getErrKey());
809  }
810 
812  ndarray::Array<double,1> getCalibFlux() const {
813  return this->operator[](this->getTable()->getCalibFluxSlot().getMeasKey());
814  }
816  ndarray::Array<double,1> getCalibFluxErr() const {
817  return this->operator[](this->getTable()->getCalibFluxSlot().getErrKey());
818  }
819 
820 
821  ndarray::Array<double,1> const getX() const {
822  return this->operator[](this->getTable()->getCentroidKey().getX());
823  }
824  ndarray::Array<double,1> const getY() const {
825  return this->operator[](this->getTable()->getCentroidKey().getY());
826  }
827 
828  ndarray::Array<double,1> const getIxx() const {
829  return this->operator[](this->getTable()->getShapeKey().getIxx());
830  }
831  ndarray::Array<double,1> const getIyy() const {
832  return this->operator[](this->getTable()->getShapeKey().getIyy());
833  }
834  ndarray::Array<double,1> const getIxy() const {
835  return this->operator[](this->getTable()->getShapeKey().getIxy());
836  }
837 
839  template <typename InputIterator>
840  static SourceColumnViewT make(std::shared_ptr<Table> const & table, InputIterator first, InputIterator last) {
841  return SourceColumnViewT(BaseColumnView::make(table, first, last));
842  }
843 
844  SourceColumnViewT(SourceColumnViewT const &) = default;
845  SourceColumnViewT(SourceColumnViewT &&) = default;
846  SourceColumnViewT & operator=(SourceColumnViewT const &) = default;
847  SourceColumnViewT & operator=(SourceColumnViewT &&) = default;
848  ~SourceColumnViewT() = default;
849 
850 protected:
851  explicit SourceColumnViewT(BaseColumnView const & base) : ColumnViewT<RecordT>(base) {}
852 };
853 
855 
856 inline FluxSlotDefinition::MeasValue SourceRecord::getPsfFlux() const {
857  return this->get(getTable()->getPsfFluxSlot().getMeasKey());
858 }
859 
860 inline FluxSlotDefinition::ErrValue SourceRecord::getPsfFluxErr() const {
861  return this->get(getTable()->getPsfFluxSlot().getErrKey());
862 }
863 
864 inline bool SourceRecord::getPsfFluxFlag() const {
865  return this->get(getTable()->getPsfFluxSlot().getFlagKey());
866 }
867 
868 inline FluxSlotDefinition::MeasValue SourceRecord::getModelFlux() const {
869  return this->get(getTable()->getModelFluxSlot().getMeasKey());
870 }
871 
872 inline FluxSlotDefinition::ErrValue SourceRecord::getModelFluxErr() const {
873  return this->get(getTable()->getModelFluxSlot().getErrKey());
874 }
875 
876 inline bool SourceRecord::getModelFluxFlag() const {
877  return this->get(getTable()->getModelFluxSlot().getFlagKey());
878 }
879 
880 inline FluxSlotDefinition::MeasValue SourceRecord::getApFlux() const {
881  return this->get(getTable()->getApFluxSlot().getMeasKey());
882 }
883 
884 inline FluxSlotDefinition::ErrValue SourceRecord::getApFluxErr() const {
885  return this->get(getTable()->getApFluxSlot().getErrKey());
886 }
887 
888 inline bool SourceRecord::getApFluxFlag() const {
889  return this->get(getTable()->getApFluxSlot().getFlagKey());
890 }
891 
892 inline FluxSlotDefinition::MeasValue SourceRecord::getInstFlux() const {
893  return this->get(getTable()->getInstFluxSlot().getMeasKey());
894 }
895 
896 inline FluxSlotDefinition::ErrValue SourceRecord::getInstFluxErr() const {
897  return this->get(getTable()->getInstFluxSlot().getErrKey());
898 }
899 
900 inline bool SourceRecord::getInstFluxFlag() const {
901  return this->get(getTable()->getInstFluxSlot().getFlagKey());
902 }
903 
904 inline FluxSlotDefinition::MeasValue SourceRecord::getCalibFlux() const {
905  return this->get(getTable()->getCalibFluxSlot().getMeasKey());
906 }
907 
908 inline FluxSlotDefinition::ErrValue SourceRecord::getCalibFluxErr() const {
909  return this->get(getTable()->getCalibFluxSlot().getErrKey());
910 }
911 
912 inline bool SourceRecord::getCalibFluxFlag() const {
913  return this->get(getTable()->getCalibFluxSlot().getFlagKey());
914 }
915 
916 inline CentroidSlotDefinition::MeasValue SourceRecord::getCentroid() const {
917  return this->get(getTable()->getCentroidSlot().getMeasKey());
918 }
919 
920 inline CentroidSlotDefinition::ErrValue SourceRecord::getCentroidErr() const {
921  return this->get(getTable()->getCentroidSlot().getErrKey());
922 }
923 
924 inline bool SourceRecord::getCentroidFlag() const {
925  return this->get(getTable()->getCentroidSlot().getFlagKey());
926 }
927 
928 inline ShapeSlotDefinition::MeasValue SourceRecord::getShape() const {
929  return this->get(getTable()->getShapeSlot().getMeasKey());
930 }
931 
932 inline ShapeSlotDefinition::ErrValue SourceRecord::getShapeErr() const {
933  return this->get(getTable()->getShapeSlot().getErrKey());
934 }
935 
936 inline bool SourceRecord::getShapeFlag() const {
937  return this->get(getTable()->getShapeSlot().getFlagKey());
938 }
939 
940 
941 inline RecordId SourceRecord::getParent() const { return get(SourceTable::getParentKey()); }
942 inline void SourceRecord::setParent(RecordId id) { set(SourceTable::getParentKey(), id); }
943 inline double SourceRecord::getX() const {
944  return get(getTable()->getCentroidKey().getX());
945 }
946 inline double SourceRecord::getY() const {
947  return get(getTable()->getCentroidKey().getY());
948 }
949 inline double SourceRecord::getIxx() const {
950  return get(getTable()->getShapeKey().getIxx());
951 }
952 inline double SourceRecord::getIyy() const {
953  return get(getTable()->getShapeKey().getIyy());
954 }
955 inline double SourceRecord::getIxy() const {
956  return get(getTable()->getShapeKey().getIxy());
957 }
958 
959 }}} // namespace lsst::afw::table
960 
961 #endif // !AFW_TABLE_Source_h_INCLUDED
An ellipse core with quadrupole moments as parameters.
Definition: Quadrupole.h:47
bool hasCentroidSlot() const
Return true if the Centroid slot corresponds to a valid field.
Definition: Source.h:632
Defines the fields and offsets for a table.
Definition: Schema.h:47
Key< Flag > getPsfFluxFlagKey() const
Return the key used for the PsfFlux slot failure flag.
Definition: Source.h:344
A 2-dimensional celestial WCS that transform pixels to ICRS RA/Dec, using the LSST standard for pixel...
Definition: SkyWcs.h:113
Column-wise view into a sequence of records that have been allocated contiguously.
Writer object for FITS binary tables.
Definition: FitsWriter.h:25
ndarray::Array< double, 1 > getModelFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:798
table::Key< std::string > name
Definition: ApCorrMap.cc:71
Key< Flag > getApFluxFlagKey() const
Return the key used for the ApFlux slot failure flag.
Definition: Source.h:470
ndarray::Array< double, 1 > getPsfFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:780
FluxSlotDefinition const & getApFluxSlot() const
Definition: Source.h:412
ndarray::Array< double, 1 > const getX() const
Definition: Source.h:821
SortedCatalogT< SourceRecord const > ConstCatalog
Definition: Source.h:86
void defineCalibFlux(std::string const &name)
Set the measurement used for the CalibFlux slot.
Definition: Source.h:547
ndarray::Array< double, 1 > const getY() const
Definition: Source.h:824
afw::table::Schema schema
Definition: GaussianPsf.cc:43
A mapping between the keys of two Schemas, used to copy data between them.
Definition: SchemaMapper.h:21
ndarray::Array< double, 1 > const getIxy() const
Definition: Source.h:834
SourceColumnViewT(BaseColumnView const &base)
Definition: Source.h:851
FluxSlotDefinition const & getInstFluxSlot() const
Definition: Source.h:475
ndarray::Array< double, 1 > const getIyy() const
Definition: Source.h:831
FluxSlotDefinition::ErrKey getPsfFluxErrKey() const
Return the key used for the PsfFlux slot uncertainty.
Definition: Source.h:335
void defineInstFlux(std::string const &name)
Set the measurement used for the InstFlux slot.
Definition: Source.h:484
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:84
ShapeSlotDefinition const & getShapeSlot() const
Definition: Source.h:664
std::shared_ptr< Footprint > getFootprint() const
Definition: Source.h:88
FluxSlotDefinition const & getCalibFluxSlot() const
Definition: Source.h:538
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
ndarray::Array< double, 1 > getApFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:789
SortedCatalogT< Record > Catalog
Definition: Source.h:216
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:276
FluxSlotDefinition::MeasKey getApFluxKey() const
Return the key used for the ApFlux slot measurement value.
Definition: Source.h:452
void definePsfFlux(std::string const &name)
Set the measurement used for the PsfFlux slot.
Definition: Source.h:295
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Definition: fits.h:298
std::string getCentroidDefinition() const
Return the name of the field used for the Centroid slot.
Definition: Source.h:623
An aggregate containing all of the current slots used in SourceTable.
Definition: slots.h:219
STL class.
std::string getApFluxDefinition() const
Return the name of the field used for the ApFlux slot.
Definition: Source.h:434
std::string getInstFluxDefinition() const
Return the name of the field used for the InstFlux slot.
Definition: Source.h:497
Table class that must contain a unique ID field and a celestial coordinate field. ...
Definition: Simple.h:91
bool hasModelFluxSlot() const
Return true if the ModelFlux slot corresponds to a valid field.
Definition: Source.h:380
Key< Flag > getCalibFluxFlagKey() const
Return the key used for the CalibFlux slot failure flag.
Definition: Source.h:596
A base class for image defects.
ndarray::Array< double, 1 > const getIxx() const
Definition: Source.h:828
Key< Flag > getInstFluxFlagKey() const
Return the key used for the InstFlux slot failure flag.
Definition: Source.h:533
Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID.
Definition: fwd.h:63
Key< Flag > getModelFluxFlagKey() const
Return the key used for the ModelFlux slot failure flag.
Definition: Source.h:407
std::shared_ptr< SourceTable const > getTable() const
Definition: Source.h:92
int contains(Schema const &other, int flags=EQUAL_KEYS) const
Test whether the given schema is a subset of this.
FluxSlotDefinition::ErrKey getModelFluxErrKey() const
Return the key used for the ModelFlux slot uncertainty.
Definition: Source.h:398
static SourceColumnViewT make(std::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
Definition: Source.h:840
FluxSlotDefinition::MeasKey getPsfFluxKey() const
Return the key used for the PsfFlux slot measurement value.
Definition: Source.h:326
ndarray::Array< double, 1 > getInstFluxErr() const
Get the uncertainty on the InstFlux slot measurement.
Definition: Source.h:807
CentroidSlotDefinition::MeasKey getCentroidKey() const
Return the key used for the Centroid slot measurement value.
Definition: Source.h:641
bool hasPsfFluxSlot() const
Return true if the PsfFlux slot corresponds to a valid field.
Definition: Source.h:317
ndarray::Array< double, 1 > getCalibFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:812
bool hasShapeSlot() const
Return true if the Shape slot corresponds to a valid field.
Definition: Source.h:695
FluxSlotDefinition::ErrKey getCalibFluxErrKey() const
Return the key used for the CalibFlux slot uncertainty.
Definition: Source.h:587
static Schema makeMinimalSchema()
Return a minimal schema for Source tables and records.
Definition: Source.h:250
SourceColumnViewT< SourceRecord > SourceColumnView
Definition: fwd.h:83
ndarray::Array< double, 1 > getInstFlux() const
Get the value of the InstFlux slot measurement.
Definition: Source.h:803
T static_pointer_cast(T... args)
SortedCatalogT< SourceRecord > Catalog
Definition: Source.h:85
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:281
std::string getPsfFluxDefinition() const
Return the name of the field used for the PsfFlux slot.
Definition: Source.h:308
FluxSlotDefinition::MeasKey getModelFluxKey() const
Return the key used for the ModelFlux slot measurement value.
Definition: Source.h:389
SortedCatalogT< Record const > ConstCatalog
Definition: Source.h:217
FluxSlotDefinition::MeasKey getInstFluxKey() const
Return the key used for the InstFlux slot measurement value.
Definition: Source.h:515
std::string getCalibFluxDefinition() const
Return the name of the field used for the CalibFlux slot.
Definition: Source.h:560
Class to describe the properties of a detected object from an image.
Definition: Footprint.h:63
void defineModelFlux(std::string const &name)
Set the measurement used for the ModelFlux slot.
Definition: Source.h:358
SourceFitsFlags
Bitflags to be passed to SourceCatalog::readFits and SourceCatalog::writeFits.
Definition: Source.h:55
Table class that contains measurements made on a single exposure.
Definition: Source.h:211
static std::shared_ptr< SourceTable > make(Schema const &schema)
Construct a new table.
Definition: Source.h:238
ndarray::Array< double, 1 > getApFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:785
FluxSlotDefinition::ErrKey getApFluxErrKey() const
Return the key used for the ApFlux slot uncertainty.
Definition: Source.h:461
Key< Flag > getCentroidFlagKey() const
Return the key used for the Centroid slot failure flag.
Definition: Source.h:659
CentroidSlotDefinition::ErrKey getCentroidErrKey() const
Return the key used for the Centroid slot uncertainty.
Definition: Source.h:650
Base class for all records.
Definition: BaseRecord.h:31
bool hasApFluxSlot() const
Return true if the ApFlux slot corresponds to a valid field.
Definition: Source.h:443
A class used as a handle to a particular field in a table.
Definition: fwd.h:45
FluxSlotDefinition::MeasKey getCalibFluxKey() const
Return the key used for the CalibFlux slot measurement value.
Definition: Source.h:578
Key specialization for Flag.
Definition: Flag.h:92
ndarray::Array< double, 1 > getModelFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:794
void setFootprint(std::shared_ptr< Footprint > const &footprint)
Definition: Source.h:90
Eigen::Matrix< float, 3, 3 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:170
SlotDefinition specialization for centroids.
Definition: slots.h:120
Read/write heavy footprints as non-heavy footprints.
Definition: Source.h:57
lsst::afw::detection::Footprint Footprint
Definition: Source.h:60
ndarray::Array< double, 1 > getCalibFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:816
ShapeSlotDefinition::MeasKey getShapeKey() const
Return the key used for the Shape slot measurement value.
Definition: Source.h:704
ndarray::Array< double, 1 > getPsfFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:776
Do not read/write footprints at all.
Definition: Source.h:56
Record class that contains measurements made on a single exposure.
Definition: Source.h:80
void defineShape(std::string const &name)
Set the measurement used for the Shape slot.
Definition: Source.h:673
static Key< RecordId > getParentKey()
Key for the parent ID.
Definition: Source.h:267
std::shared_ptr< SourceTable > clone() const
Return a polymorphic deep copy of the table.
Definition: Source.h:270
FluxSlotDefinition const & getPsfFluxSlot() const
Definition: Source.h:286
void defineCentroid(std::string const &name)
Set the measurement used for the Centroid slot.
Definition: Source.h:610
double ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:76
FluxSlotDefinition const & getModelFluxSlot() const
Definition: Source.h:349
Record class that must contain a unique ID field and a celestial coordinate field.
Definition: Simple.h:48
SlotDefinition specialization for shapes.
Definition: slots.h:167
CentroidSlotDefinition const & getCentroidSlot() const
Definition: Source.h:601
bool hasCalibFluxSlot() const
Return true if the CalibFlux slot corresponds to a valid field.
Definition: Source.h:569
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys...
Definition: aggregates.h:276
double MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:75
ShapeSlotDefinition::ErrKey getShapeErrKey() const
Return the key used for the Shape slot uncertainty.
Definition: Source.h:713
SlotDefinition specialization for fluxes.
Definition: slots.h:73
Key< Flag > getShapeFlagKey() const
Return the key used for the Shape slot failure flag.
Definition: Source.h:722
void defineApFlux(std::string const &name)
Set the measurement used for the ApFlux slot.
Definition: Source.h:421
bool hasInstFluxSlot() const
Return true if the InstFlux slot corresponds to a valid field.
Definition: Source.h:506
FluxSlotDefinition::ErrKey getInstFluxErrKey() const
Return the key used for the InstFlux slot uncertainty.
Definition: Source.h:524
std::string getShapeDefinition() const
Return the name of the field used for the Shape slot.
Definition: Source.h:686
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid SourceTable schema.
Definition: Source.h:262
std::string getModelFluxDefinition() const
Return the name of the field used for the ModelFlux slot.
Definition: Source.h:371
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:215
std::shared_ptr< SourceRecord > makeRecord()
Default-construct an associated record.
Definition: Source.h:273
Eigen::Matrix< float, 2, 2 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:123