LSSTApplications  11.0-13-gbb96280,12.1.rc1,12.1.rc1+1,12.1.rc1+2,12.1.rc1+5,12.1.rc1+8,12.1.rc1-1-g06d7636+1,12.1.rc1-1-g253890b+5,12.1.rc1-1-g3d31b68+7,12.1.rc1-1-g3db6b75+1,12.1.rc1-1-g5c1385a+3,12.1.rc1-1-g83b2247,12.1.rc1-1-g90cb4cf+6,12.1.rc1-1-g91da24b+3,12.1.rc1-2-g3521f8a,12.1.rc1-2-g39433dd+4,12.1.rc1-2-g486411b+2,12.1.rc1-2-g4c2be76,12.1.rc1-2-gc9c0491,12.1.rc1-2-gda2cd4f+6,12.1.rc1-3-g3391c73+2,12.1.rc1-3-g8c1bd6c+1,12.1.rc1-3-gcf4b6cb+2,12.1.rc1-4-g057223e+1,12.1.rc1-4-g19ed13b+2,12.1.rc1-4-g30492a7
LSSTDataManagementBasePackage
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  PTR(Footprint) getFootprint() const { return _footprint; }
89 
90  void setFootprint(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 
104 
107 
109  bool getPsfFluxFlag() const;
110 
113 
116 
118  bool getModelFluxFlag() const;
119 
122 
125 
127  bool getApFluxFlag() const;
128 
131 
134 
136  bool getInstFluxFlag() const;
137 
140 
143 
145  bool getCalibFluxFlag() const;
146 
149 
152 
154  bool getCentroidFlag() const;
155 
158 
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  SourceRecord(PTR(SourceTable) const & table);
190 
191  virtual void _assign(BaseRecord const & other);
192 
193 private:
195 };
196 
202 class SourceTable : public SimpleTable {
203 public:
204 
209 
220  static PTR(SourceTable) make(Schema const & schema, PTR(IdFactory) const & idFactory);
221 
229  static PTR(SourceTable) make(Schema const & schema) { return make(schema, IdFactory::makeSimple()); }
230 
242  Schema r = getMinimalSchema().schema;
243  r.disconnectAliases();
244  return r;
245  }
246 
253  static bool checkSchema(Schema const & other) {
254  return other.contains(getMinimalSchema().schema);
255  }
256 
258  static Key<RecordId> getParentKey() { return getMinimalSchema().parent; }
259 
261  PTR(SourceTable) clone() const { return std::static_pointer_cast<SourceTable>(_clone()); }
262 
264  PTR(SourceRecord) makeRecord() { return std::static_pointer_cast<SourceRecord>(_makeRecord()); }
265 
267  PTR(SourceRecord) copyRecord(BaseRecord const & other) {
268  return std::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other));
269  }
270 
272  PTR(SourceRecord) copyRecord(BaseRecord const & other, SchemaMapper const & mapper) {
273  return std::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other, mapper));
274  }
275 
276 
277  FluxSlotDefinition const & getPsfFluxSlot() const { return _slots.defPsfFlux; }
278 
286  void definePsfFlux(std::string const & name) {
287  getSchema().getAliasMap()->set(getPsfFluxSlot().getAlias(), name);
288  }
289 
300  std::string getPsfFluxDefinition() const {
301  return getSchema().getAliasMap()->get(getPsfFluxSlot().getAlias());
302  }
303 
309  bool hasPsfFluxSlot() const {
310  return getPsfFluxSlot().isValid();
311  }
312 
319  return getPsfFluxSlot().getMeasKey();
320  }
321 
328  return getPsfFluxSlot().getErrKey();
329  }
330 
337  return getPsfFluxSlot().getFlagKey();
338  }
339 
340 
341  FluxSlotDefinition const & getModelFluxSlot() const { return _slots.defModelFlux; }
342 
350  void defineModelFlux(std::string const & name) {
351  getSchema().getAliasMap()->set(getModelFluxSlot().getAlias(), name);
352  }
353 
364  std::string getModelFluxDefinition() const {
365  return getSchema().getAliasMap()->get(getModelFluxSlot().getAlias());
366  }
367 
373  bool hasModelFluxSlot() const {
374  return getModelFluxSlot().isValid();
375  }
376 
383  return getModelFluxSlot().getMeasKey();
384  }
385 
392  return getModelFluxSlot().getErrKey();
393  }
394 
401  return getModelFluxSlot().getFlagKey();
402  }
403 
404 
405  FluxSlotDefinition const & getApFluxSlot() const { return _slots.defApFlux; }
406 
414  void defineApFlux(std::string const & name) {
415  getSchema().getAliasMap()->set(getApFluxSlot().getAlias(), name);
416  }
417 
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 
492  std::string getInstFluxDefinition() const {
493  return getSchema().getAliasMap()->get(getInstFluxSlot().getAlias());
494  }
495 
501  bool hasInstFluxSlot() const {
502  return getInstFluxSlot().isValid();
503  }
504 
511  return getInstFluxSlot().getMeasKey();
512  }
513 
520  return getInstFluxSlot().getErrKey();
521  }
522 
529  return getInstFluxSlot().getFlagKey();
530  }
531 
532 
533  FluxSlotDefinition const & getCalibFluxSlot() const { return _slots.defCalibFlux; }
534 
542  void defineCalibFlux(std::string const & name) {
543  getSchema().getAliasMap()->set(getCalibFluxSlot().getAlias(), name);
544  }
545 
556  std::string getCalibFluxDefinition() const {
557  return getSchema().getAliasMap()->get(getCalibFluxSlot().getAlias());
558  }
559 
565  bool hasCalibFluxSlot() const {
566  return getCalibFluxSlot().isValid();
567  }
568 
575  return getCalibFluxSlot().getMeasKey();
576  }
577 
584  return getCalibFluxSlot().getErrKey();
585  }
586 
593  return getCalibFluxSlot().getFlagKey();
594  }
595 
596 
597  CentroidSlotDefinition const & getCentroidSlot() const { return _slots.defCentroid; }
598 
606  void defineCentroid(std::string const & name) {
607  getSchema().getAliasMap()->set(getCentroidSlot().getAlias(), name);
608  }
609 
620  std::string getCentroidDefinition() const {
621  return getSchema().getAliasMap()->get(getCentroidSlot().getAlias());
622  }
623 
629  bool hasCentroidSlot() const {
630  return getCentroidSlot().isValid();
631  }
632 
639  return getCentroidSlot().getMeasKey();
640  }
641 
648  return getCentroidSlot().getErrKey();
649  }
650 
657  return getCentroidSlot().getFlagKey();
658  }
659 
660 
661  ShapeSlotDefinition const & getShapeSlot() const { return _slots.defShape; }
662 
670  void defineShape(std::string const & name) {
671  getSchema().getAliasMap()->set(getShapeSlot().getAlias(), name);
672  }
673 
684  std::string getShapeDefinition() const {
685  return getSchema().getAliasMap()->get(getShapeSlot().getAlias());
686  }
687 
693  bool hasShapeSlot() const {
694  return getShapeSlot().isValid();
695  }
696 
703  return getShapeSlot().getMeasKey();
704  }
705 
712  return getShapeSlot().getErrKey();
713  }
714 
721  return getShapeSlot().getFlagKey();
722  }
723 
724 
725 protected:
726 
727  SourceTable(Schema const & schema, PTR(IdFactory) const & idFactory);
728 
729  SourceTable(SourceTable const & other);
730 
731  virtual void handleAliasChange(std::string const & alias);
732 
733 private:
734 
735  // Struct that holds the minimal schema and the special keys we've added to it.
736  struct MinimalSchema {
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  virtual PTR(io::FitsWriter) makeFitsWriter(fits::Fits * fitsfile, int flags) const;
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(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 
838 typedef SourceColumnViewT<SourceRecord> SourceColumnView;
839 
840 #ifndef SWIG
841 
843  return this->get(getTable()->getPsfFluxSlot().getMeasKey());
844 }
845 
847  return this->get(getTable()->getPsfFluxSlot().getErrKey());
848 }
849 
850 inline bool SourceRecord::getPsfFluxFlag() const {
851  return this->get(getTable()->getPsfFluxSlot().getFlagKey());
852 }
853 
855  return this->get(getTable()->getModelFluxSlot().getMeasKey());
856 }
857 
859  return this->get(getTable()->getModelFluxSlot().getErrKey());
860 }
861 
862 inline bool SourceRecord::getModelFluxFlag() const {
863  return this->get(getTable()->getModelFluxSlot().getFlagKey());
864 }
865 
867  return this->get(getTable()->getApFluxSlot().getMeasKey());
868 }
869 
871  return this->get(getTable()->getApFluxSlot().getErrKey());
872 }
873 
874 inline bool SourceRecord::getApFluxFlag() const {
875  return this->get(getTable()->getApFluxSlot().getFlagKey());
876 }
877 
879  return this->get(getTable()->getInstFluxSlot().getMeasKey());
880 }
881 
883  return this->get(getTable()->getInstFluxSlot().getErrKey());
884 }
885 
886 inline bool SourceRecord::getInstFluxFlag() const {
887  return this->get(getTable()->getInstFluxSlot().getFlagKey());
888 }
889 
891  return this->get(getTable()->getCalibFluxSlot().getMeasKey());
892 }
893 
895  return this->get(getTable()->getCalibFluxSlot().getErrKey());
896 }
897 
898 inline bool SourceRecord::getCalibFluxFlag() const {
899  return this->get(getTable()->getCalibFluxSlot().getFlagKey());
900 }
901 
903  return this->get(getTable()->getCentroidSlot().getMeasKey());
904 }
905 
907  return this->get(getTable()->getCentroidSlot().getErrKey());
908 }
909 
910 inline bool SourceRecord::getCentroidFlag() const {
911  return this->get(getTable()->getCentroidSlot().getFlagKey());
912 }
913 
915  return this->get(getTable()->getShapeSlot().getMeasKey());
916 }
917 
919  return this->get(getTable()->getShapeSlot().getErrKey());
920 }
921 
922 inline bool SourceRecord::getShapeFlag() const {
923  return this->get(getTable()->getShapeSlot().getFlagKey());
924 }
925 
926 
929 inline double SourceRecord::getX() const {
930  return get(getTable()->getCentroidKey().getX());
931 }
932 inline double SourceRecord::getY() const {
933  return get(getTable()->getCentroidKey().getY());
934 }
935 inline double SourceRecord::getIxx() const {
936  return get(getTable()->getShapeKey().getIxx());
937 }
938 inline double SourceRecord::getIyy() const {
939  return get(getTable()->getShapeKey().getIyy());
940 }
941 inline double SourceRecord::getIxy() const {
942  return get(getTable()->getShapeKey().getIxy());
943 }
944 
945 #endif // !SWIG
946 
947 }}} // namespace lsst::afw::table
948 
949 #endif // !AFW_TABLE_Source_h_INCLUDED
std::int64_t RecordId
Type used for unique IDs for records.
Definition: misc.h:20
FluxSlotDefinition::MeasValue getInstFlux() const
Get the value of the InstFlux slot measurement.
Definition: Source.h:878
An ellipse core with quadrupole moments as parameters.
Definition: Quadrupole.h:45
Defines the fields and offsets for a table.
Definition: Schema.h:44
boost::shared_ptr< BaseRecord > copyRecord(BaseRecord const &input)
Deep-copy a record, requiring that it have the same schema as this table.
FluxSlotDefinition::MeasKey getModelFluxKey() const
Return the key used for the ModelFlux slot measurement value.
Definition: Source.h:382
Key< Flag > getModelFluxFlagKey() const
Return the key used for the ModelFlux slot failure flag.
Definition: Source.h:400
std::string getInstFluxDefinition() const
Return the name of the field used for the InstFlux slot.
Definition: Source.h:492
Column-wise view into a sequence of records that have been allocated contiguously.
Writer object for FITS binary tables.
Definition: FitsWriter.h:22
bool hasApFluxSlot() const
Return true if the ApFlux slot corresponds to a valid field.
Definition: Source.h:437
Field< T >::Reference operator[](Key< T > const &key)
Return a reference (or reference-like type) to the field&#39;s value.
Definition: BaseRecord.h:110
FluxSlotDefinition const & getModelFluxSlot() const
Definition: Source.h:341
ndarray::Array< double, 1 > const getY() const
Definition: Source.h:814
Represent a set of pixels of an arbitrary shape and size.
table::Key< std::string > name
Definition: ApCorrMap.cc:71
ndarray::Array< double, 1 > getModelFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:784
ndarray::Array< double, 1 > getModelFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:788
SortedCatalogT< SourceRecord const > ConstCatalog
Definition: Source.h:86
ndarray::Array< double, 1 > getApFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:775
SourceRecord(boost::shared_ptr< SourceTable > const &table)
FluxSlotDefinition::MeasValue getCalibFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:890
ndarray::Array< double, 1 > getCalibFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:802
boost::shared_ptr< AliasMap > getAliasMap() const
Definition: Schema.h:254
void defineCalibFlux(std::string const &name)
Set the measurement used for the CalibFlux slot.
Definition: Source.h:542
std::string getShapeDefinition() const
Return the name of the field used for the Shape slot.
Definition: Source.h:684
afw::table::Schema schema
Definition: GaussianPsf.cc:41
A mapping between the keys of two Schemas, used to copy data between them.
Definition: SchemaMapper.h:19
SourceColumnViewT(BaseColumnView const &base)
Definition: Source.h:835
ndarray::Array< double, 1 > getPsfFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:770
double getY() const
Return the centroid slot y coordinate.
Definition: Source.h:932
bool getModelFluxFlag() const
Return true if the measurement in the ModelFlux slot failed.
Definition: Source.h:862
bool getPsfFluxFlag() const
Return true if the measurement in the PsfFlux slot failed.
Definition: Source.h:850
ndarray::Array< double, 1 > const getIxx() const
Definition: Source.h:818
FluxSlotDefinition::ErrKey getApFluxErrKey() const
Return the key used for the ApFlux slot uncertainty.
Definition: Source.h:455
ndarray::Array< double, 1 > getCalibFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:806
ndarray::Array< double, 1 > getInstFluxErr() const
Get the uncertainty on the InstFlux slot measurement.
Definition: Source.h:797
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
FluxSlotDefinition::ErrValue getModelFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:858
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
FluxSlotDefinition::ErrValue getPsfFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:846
tbl::Key< int > wcs
Key< Flag > getPsfFluxFlagKey() const
Return the key used for the PsfFlux slot failure flag.
Definition: Source.h:336
ShapeSlotDefinition::MeasValue getShape() const
Get the value of the Shape slot measurement.
Definition: Source.h:914
boost::shared_ptr< Footprint > getFootprint() const
Definition: Source.h:88
bool getCalibFluxFlag() const
Return true if the measurement in the CalibFlux slot failed.
Definition: Source.h:898
FluxSlotDefinition const & getCalibFluxSlot() const
Definition: Source.h:533
SortedCatalogT< Record > Catalog
Definition: Source.h:207
Implementation of the WCS standard for a any projection.
Definition: Wcs.h:107
CentroidSlotDefinition::ErrValue getCentroidErr() const
Get the uncertainty on the Centroid slot measurement.
Definition: Source.h:906
std::string getApFluxDefinition() const
Return the name of the field used for the ApFlux slot.
Definition: Source.h:428
bool getInstFluxFlag() const
Return true if the measurement in the InstFlux slot failed.
Definition: Source.h:886
static SourceColumnViewT make(boost::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
Definition: Source.h:830
static boost::shared_ptr< IdFactory > makeSimple()
Return a simple IdFactory that simply counts from 1.
void definePsfFlux(std::string const &name)
Set the measurement used for the PsfFlux slot.
Definition: Source.h:286
FluxSlotDefinition::MeasKey getInstFluxKey() const
Return the key used for the InstFlux slot measurement value.
Definition: Source.h:510
#define CONST_PTR(...)
Definition: base.h:47
FluxSlotDefinition::ErrValue getInstFluxErr() const
Get the uncertainty on the InstFlux slot measurement.
Definition: Source.h:882
ndarray::Array< double, 1 > getPsfFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:766
double getX() const
Return the centroid slot x coordinate.
Definition: Source.h:929
void setFootprint(boost::shared_ptr< Footprint > const &footprint)
Definition: Source.h:90
CentroidSlotDefinition::ErrKey getCentroidErrKey() const
Return the key used for the Centroid slot uncertainty.
Definition: Source.h:647
FluxSlotDefinition::ErrKey getModelFluxErrKey() const
Return the key used for the ModelFlux slot uncertainty.
Definition: Source.h:391
bool hasCentroidSlot() const
Return true if the Centroid slot corresponds to a valid field.
Definition: Source.h:629
Key< Flag > getCentroidFlagKey() const
Return the key used for the Centroid slot failure flag.
Definition: Source.h:656
std::map< Citizen const *, CitizenInfo > table
Definition: Citizen.h:90
table::Key< table::Array< Kernel::Pixel > > image
Definition: FixedKernel.cc:117
FluxSlotDefinition::ErrKey getCalibFluxErrKey() const
Return the key used for the CalibFlux slot uncertainty.
Definition: Source.h:583
CentroidSlotDefinition::MeasValue getCentroid() const
Get the value of the Centroid slot measurement.
Definition: Source.h:902
Table class that must contain a unique ID field and a celestial coordinate field. ...
Definition: Simple.h:85
boost::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
Definition: BaseRecord.h:60
ndarray::Array< double, 1 > const getIxy() const
Definition: Source.h:824
ShapeSlotDefinition::MeasKey getShapeKey() const
Return the key used for the Shape slot measurement value.
Definition: Source.h:702
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:55
ndarray::Array< double, 1 > const getX() const
Definition: Source.h:811
Key< Flag > getShapeFlagKey() const
Return the key used for the Shape slot failure flag.
Definition: Source.h:720
Key< Flag > getInstFluxFlagKey() const
Return the key used for the InstFlux slot failure flag.
Definition: Source.h:528
FluxSlotDefinition::MeasValue getModelFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:854
FluxSlotDefinition::ErrValue getCalibFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:894
ShapeSlotDefinition const & getShapeSlot() const
Definition: Source.h:661
FluxSlotDefinition::ErrKey getInstFluxErrKey() const
Return the key used for the InstFlux slot uncertainty.
Definition: Source.h:519
Eigen::Matrix< float, 3, 3 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:157
std::string getModelFluxDefinition() const
Return the name of the field used for the ModelFlux slot.
Definition: Source.h:364
FluxSlotDefinition::MeasKey getCalibFluxKey() const
Return the key used for the CalibFlux slot measurement value.
Definition: Source.h:574
static Schema makeMinimalSchema()
Return a minimal schema for Source tables and records.
Definition: Source.h:241
FluxSlotDefinition::MeasKey getApFluxKey() const
Return the key used for the ApFlux slot measurement value.
Definition: Source.h:446
static BaseColumnView make(boost::shared_ptr< BaseTable > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
SourceColumnViewT< SourceRecord > SourceColumnView
Definition: fwd.h:73
FluxSlotDefinition const & getApFluxSlot() const
Definition: Source.h:405
SortedCatalogT< SourceRecord > Catalog
Definition: Source.h:85
Key< Flag > getApFluxFlagKey() const
Return the key used for the ApFlux slot failure flag.
Definition: Source.h:464
SortedCatalogT< Record const > ConstCatalog
Definition: Source.h:208
A set of pixels in an Image.
Definition: Footprint.h:62
bool hasInstFluxSlot() const
Return true if the InstFlux slot corresponds to a valid field.
Definition: Source.h:501
bool hasShapeSlot() const
Return true if the Shape slot corresponds to a valid field.
Definition: Source.h:693
A polymorphic functor base class for generating record IDs for a table.
Definition: IdFactory.h:19
RecordId getParent() const
Convenience accessors for the keys in the minimal source schema.
Definition: Source.h:927
Key< Flag > getCalibFluxFlagKey() const
Return the key used for the CalibFlux slot failure flag.
Definition: Source.h:592
ndarray::Array< double, 1 > getApFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:779
void defineModelFlux(std::string const &name)
Set the measurement used for the ModelFlux slot.
Definition: Source.h:350
SourceFitsFlags
Bitflags to be passed to SourceCatalog::readFits and SourceCatalog::writeFits.
Definition: Source.h:55
static boost::shared_ptr< SourceTable > make(Schema const &schema)
Construct a new table.
Definition: Source.h:229
Table class that contains measurements made on a single exposure.
Definition: Source.h:202
boost::shared_ptr< Footprint > _footprint
Definition: Source.h:194
ShapeSlotDefinition::ErrKey getShapeErrKey() const
Return the key used for the Shape slot uncertainty.
Definition: Source.h:711
boost::shared_ptr< SourceTable const > getTable() const
Definition: Source.h:92
bool hasModelFluxSlot() const
Return true if the ModelFlux slot corresponds to a valid field.
Definition: Source.h:373
Base class for all records.
Definition: BaseRecord.h:27
int contains(Schema const &other, int flags=EQUAL_KEYS) const
Test whether the given schema is a subset of this.
CentroidSlotDefinition::MeasKey getCentroidKey() const
Return the key used for the Centroid slot measurement value.
Definition: Source.h:638
void updateCoord(image::Wcs const &wcs)
Update the coord field using the given Wcs and the field in the centroid slot.
Key specialization for Flag.
Definition: Flag.h:84
FluxSlotDefinition::MeasKey getPsfFluxKey() const
Return the key used for the PsfFlux slot measurement value.
Definition: Source.h:318
FluxSlotDefinition::MeasValue getPsfFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:842
SlotDefinition specialization for centroids.
Definition: slots.h:111
Read/write heavy footprints as non-heavy footprints.
Definition: Source.h:57
lsst::afw::detection::Footprint Footprint
Definition: Source.h:60
double getIxy() const
Return the shape slot Ixy value.
Definition: Source.h:941
FluxSlotDefinition const & getPsfFluxSlot() const
Definition: Source.h:277
#define PTR(...)
Definition: base.h:41
bool hasPsfFluxSlot() const
Return true if the PsfFlux slot corresponds to a valid field.
Definition: Source.h:309
Eigen::Matrix< float, 2, 2 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:115
bool getCentroidFlag() const
Return true if the measurement in the Centroid slot failed.
Definition: Source.h:910
bool getApFluxFlag() const
Return true if the measurement in the ApFlux slot failed.
Definition: Source.h:874
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Definition: BaseRecord.h:145
std::string getPsfFluxDefinition() const
Return the name of the field used for the PsfFlux slot.
Definition: Source.h:300
void setParent(RecordId id)
Convenience accessors for the keys in the minimal source schema.
Definition: Source.h:928
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:670
static Key< RecordId > getParentKey()
Key for the parent ID.
Definition: Source.h:258
FluxSlotDefinition const & getInstFluxSlot() const
Definition: Source.h:469
ShapeSlotDefinition::ErrValue getShapeErr() const
Get the uncertainty on the Shape slot measurement.
Definition: Source.h:918
void defineCentroid(std::string const &name)
Set the measurement used for the Centroid slot.
Definition: Source.h:606
double ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:73
double getIyy() const
Return the shape slot Iyy value.
Definition: Source.h:938
Record class that must contain a unique ID field and a celestial coordinate field.
Definition: Simple.h:46
virtual void _assign(BaseRecord const &other)
Called by assign() after transferring fields to allow subclass data members to be copied...
FluxSlotDefinition::ErrKey getPsfFluxErrKey() const
Return the key used for the PsfFlux slot uncertainty.
Definition: Source.h:327
SlotDefinition specialization for shapes.
Definition: slots.h:153
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys...
Definition: aggregates.h:188
double MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:72
std::string getCalibFluxDefinition() const
Return the name of the field used for the CalibFlux slot.
Definition: Source.h:556
SlotDefinition specialization for fluxes.
Definition: slots.h:69
ndarray::Array< double, 1 > getInstFlux() const
Get the value of the InstFlux slot measurement.
Definition: Source.h:793
CentroidSlotDefinition const & getCentroidSlot() const
Definition: Source.h:597
void defineApFlux(std::string const &name)
Set the measurement used for the ApFlux slot.
Definition: Source.h:414
Schema getSchema() const
Return the Schema that holds this record&#39;s fields and keys.
Definition: BaseRecord.h:57
FluxSlotDefinition::ErrValue getApFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:870
bool getShapeFlag() const
Return true if the measurement in the Shape slot failed.
Definition: Source.h:922
bool hasCalibFluxSlot() const
Return true if the CalibFlux slot corresponds to a valid field.
Definition: Source.h:565
FluxSlotDefinition::MeasValue getApFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:866
double getIxx() const
Return the shape slot Ixx value.
Definition: Source.h:935
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid SourceTable schema.
Definition: Source.h:253
std::string getCentroidDefinition() const
Return the name of the field used for the Centroid slot.
Definition: Source.h:620
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:206
ndarray::Array< double, 1 > const getIyy() const
Definition: Source.h:821