lsst.afw  13.0-109-g62eb66483
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 image {
44 class Wcs;
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 
88  std::shared_ptr<Footprint> getFootprint() const { return _footprint; }
89 
90  void setFootprint(std::shared_ptr<Footprint> const & footprint) { _footprint = footprint; }
91 
92  std::shared_ptr<SourceTable const> getTable() const {
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(image::Wcs const & wcs);
183 
185  void updateCoord(image::Wcs const & wcs, PointKey<double> const & key);
186 
187 protected:
188 
189  explicit SourceRecord(std::shared_ptr<SourceTable> const & table);
190 
191  virtual void _assign(BaseRecord const & other);
192 
193 private:
194 
195  friend class SourceTable;
196 
197  std::shared_ptr<Footprint> _footprint;
198 };
199 
205 class SourceTable : public SimpleTable {
206 public:
207 
212 
223  static std::shared_ptr<SourceTable> make(Schema const & schema, std::shared_ptr<IdFactory> const & idFactory);
224 
232  static std::shared_ptr<SourceTable> make(Schema const & schema) { return make(schema, IdFactory::makeSimple()); }
233 
245  Schema r = getMinimalSchema().schema;
246  r.disconnectAliases();
247  return r;
248  }
249 
256  static bool checkSchema(Schema const & other) {
257  return other.contains(getMinimalSchema().schema);
258  }
259 
261  static Key<RecordId> getParentKey() { return getMinimalSchema().parent; }
262 
264  std::shared_ptr<SourceTable> clone() const { return std::static_pointer_cast<SourceTable>(_clone()); }
265 
267  std::shared_ptr<SourceRecord> makeRecord() { return std::static_pointer_cast<SourceRecord>(_makeRecord()); }
268 
270  std::shared_ptr<SourceRecord> copyRecord(BaseRecord const & other) {
271  return std::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other));
272  }
273 
275  std::shared_ptr<SourceRecord> copyRecord(BaseRecord const & other, SchemaMapper const & mapper) {
276  return std::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other, mapper));
277  }
278 
279 
280  FluxSlotDefinition const & getPsfFluxSlot() const { return _slots.defPsfFlux; }
281 
289  void definePsfFlux(std::string const & name) {
290  getSchema().getAliasMap()->set(getPsfFluxSlot().getAlias(), name);
291  }
292 
302  std::string getPsfFluxDefinition() const {
303  return getSchema().getAliasMap()->get(getPsfFluxSlot().getAlias());
304  }
305 
311  bool hasPsfFluxSlot() const {
312  return getPsfFluxSlot().isValid();
313  }
314 
321  return getPsfFluxSlot().getMeasKey();
322  }
323 
330  return getPsfFluxSlot().getErrKey();
331  }
332 
339  return getPsfFluxSlot().getFlagKey();
340  }
341 
342 
343  FluxSlotDefinition const & getModelFluxSlot() const { return _slots.defModelFlux; }
344 
352  void defineModelFlux(std::string const & name) {
353  getSchema().getAliasMap()->set(getModelFluxSlot().getAlias(), name);
354  }
355 
365  std::string getModelFluxDefinition() const {
366  return getSchema().getAliasMap()->get(getModelFluxSlot().getAlias());
367  }
368 
374  bool hasModelFluxSlot() const {
375  return getModelFluxSlot().isValid();
376  }
377 
384  return getModelFluxSlot().getMeasKey();
385  }
386 
393  return getModelFluxSlot().getErrKey();
394  }
395 
402  return getModelFluxSlot().getFlagKey();
403  }
404 
405 
406  FluxSlotDefinition const & getApFluxSlot() const { return _slots.defApFlux; }
407 
415  void defineApFlux(std::string const & name) {
416  getSchema().getAliasMap()->set(getApFluxSlot().getAlias(), name);
417  }
418 
428  std::string getApFluxDefinition() const {
429  return getSchema().getAliasMap()->get(getApFluxSlot().getAlias());
430  }
431 
437  bool hasApFluxSlot() const {
438  return getApFluxSlot().isValid();
439  }
440 
447  return getApFluxSlot().getMeasKey();
448  }
449 
456  return getApFluxSlot().getErrKey();
457  }
458 
465  return getApFluxSlot().getFlagKey();
466  }
467 
468 
469  FluxSlotDefinition const & getInstFluxSlot() const { return _slots.defInstFlux; }
470 
478  void defineInstFlux(std::string const & name) {
479  getSchema().getAliasMap()->set(getInstFluxSlot().getAlias(), name);
480  }
481 
491  std::string getInstFluxDefinition() const {
492  return getSchema().getAliasMap()->get(getInstFluxSlot().getAlias());
493  }
494 
500  bool hasInstFluxSlot() const {
501  return getInstFluxSlot().isValid();
502  }
503 
510  return getInstFluxSlot().getMeasKey();
511  }
512 
519  return getInstFluxSlot().getErrKey();
520  }
521 
528  return getInstFluxSlot().getFlagKey();
529  }
530 
531 
532  FluxSlotDefinition const & getCalibFluxSlot() const { return _slots.defCalibFlux; }
533 
541  void defineCalibFlux(std::string const & name) {
542  getSchema().getAliasMap()->set(getCalibFluxSlot().getAlias(), name);
543  }
544 
554  std::string getCalibFluxDefinition() const {
555  return getSchema().getAliasMap()->get(getCalibFluxSlot().getAlias());
556  }
557 
563  bool hasCalibFluxSlot() const {
564  return getCalibFluxSlot().isValid();
565  }
566 
573  return getCalibFluxSlot().getMeasKey();
574  }
575 
582  return getCalibFluxSlot().getErrKey();
583  }
584 
591  return getCalibFluxSlot().getFlagKey();
592  }
593 
594 
595  CentroidSlotDefinition const & getCentroidSlot() const { return _slots.defCentroid; }
596 
604  void defineCentroid(std::string const & name) {
605  getSchema().getAliasMap()->set(getCentroidSlot().getAlias(), name);
606  }
607 
617  std::string getCentroidDefinition() const {
618  return getSchema().getAliasMap()->get(getCentroidSlot().getAlias());
619  }
620 
626  bool hasCentroidSlot() const {
627  return getCentroidSlot().isValid();
628  }
629 
636  return getCentroidSlot().getMeasKey();
637  }
638 
645  return getCentroidSlot().getErrKey();
646  }
647 
654  return getCentroidSlot().getFlagKey();
655  }
656 
657 
658  ShapeSlotDefinition const & getShapeSlot() const { return _slots.defShape; }
659 
667  void defineShape(std::string const & name) {
668  getSchema().getAliasMap()->set(getShapeSlot().getAlias(), name);
669  }
670 
680  std::string getShapeDefinition() const {
681  return getSchema().getAliasMap()->get(getShapeSlot().getAlias());
682  }
683 
689  bool hasShapeSlot() const {
690  return getShapeSlot().isValid();
691  }
692 
699  return getShapeSlot().getMeasKey();
700  }
701 
708  return getShapeSlot().getErrKey();
709  }
710 
717  return getShapeSlot().getFlagKey();
718  }
719 
720 
721 protected:
722 
723  SourceTable(Schema const & schema, std::shared_ptr<IdFactory> const & idFactory);
724 
725  SourceTable(SourceTable const & other);
726 
727  void handleAliasChange(std::string const & alias) override;
728 
729  std::shared_ptr<BaseTable> _clone() const override;
730 
731  std::shared_ptr<BaseRecord> _makeRecord() override;
732 
733 private:
734 
735  // Struct that holds the minimal schema and the special keys we've added to it.
736  struct MinimalSchema {
737  Schema schema;
738  Key<RecordId> parent;
739 
740  MinimalSchema();
741  };
742 
743  // Return the singleton minimal schema.
744  static MinimalSchema & getMinimalSchema();
745 
746  friend class io::FitsWriter;
747  friend class SourceRecord;
748 
749  // Return a writer object that knows how to save in FITS format. See also FitsWriter.
750  std::shared_ptr<io::FitsWriter> makeFitsWriter(fits::Fits * fitsfile, int flags) const override;
751 
752  SlotSuite _slots;
753 };
754 
755 template <typename RecordT>
756 class SourceColumnViewT : public ColumnViewT<RecordT> {
757 public:
758 
759  typedef RecordT Record;
760  typedef typename RecordT::Table Table;
761 
762  // See the documentation for BaseColumnView for an explanation of why these
763  // accessors *appear* to violate const-correctness.
764 
766  ndarray::Array<double,1> getPsfFlux() const {
767  return this->operator[](this->getTable()->getPsfFluxSlot().getMeasKey());
768  }
770  ndarray::Array<double,1> getPsfFluxErr() const {
771  return this->operator[](this->getTable()->getPsfFluxSlot().getErrKey());
772  }
773 
775  ndarray::Array<double,1> getApFlux() const {
776  return this->operator[](this->getTable()->getApFluxSlot().getMeasKey());
777  }
779  ndarray::Array<double,1> getApFluxErr() const {
780  return this->operator[](this->getTable()->getApFluxSlot().getErrKey());
781  }
782 
784  ndarray::Array<double,1> getModelFlux() const {
785  return this->operator[](this->getTable()->getModelFluxSlot().getMeasKey());
786  }
788  ndarray::Array<double,1> getModelFluxErr() const {
789  return this->operator[](this->getTable()->getModelFluxSlot().getErrKey());
790  }
791 
793  ndarray::Array<double,1> getInstFlux() const {
794  return this->operator[](this->getTable()->getInstFluxSlot().getMeasKey());
795  }
797  ndarray::Array<double,1> getInstFluxErr() const {
798  return this->operator[](this->getTable()->getInstFluxSlot().getErrKey());
799  }
800 
802  ndarray::Array<double,1> getCalibFlux() const {
803  return this->operator[](this->getTable()->getCalibFluxSlot().getMeasKey());
804  }
806  ndarray::Array<double,1> getCalibFluxErr() const {
807  return this->operator[](this->getTable()->getCalibFluxSlot().getErrKey());
808  }
809 
810 
811  ndarray::Array<double,1> const getX() const {
812  return this->operator[](this->getTable()->getCentroidKey().getX());
813  }
814  ndarray::Array<double,1> const getY() const {
815  return this->operator[](this->getTable()->getCentroidKey().getY());
816  }
817 
818  ndarray::Array<double,1> const getIxx() const {
819  return this->operator[](this->getTable()->getShapeKey().getIxx());
820  }
821  ndarray::Array<double,1> const getIyy() const {
822  return this->operator[](this->getTable()->getShapeKey().getIyy());
823  }
824  ndarray::Array<double,1> const getIxy() const {
825  return this->operator[](this->getTable()->getShapeKey().getIxy());
826  }
827 
829  template <typename InputIterator>
830  static SourceColumnViewT make(std::shared_ptr<Table> const & table, InputIterator first, InputIterator last) {
831  return SourceColumnViewT(BaseColumnView::make(table, first, last));
832  }
833 
834 protected:
835  explicit SourceColumnViewT(BaseColumnView const & base) : ColumnViewT<RecordT>(base) {}
836 };
837 
839 
840 inline FluxSlotDefinition::MeasValue SourceRecord::getPsfFlux() const {
841  return this->get(getTable()->getPsfFluxSlot().getMeasKey());
842 }
843 
844 inline FluxSlotDefinition::ErrValue SourceRecord::getPsfFluxErr() const {
845  return this->get(getTable()->getPsfFluxSlot().getErrKey());
846 }
847 
848 inline bool SourceRecord::getPsfFluxFlag() const {
849  return this->get(getTable()->getPsfFluxSlot().getFlagKey());
850 }
851 
852 inline FluxSlotDefinition::MeasValue SourceRecord::getModelFlux() const {
853  return this->get(getTable()->getModelFluxSlot().getMeasKey());
854 }
855 
856 inline FluxSlotDefinition::ErrValue SourceRecord::getModelFluxErr() const {
857  return this->get(getTable()->getModelFluxSlot().getErrKey());
858 }
859 
860 inline bool SourceRecord::getModelFluxFlag() const {
861  return this->get(getTable()->getModelFluxSlot().getFlagKey());
862 }
863 
864 inline FluxSlotDefinition::MeasValue SourceRecord::getApFlux() const {
865  return this->get(getTable()->getApFluxSlot().getMeasKey());
866 }
867 
868 inline FluxSlotDefinition::ErrValue SourceRecord::getApFluxErr() const {
869  return this->get(getTable()->getApFluxSlot().getErrKey());
870 }
871 
872 inline bool SourceRecord::getApFluxFlag() const {
873  return this->get(getTable()->getApFluxSlot().getFlagKey());
874 }
875 
876 inline FluxSlotDefinition::MeasValue SourceRecord::getInstFlux() const {
877  return this->get(getTable()->getInstFluxSlot().getMeasKey());
878 }
879 
880 inline FluxSlotDefinition::ErrValue SourceRecord::getInstFluxErr() const {
881  return this->get(getTable()->getInstFluxSlot().getErrKey());
882 }
883 
884 inline bool SourceRecord::getInstFluxFlag() const {
885  return this->get(getTable()->getInstFluxSlot().getFlagKey());
886 }
887 
888 inline FluxSlotDefinition::MeasValue SourceRecord::getCalibFlux() const {
889  return this->get(getTable()->getCalibFluxSlot().getMeasKey());
890 }
891 
892 inline FluxSlotDefinition::ErrValue SourceRecord::getCalibFluxErr() const {
893  return this->get(getTable()->getCalibFluxSlot().getErrKey());
894 }
895 
896 inline bool SourceRecord::getCalibFluxFlag() const {
897  return this->get(getTable()->getCalibFluxSlot().getFlagKey());
898 }
899 
900 inline CentroidSlotDefinition::MeasValue SourceRecord::getCentroid() const {
901  return this->get(getTable()->getCentroidSlot().getMeasKey());
902 }
903 
904 inline CentroidSlotDefinition::ErrValue SourceRecord::getCentroidErr() const {
905  return this->get(getTable()->getCentroidSlot().getErrKey());
906 }
907 
908 inline bool SourceRecord::getCentroidFlag() const {
909  return this->get(getTable()->getCentroidSlot().getFlagKey());
910 }
911 
912 inline ShapeSlotDefinition::MeasValue SourceRecord::getShape() const {
913  return this->get(getTable()->getShapeSlot().getMeasKey());
914 }
915 
916 inline ShapeSlotDefinition::ErrValue SourceRecord::getShapeErr() const {
917  return this->get(getTable()->getShapeSlot().getErrKey());
918 }
919 
920 inline bool SourceRecord::getShapeFlag() const {
921  return this->get(getTable()->getShapeSlot().getFlagKey());
922 }
923 
924 
925 inline RecordId SourceRecord::getParent() const { return get(SourceTable::getParentKey()); }
926 inline void SourceRecord::setParent(RecordId id) { set(SourceTable::getParentKey(), id); }
927 inline double SourceRecord::getX() const {
928  return get(getTable()->getCentroidKey().getX());
929 }
930 inline double SourceRecord::getY() const {
931  return get(getTable()->getCentroidKey().getY());
932 }
933 inline double SourceRecord::getIxx() const {
934  return get(getTable()->getShapeKey().getIxx());
935 }
936 inline double SourceRecord::getIyy() const {
937  return get(getTable()->getShapeKey().getIyy());
938 }
939 inline double SourceRecord::getIxy() const {
940  return get(getTable()->getShapeKey().getIxy());
941 }
942 
943 }}} // namespace lsst::afw::table
944 
945 #endif // !AFW_TABLE_Source_h_INCLUDED
std::int64_t RecordId
Type used for unique IDs for records.
Definition: misc.h:22
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:626
Defines the fields and offsets for a table.
Definition: Schema.h:46
Key< Flag > getPsfFluxFlagKey() const
Return the key used for the PsfFlux slot failure flag.
Definition: Source.h:338
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:788
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:464
ndarray::Array< double, 1 > getPsfFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:770
FluxSlotDefinition const & getApFluxSlot() const
Definition: Source.h:406
ndarray::Array< double, 1 > const getX() const
Definition: Source.h:811
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:541
ndarray::Array< double, 1 > const getY() const
Definition: Source.h:814
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:824
SourceColumnViewT(BaseColumnView const &base)
Definition: Source.h:835
FluxSlotDefinition const & getInstFluxSlot() const
Definition: Source.h:469
ndarray::Array< double, 1 > const getIyy() const
Definition: Source.h:821
FluxSlotDefinition::ErrKey getPsfFluxErrKey() const
Return the key used for the PsfFlux slot uncertainty.
Definition: Source.h:329
void defineInstFlux(std::string const &name)
Set the measurement used for the InstFlux slot.
Definition: Source.h:478
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:84
ShapeSlotDefinition const & getShapeSlot() const
Definition: Source.h:658
std::shared_ptr< Footprint > getFootprint() const
Definition: Source.h:88
FluxSlotDefinition const & getCalibFluxSlot() const
Definition: Source.h:532
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:779
SortedCatalogT< Record > Catalog
Definition: Source.h:210
Implementation of the WCS standard for a any projection.
Definition: Wcs.h:104
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:270
FluxSlotDefinition::MeasKey getApFluxKey() const
Return the key used for the ApFlux slot measurement value.
Definition: Source.h:446
void definePsfFlux(std::string const &name)
Set the measurement used for the PsfFlux slot.
Definition: Source.h:289
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Definition: fits.h:279
std::string getCentroidDefinition() const
Return the name of the field used for the Centroid slot.
Definition: Source.h:617
An aggregate containing all of the current slots used in SourceTable.
Definition: slots.h:195
std::string getApFluxDefinition() const
Return the name of the field used for the ApFlux slot.
Definition: Source.h:428
std::string getInstFluxDefinition() const
Return the name of the field used for the InstFlux slot.
Definition: Source.h:491
Table class that must contain a unique ID field and a celestial coordinate field. ...
Definition: Simple.h:86
bool hasModelFluxSlot() const
Return true if the ModelFlux slot corresponds to a valid field.
Definition: Source.h:374
Key< Flag > getCalibFluxFlagKey() const
Return the key used for the CalibFlux slot failure flag.
Definition: Source.h:590
A base class for image defects.
Definition: cameraGeom.dox:3
ndarray::Array< double, 1 > const getIxx() const
Definition: Source.h:818
Key< Flag > getInstFluxFlagKey() const
Return the key used for the InstFlux slot failure flag.
Definition: Source.h:527
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:401
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:392
static SourceColumnViewT make(std::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
Definition: Source.h:830
FluxSlotDefinition::MeasKey getPsfFluxKey() const
Return the key used for the PsfFlux slot measurement value.
Definition: Source.h:320
ndarray::Array< double, 1 > getInstFluxErr() const
Get the uncertainty on the InstFlux slot measurement.
Definition: Source.h:797
CentroidSlotDefinition::MeasKey getCentroidKey() const
Return the key used for the Centroid slot measurement value.
Definition: Source.h:635
bool hasPsfFluxSlot() const
Return true if the PsfFlux slot corresponds to a valid field.
Definition: Source.h:311
ndarray::Array< double, 1 > getCalibFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:802
bool hasShapeSlot() const
Return true if the Shape slot corresponds to a valid field.
Definition: Source.h:689
FluxSlotDefinition::ErrKey getCalibFluxErrKey() const
Return the key used for the CalibFlux slot uncertainty.
Definition: Source.h:581
static Schema makeMinimalSchema()
Return a minimal schema for Source tables and records.
Definition: Source.h:244
SourceColumnViewT< SourceRecord > SourceColumnView
Definition: fwd.h:83
ndarray::Array< double, 1 > getInstFlux() const
Get the value of the InstFlux slot measurement.
Definition: Source.h:793
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:275
std::string getPsfFluxDefinition() const
Return the name of the field used for the PsfFlux slot.
Definition: Source.h:302
FluxSlotDefinition::MeasKey getModelFluxKey() const
Return the key used for the ModelFlux slot measurement value.
Definition: Source.h:383
SortedCatalogT< Record const > ConstCatalog
Definition: Source.h:211
FluxSlotDefinition::MeasKey getInstFluxKey() const
Return the key used for the InstFlux slot measurement value.
Definition: Source.h:509
std::string getCalibFluxDefinition() const
Return the name of the field used for the CalibFlux slot.
Definition: Source.h:554
Class to describe the properties of a detected object from an image.
Definition: Footprint.h:62
void defineModelFlux(std::string const &name)
Set the measurement used for the ModelFlux slot.
Definition: Source.h:352
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:205
static std::shared_ptr< SourceTable > make(Schema const &schema)
Construct a new table.
Definition: Source.h:232
ndarray::Array< double, 1 > getApFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:775
FluxSlotDefinition::ErrKey getApFluxErrKey() const
Return the key used for the ApFlux slot uncertainty.
Definition: Source.h:455
Key< Flag > getCentroidFlagKey() const
Return the key used for the Centroid slot failure flag.
Definition: Source.h:653
CentroidSlotDefinition::ErrKey getCentroidErrKey() const
Return the key used for the Centroid slot uncertainty.
Definition: Source.h:644
Base class for all records.
Definition: BaseRecord.h:29
bool hasApFluxSlot() const
Return true if the ApFlux slot corresponds to a valid field.
Definition: Source.h:437
FluxSlotDefinition::MeasKey getCalibFluxKey() const
Return the key used for the CalibFlux slot measurement value.
Definition: Source.h:572
Key specialization for Flag.
Definition: Flag.h:79
ndarray::Array< double, 1 > getModelFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:784
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:152
SlotDefinition specialization for centroids.
Definition: slots.h:108
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:806
ShapeSlotDefinition::MeasKey getShapeKey() const
Return the key used for the Shape slot measurement value.
Definition: Source.h:698
ndarray::Array< double, 1 > getPsfFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:766
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:667
static Key< RecordId > getParentKey()
Key for the parent ID.
Definition: Source.h:261
std::shared_ptr< SourceTable > clone() const
Return a polymorphic deep copy of the table.
Definition: Source.h:264
FluxSlotDefinition const & getPsfFluxSlot() const
Definition: Source.h:280
void defineCentroid(std::string const &name)
Set the measurement used for the Centroid slot.
Definition: Source.h:604
double ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:70
FluxSlotDefinition const & getModelFluxSlot() const
Definition: Source.h:343
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:149
CentroidSlotDefinition const & getCentroidSlot() const
Definition: Source.h:595
bool hasCalibFluxSlot() const
Return true if the CalibFlux slot corresponds to a valid field.
Definition: Source.h:563
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys...
Definition: aggregates.h:183
double MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:69
ShapeSlotDefinition::ErrKey getShapeErrKey() const
Return the key used for the Shape slot uncertainty.
Definition: Source.h:707
SlotDefinition specialization for fluxes.
Definition: slots.h:67
Key< Flag > getShapeFlagKey() const
Return the key used for the Shape slot failure flag.
Definition: Source.h:716
void defineApFlux(std::string const &name)
Set the measurement used for the ApFlux slot.
Definition: Source.h:415
bool hasInstFluxSlot() const
Return true if the InstFlux slot corresponds to a valid field.
Definition: Source.h:500
FluxSlotDefinition::ErrKey getInstFluxErrKey() const
Return the key used for the InstFlux slot uncertainty.
Definition: Source.h:518
std::string getShapeDefinition() const
Return the name of the field used for the Shape slot.
Definition: Source.h:680
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid SourceTable schema.
Definition: Source.h:256
std::string getModelFluxDefinition() const
Return the name of the field used for the ModelFlux slot.
Definition: Source.h:365
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:209
std::shared_ptr< SourceRecord > makeRecord()
Default-construct an associated record.
Definition: Source.h:267
Eigen::Matrix< float, 2, 2 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:111