LSSTApplications  10.0+286,10.0+36,10.0+46,10.0-2-g4f67435,10.1+152,10.1+37,11.0,11.0+1,11.0-1-g47edd16,11.0-1-g60db491,11.0-1-g7418c06,11.0-2-g04d2804,11.0-2-g68503cd,11.0-2-g818369d,11.0-2-gb8b8ce7
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 
32 #include "lsst/utils/ieee.h"
34 #include "lsst/afw/table/Simple.h"
37 #include "lsst/afw/table/Catalog.h"
39 #include "lsst/afw/table/slots.h"
41 
42 namespace lsst { namespace afw {
43 
44 namespace image {
45 class Wcs;
46 } // namespace image
47 
48 namespace table {
49 
59 };
60 
62 
63 class SourceRecord;
64 class SourceTable;
65 
66 template <typename RecordT> class SourceColumnViewT;
67 
81 class SourceRecord : public SimpleRecord {
82 public:
83 
84  typedef SourceTable Table;
88 
89  PTR(Footprint) getFootprint() const { return _footprint; }
90 
91  void setFootprint(PTR(Footprint) const & footprint) { _footprint = footprint; }
92 
94  return boost::static_pointer_cast<SourceTable const>(BaseRecord::getTable());
95  }
96 
98  RecordId getParent() const;
100  void setParent(RecordId id);
102 
105 
108 
110  bool getPsfFluxFlag() const;
111 
114 
117 
119  bool getModelFluxFlag() const;
120 
123 
126 
128  bool getApFluxFlag() const;
129 
132 
135 
137  bool getInstFluxFlag() const;
138 
141 
144 
146  bool getCalibFluxFlag() const;
147 
150 
153 
155  bool getCentroidFlag() const;
156 
159 
162 
164  bool getShapeFlag() const;
165 
166 
168  double getX() const;
169 
171  double getY() const;
172 
174  double getIxx() const;
175 
177  double getIyy() const;
178 
180  double getIxy() const;
181 
183  void updateCoord(image::Wcs const & wcs);
184 
186  void updateCoord(image::Wcs const & wcs, PointKey<double> const & key);
187 
188 protected:
189 
190  SourceRecord(PTR(SourceTable) const & table);
191 
192  virtual void _assign(BaseRecord const & other);
193 
194 private:
196 };
197 
203 class SourceTable : public SimpleTable {
204 public:
205 
210 
221  static PTR(SourceTable) make(Schema const & schema, PTR(IdFactory) const & idFactory);
222 
230  static PTR(SourceTable) make(Schema const & schema) { return make(schema, IdFactory::makeSimple()); }
231 
243  Schema r = getMinimalSchema().schema;
244  r.disconnectAliases();
245  return r;
246  }
247 
254  static bool checkSchema(Schema const & other) {
255  return other.contains(getMinimalSchema().schema);
256  }
257 
259  static Key<RecordId> getParentKey() { return getMinimalSchema().parent; }
260 
262  PTR(SourceTable) clone() const { return boost::static_pointer_cast<SourceTable>(_clone()); }
263 
265  PTR(SourceRecord) makeRecord() { return boost::static_pointer_cast<SourceRecord>(_makeRecord()); }
266 
268  PTR(SourceRecord) copyRecord(BaseRecord const & other) {
269  return boost::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other));
270  }
271 
273  PTR(SourceRecord) copyRecord(BaseRecord const & other, SchemaMapper const & mapper) {
274  return boost::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other, mapper));
275  }
276 
277 
278  FluxSlotDefinition const & getPsfFluxSlot() const { return _slots.defPsfFlux; }
279 
287  void definePsfFlux(std::string const & name) {
288  getSchema().getAliasMap()->set(getPsfFluxSlot().getAlias(), name);
289  }
290 
301  std::string getPsfFluxDefinition() const {
302  return getSchema().getAliasMap()->get(getPsfFluxSlot().getAlias());
303  }
304 
310  bool hasPsfFluxSlot() const {
311  return getPsfFluxSlot().isValid();
312  }
313 
320  return getPsfFluxSlot().getMeasKey();
321  }
322 
329  return getPsfFluxSlot().getErrKey();
330  }
331 
338  return getPsfFluxSlot().getFlagKey();
339  }
340 
341 
342  FluxSlotDefinition const & getModelFluxSlot() const { return _slots.defModelFlux; }
343 
351  void defineModelFlux(std::string const & name) {
352  getSchema().getAliasMap()->set(getModelFluxSlot().getAlias(), name);
353  }
354 
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 
429  std::string getApFluxDefinition() const {
430  return getSchema().getAliasMap()->get(getApFluxSlot().getAlias());
431  }
432 
438  bool hasApFluxSlot() const {
439  return getApFluxSlot().isValid();
440  }
441 
448  return getApFluxSlot().getMeasKey();
449  }
450 
457  return getApFluxSlot().getErrKey();
458  }
459 
466  return getApFluxSlot().getFlagKey();
467  }
468 
469 
470  FluxSlotDefinition const & getInstFluxSlot() const { return _slots.defInstFlux; }
471 
479  void defineInstFlux(std::string const & name) {
480  getSchema().getAliasMap()->set(getInstFluxSlot().getAlias(), name);
481  }
482 
493  std::string getInstFluxDefinition() const {
494  return getSchema().getAliasMap()->get(getInstFluxSlot().getAlias());
495  }
496 
502  bool hasInstFluxSlot() const {
503  return getInstFluxSlot().isValid();
504  }
505 
512  return getInstFluxSlot().getMeasKey();
513  }
514 
521  return getInstFluxSlot().getErrKey();
522  }
523 
530  return getInstFluxSlot().getFlagKey();
531  }
532 
533 
534  FluxSlotDefinition const & getCalibFluxSlot() const { return _slots.defCalibFlux; }
535 
543  void defineCalibFlux(std::string const & name) {
544  getSchema().getAliasMap()->set(getCalibFluxSlot().getAlias(), name);
545  }
546 
557  std::string getCalibFluxDefinition() const {
558  return getSchema().getAliasMap()->get(getCalibFluxSlot().getAlias());
559  }
560 
566  bool hasCalibFluxSlot() const {
567  return getCalibFluxSlot().isValid();
568  }
569 
576  return getCalibFluxSlot().getMeasKey();
577  }
578 
585  return getCalibFluxSlot().getErrKey();
586  }
587 
594  return getCalibFluxSlot().getFlagKey();
595  }
596 
597 
598  CentroidSlotDefinition const & getCentroidSlot() const { return _slots.defCentroid; }
599 
607  void defineCentroid(std::string const & name) {
608  getSchema().getAliasMap()->set(getCentroidSlot().getAlias(), name);
609  }
610 
621  std::string getCentroidDefinition() const {
622  return getSchema().getAliasMap()->get(getCentroidSlot().getAlias());
623  }
624 
630  bool hasCentroidSlot() const {
631  return getCentroidSlot().isValid();
632  }
633 
640  return getCentroidSlot().getMeasKey();
641  }
642 
649  return getCentroidSlot().getErrKey();
650  }
651 
658  return getCentroidSlot().getFlagKey();
659  }
660 
661 
662  ShapeSlotDefinition const & getShapeSlot() const { return _slots.defShape; }
663 
671  void defineShape(std::string const & name) {
672  getSchema().getAliasMap()->set(getShapeSlot().getAlias(), name);
673  }
674 
685  std::string getShapeDefinition() const {
686  return getSchema().getAliasMap()->get(getShapeSlot().getAlias());
687  }
688 
694  bool hasShapeSlot() const {
695  return getShapeSlot().isValid();
696  }
697 
704  return getShapeSlot().getMeasKey();
705  }
706 
713  return getShapeSlot().getErrKey();
714  }
715 
722  return getShapeSlot().getFlagKey();
723  }
724 
725 
726 protected:
727 
728  SourceTable(Schema const & schema, PTR(IdFactory) const & idFactory);
729 
730  SourceTable(SourceTable const & other);
731 
732  virtual void handleAliasChange(std::string const & alias);
733 
734 private:
735 
736  // Struct that holds the minimal schema and the special keys we've added to it.
737  struct MinimalSchema {
740 
741  MinimalSchema();
742  };
743 
744  // Return the singleton minimal schema.
745  static MinimalSchema & getMinimalSchema();
746 
747  friend class io::FitsWriter;
748  friend class SourceRecord;
749 
750  // Return a writer object that knows how to save in FITS format. See also FitsWriter.
751  virtual PTR(io::FitsWriter) makeFitsWriter(fits::Fits * fitsfile, int flags) const;
752 
753  SlotSuite _slots;
754 };
755 
756 template <typename RecordT>
757 class SourceColumnViewT : public ColumnViewT<RecordT> {
758 public:
759 
760  typedef RecordT Record;
761  typedef typename RecordT::Table Table;
762 
763  // See the documentation for BaseColumnView for an explanation of why these
764  // accessors *appear* to violate const-correctness.
765 
768  return this->operator[](this->getTable()->getPsfFluxSlot().getMeasKey());
769  }
772  return this->operator[](this->getTable()->getPsfFluxSlot().getErrKey());
773  }
774 
777  return this->operator[](this->getTable()->getApFluxSlot().getMeasKey());
778  }
781  return this->operator[](this->getTable()->getApFluxSlot().getErrKey());
782  }
783 
786  return this->operator[](this->getTable()->getModelFluxSlot().getMeasKey());
787  }
790  return this->operator[](this->getTable()->getModelFluxSlot().getErrKey());
791  }
792 
795  return this->operator[](this->getTable()->getInstFluxSlot().getMeasKey());
796  }
799  return this->operator[](this->getTable()->getInstFluxSlot().getErrKey());
800  }
801 
804  return this->operator[](this->getTable()->getCalibFluxSlot().getMeasKey());
805  }
808  return this->operator[](this->getTable()->getCalibFluxSlot().getErrKey());
809  }
810 
811 
813  return this->operator[](this->getTable()->getCentroidKey().getX());
814  }
816  return this->operator[](this->getTable()->getCentroidKey().getY());
817  }
818 
820  return this->operator[](this->getTable()->getShapeKey().getIxx());
821  }
823  return this->operator[](this->getTable()->getShapeKey().getIyy());
824  }
826  return this->operator[](this->getTable()->getShapeKey().getIxy());
827  }
828 
830  template <typename InputIterator>
831  static SourceColumnViewT make(PTR(Table) const & table, InputIterator first, InputIterator last) {
832  return SourceColumnViewT(BaseColumnView::make(table, first, last));
833  }
834 
835 protected:
836  explicit SourceColumnViewT(BaseColumnView const & base) : ColumnViewT<RecordT>(base) {}
837 };
838 
839 typedef SourceColumnViewT<SourceRecord> SourceColumnView;
840 
841 #ifndef SWIG
842 
844  return this->get(getTable()->getPsfFluxSlot().getMeasKey());
845 }
846 
848  return this->get(getTable()->getPsfFluxSlot().getErrKey());
849 }
850 
851 inline bool SourceRecord::getPsfFluxFlag() const {
852  return this->get(getTable()->getPsfFluxSlot().getFlagKey());
853 }
854 
856  return this->get(getTable()->getModelFluxSlot().getMeasKey());
857 }
858 
860  return this->get(getTable()->getModelFluxSlot().getErrKey());
861 }
862 
863 inline bool SourceRecord::getModelFluxFlag() const {
864  return this->get(getTable()->getModelFluxSlot().getFlagKey());
865 }
866 
868  return this->get(getTable()->getApFluxSlot().getMeasKey());
869 }
870 
872  return this->get(getTable()->getApFluxSlot().getErrKey());
873 }
874 
875 inline bool SourceRecord::getApFluxFlag() const {
876  return this->get(getTable()->getApFluxSlot().getFlagKey());
877 }
878 
880  return this->get(getTable()->getInstFluxSlot().getMeasKey());
881 }
882 
884  return this->get(getTable()->getInstFluxSlot().getErrKey());
885 }
886 
887 inline bool SourceRecord::getInstFluxFlag() const {
888  return this->get(getTable()->getInstFluxSlot().getFlagKey());
889 }
890 
892  return this->get(getTable()->getCalibFluxSlot().getMeasKey());
893 }
894 
896  return this->get(getTable()->getCalibFluxSlot().getErrKey());
897 }
898 
899 inline bool SourceRecord::getCalibFluxFlag() const {
900  return this->get(getTable()->getCalibFluxSlot().getFlagKey());
901 }
902 
904  return this->get(getTable()->getCentroidSlot().getMeasKey());
905 }
906 
908  return this->get(getTable()->getCentroidSlot().getErrKey());
909 }
910 
911 inline bool SourceRecord::getCentroidFlag() const {
912  return this->get(getTable()->getCentroidSlot().getFlagKey());
913 }
914 
916  return this->get(getTable()->getShapeSlot().getMeasKey());
917 }
918 
920  return this->get(getTable()->getShapeSlot().getErrKey());
921 }
922 
923 inline bool SourceRecord::getShapeFlag() const {
924  return this->get(getTable()->getShapeSlot().getFlagKey());
925 }
926 
927 
930 inline double SourceRecord::getX() const {
931  return get(getTable()->getCentroidKey().getX());
932 }
933 inline double SourceRecord::getY() const {
934  return get(getTable()->getCentroidKey().getY());
935 }
936 inline double SourceRecord::getIxx() const {
937  return get(getTable()->getShapeKey().getIxx());
938 }
939 inline double SourceRecord::getIyy() const {
940  return get(getTable()->getShapeKey().getIyy());
941 }
942 inline double SourceRecord::getIxy() const {
943  return get(getTable()->getShapeKey().getIxy());
944 }
945 
946 #endif // !SWIG
947 
948 }}} // namespace lsst::afw::table
949 
950 #endif // !AFW_TABLE_Source_h_INCLUDED
FluxSlotDefinition::MeasValue getInstFlux() const
Get the value of the InstFlux slot measurement.
Definition: Source.h:879
An ellipse core with quadrupole moments as parameters.
Definition: Quadrupole.h:45
Defines the fields and offsets for a table.
Definition: Schema.h:46
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:383
Key< Flag > getModelFluxFlagKey() const
Return the key used for the ModelFlux slot failure flag.
Definition: Source.h:401
std::string getInstFluxDefinition() const
Return the name of the field used for the InstFlux slot.
Definition: Source.h:493
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:438
Field< T >::Reference operator[](Key< T > const &key)
Return a reference (or reference-like type) to the field&#39;s value.
Definition: BaseRecord.h:101
FluxSlotDefinition const & getModelFluxSlot() const
Definition: Source.h:342
ndarray::Array< double, 1 > const getY() const
Definition: Source.h:815
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:785
ndarray::Array< double, 1 > getModelFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:789
SortedCatalogT< SourceRecord const > ConstCatalog
Definition: Source.h:87
ndarray::Array< double, 1 > getApFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:776
SourceRecord(boost::shared_ptr< SourceTable > const &table)
FluxSlotDefinition::MeasValue getCalibFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:891
ndarray::Array< double, 1 > getCalibFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:803
boost::shared_ptr< AliasMap > getAliasMap() const
Definition: Schema.h:258
void defineCalibFlux(std::string const &name)
Set the measurement used for the CalibFlux slot.
Definition: Source.h:543
std::string getShapeDefinition() const
Return the name of the field used for the Shape slot.
Definition: Source.h:685
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:836
ndarray::Array< double, 1 > getPsfFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:771
double getY() const
Return the centroid slot y coordinate.
Definition: Source.h:933
bool getModelFluxFlag() const
Return true if the measurement in the ModelFlux slot failed.
Definition: Source.h:863
bool getPsfFluxFlag() const
Return true if the measurement in the PsfFlux slot failed.
Definition: Source.h:851
ndarray::Array< double, 1 > const getIxx() const
Definition: Source.h:819
FluxSlotDefinition::ErrKey getApFluxErrKey() const
Return the key used for the ApFlux slot uncertainty.
Definition: Source.h:456
ndarray::Array< double, 1 > getCalibFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:807
ndarray::Array< double, 1 > getInstFluxErr() const
Get the uncertainty on the InstFlux slot measurement.
Definition: Source.h:798
void defineInstFlux(std::string const &name)
Set the measurement used for the InstFlux slot.
Definition: Source.h:479
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:85
FluxSlotDefinition::ErrValue getModelFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:859
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
#define PTR(...)
Definition: base.h:41
FluxSlotDefinition::ErrValue getPsfFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:847
tbl::Key< int > wcs
Key< Flag > getPsfFluxFlagKey() const
Return the key used for the PsfFlux slot failure flag.
Definition: Source.h:337
ShapeSlotDefinition::MeasValue getShape() const
Get the value of the Shape slot measurement.
Definition: Source.h:915
boost::shared_ptr< Footprint > getFootprint() const
Definition: Source.h:89
bool getCalibFluxFlag() const
Return true if the measurement in the CalibFlux slot failed.
Definition: Source.h:899
FluxSlotDefinition const & getCalibFluxSlot() const
Definition: Source.h:534
SortedCatalogT< Record > Catalog
Definition: Source.h:208
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:907
std::string getApFluxDefinition() const
Return the name of the field used for the ApFlux slot.
Definition: Source.h:429
bool getInstFluxFlag() const
Return true if the measurement in the InstFlux slot failed.
Definition: Source.h:887
static SourceColumnViewT make(boost::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
Definition: Source.h:831
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:287
FluxSlotDefinition::MeasKey getInstFluxKey() const
Return the key used for the InstFlux slot measurement value.
Definition: Source.h:511
FluxSlotDefinition::ErrValue getInstFluxErr() const
Get the uncertainty on the InstFlux slot measurement.
Definition: Source.h:883
ndarray::Array< double, 1 > getPsfFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:767
double getX() const
Return the centroid slot x coordinate.
Definition: Source.h:930
void setFootprint(boost::shared_ptr< Footprint > const &footprint)
Definition: Source.h:91
CentroidSlotDefinition::ErrKey getCentroidErrKey() const
Return the key used for the Centroid slot uncertainty.
Definition: Source.h:648
FluxSlotDefinition::ErrKey getModelFluxErrKey() const
Return the key used for the ModelFlux slot uncertainty.
Definition: Source.h:392
bool hasCentroidSlot() const
Return true if the Centroid slot corresponds to a valid field.
Definition: Source.h:630
Key< Flag > getCentroidFlagKey() const
Return the key used for the Centroid slot failure flag.
Definition: Source.h:657
std::map< Citizen const *, CitizenInfo > table
Definition: Citizen.h:93
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:584
CentroidSlotDefinition::MeasValue getCentroid() const
Get the value of the Centroid slot measurement.
Definition: Source.h:903
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:51
ndarray::Array< double, 1 > const getIxy() const
Definition: Source.h:825
ShapeSlotDefinition::MeasKey getShapeKey() const
Return the key used for the Shape slot measurement value.
Definition: Source.h:703
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:812
Key< Flag > getShapeFlagKey() const
Return the key used for the Shape slot failure flag.
Definition: Source.h:721
Key< Flag > getInstFluxFlagKey() const
Return the key used for the InstFlux slot failure flag.
Definition: Source.h:529
FluxSlotDefinition::MeasValue getModelFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:855
FluxSlotDefinition::ErrValue getCalibFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:895
ShapeSlotDefinition const & getShapeSlot() const
Definition: Source.h:662
FluxSlotDefinition::ErrKey getInstFluxErrKey() const
Return the key used for the InstFlux slot uncertainty.
Definition: Source.h:520
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:365
FluxSlotDefinition::MeasKey getCalibFluxKey() const
Return the key used for the CalibFlux slot measurement value.
Definition: Source.h:575
static Schema makeMinimalSchema()
Return a minimal schema for Source tables and records.
Definition: Source.h:242
FluxSlotDefinition::MeasKey getApFluxKey() const
Return the key used for the ApFlux slot measurement value.
Definition: Source.h:447
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:406
SortedCatalogT< SourceRecord > Catalog
Definition: Source.h:86
Key< Flag > getApFluxFlagKey() const
Return the key used for the ApFlux slot failure flag.
Definition: Source.h:465
SortedCatalogT< Record const > ConstCatalog
Definition: Source.h:209
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:502
bool hasShapeSlot() const
Return true if the Shape slot corresponds to a valid field.
Definition: Source.h:694
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:928
Key< Flag > getCalibFluxFlagKey() const
Return the key used for the CalibFlux slot failure flag.
Definition: Source.h:593
ndarray::Array< double, 1 > getApFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:780
void defineModelFlux(std::string const &name)
Set the measurement used for the ModelFlux slot.
Definition: Source.h:351
SourceFitsFlags
Bitflags to be passed to SourceCatalog::readFits and SourceCatalog::writeFits.
Definition: Source.h:56
static boost::shared_ptr< SourceTable > make(Schema const &schema)
Construct a new table.
Definition: Source.h:230
Table class that contains measurements made on a single exposure.
Definition: Source.h:203
boost::shared_ptr< Footprint > _footprint
Definition: Source.h:195
ShapeSlotDefinition::ErrKey getShapeErrKey() const
Return the key used for the Shape slot uncertainty.
Definition: Source.h:712
A multidimensional strided array.
Definition: Array.h:47
boost::shared_ptr< SourceTable const > getTable() const
Definition: Source.h:93
bool hasModelFluxSlot() const
Return true if the ModelFlux slot corresponds to a valid field.
Definition: Source.h:374
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:639
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:82
FluxSlotDefinition::MeasKey getPsfFluxKey() const
Return the key used for the PsfFlux slot measurement value.
Definition: Source.h:319
FluxSlotDefinition::MeasValue getPsfFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:843
SlotDefinition specialization for centroids.
Definition: slots.h:111
Read/write heavy footprints as non-heavy footprints.
Definition: Source.h:58
lsst::afw::detection::Footprint Footprint
Definition: Source.h:61
double getIxy() const
Return the shape slot Ixy value.
Definition: Source.h:942
FluxSlotDefinition const & getPsfFluxSlot() const
Definition: Source.h:278
bool hasPsfFluxSlot() const
Return true if the PsfFlux slot corresponds to a valid field.
Definition: Source.h:310
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:911
#define CONST_PTR(...)
Definition: base.h:47
bool getApFluxFlag() const
Return true if the measurement in the ApFlux slot failed.
Definition: Source.h:875
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Definition: BaseRecord.h:136
std::string getPsfFluxDefinition() const
Return the name of the field used for the PsfFlux slot.
Definition: Source.h:301
void setParent(RecordId id)
Convenience accessors for the keys in the minimal source schema.
Definition: Source.h:929
Do not read/write footprints at all.
Definition: Source.h:57
Record class that contains measurements made on a single exposure.
Definition: Source.h:81
void defineShape(std::string const &name)
Set the measurement used for the Shape slot.
Definition: Source.h:671
static Key< RecordId > getParentKey()
Key for the parent ID.
Definition: Source.h:259
FluxSlotDefinition const & getInstFluxSlot() const
Definition: Source.h:470
ShapeSlotDefinition::ErrValue getShapeErr() const
Get the uncertainty on the Shape slot measurement.
Definition: Source.h:919
void defineCentroid(std::string const &name)
Set the measurement used for the Centroid slot.
Definition: Source.h:607
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:939
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:328
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:557
SlotDefinition specialization for fluxes.
Definition: slots.h:69
boost::int64_t RecordId
Type used for unique IDs for records.
Definition: misc.h:21
ndarray::Array< double, 1 > getInstFlux() const
Get the value of the InstFlux slot measurement.
Definition: Source.h:794
CentroidSlotDefinition const & getCentroidSlot() const
Definition: Source.h:598
void defineApFlux(std::string const &name)
Set the measurement used for the ApFlux slot.
Definition: Source.h:415
Schema getSchema() const
Return the Schema that holds this record&#39;s fields and keys.
Definition: BaseRecord.h:48
FluxSlotDefinition::ErrValue getApFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:871
bool getShapeFlag() const
Return true if the measurement in the Shape slot failed.
Definition: Source.h:923
bool hasCalibFluxSlot() const
Return true if the CalibFlux slot corresponds to a valid field.
Definition: Source.h:566
FluxSlotDefinition::MeasValue getApFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:867
double getIxx() const
Return the shape slot Ixx value.
Definition: Source.h:936
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid SourceTable schema.
Definition: Source.h:254
std::string getCentroidDefinition() const
Return the name of the field used for the Centroid slot.
Definition: Source.h:621
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:207
ndarray::Array< double, 1 > const getIyy() const
Definition: Source.h:822