LSSTApplications  10.0-2-g4f67435,11.0.rc2+1,11.0.rc2+12,11.0.rc2+3,11.0.rc2+4,11.0.rc2+5,11.0.rc2+6,11.0.rc2+7,11.0.rc2+8
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
FluxSlotDefinition const & getInstFluxSlot() const
Definition: Source.h:470
An ellipse core with quadrupole moments as parameters.
Definition: Quadrupole.h:45
Defines the fields and offsets for a table.
Definition: Schema.h:46
bool getShapeFlag() const
Return true if the measurement in the Shape slot failed.
Definition: Source.h:923
SortedCatalogT< SourceRecord > Catalog
Definition: Source.h:86
ShapeSlotDefinition const & getShapeSlot() const
Definition: Source.h:662
Key< Flag > getModelFluxFlagKey() const
Return the key used for the ModelFlux slot failure flag.
Definition: Source.h:401
FluxSlotDefinition::MeasValue getApFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:867
ndarray::Array< double, 1 > const getY() const
Definition: Source.h:815
CentroidSlotDefinition::MeasValue getCentroid() const
Get the value of the Centroid slot measurement.
Definition: Source.h:903
void setParent(RecordId id)
Convenience accessors for the keys in the minimal source schema.
Definition: Source.h:929
void defineCentroid(std::string const &name)
Set the measurement used for the Centroid slot.
Definition: Source.h:607
Schema getSchema() const
Return the Schema that holds this record&#39;s fields and keys.
Definition: BaseRecord.h:48
void updateCoord(image::Wcs const &wcs)
Update the coord field using the given Wcs and the field in the centroid slot.
ndarray::Array< double, 1 > getPsfFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:771
Column-wise view into a sequence of records that have been allocated contiguously.
Writer object for FITS binary tables.
Definition: FitsWriter.h:22
ndarray::Array< double, 1 > getPsfFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:767
ndarray::Array< double, 1 > const getX() const
Definition: Source.h:812
#define PTR(...)
Definition: base.h:41
Represent a set of pixels of an arbitrary shape and size.
static BaseColumnView make(boost::shared_ptr< BaseTable > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
boost::shared_ptr< SourceTable const > getTable() const
Definition: Source.h:93
table::Key< std::string > name
Definition: ApCorrMap.cc:71
FluxSlotDefinition::ErrValue getModelFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:859
FluxSlotDefinition::ErrKey getCalibFluxErrKey() const
Return the key used for the CalibFlux slot uncertainty.
Definition: Source.h:584
double ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:73
void defineApFlux(std::string const &name)
Set the measurement used for the ApFlux slot.
Definition: Source.h:415
double getX() const
Return the centroid slot x coordinate.
Definition: Source.h:930
CentroidSlotDefinition::MeasKey getCentroidKey() const
Return the key used for the Centroid slot measurement value.
Definition: Source.h:639
ShapeSlotDefinition::ErrKey getShapeErrKey() const
Return the key used for the Shape slot uncertainty.
Definition: Source.h:712
A mapping between the keys of two Schemas, used to copy data between them.
Definition: SchemaMapper.h:19
ndarray::Array< double, 1 > const getIyy() const
Definition: Source.h:822
SourceColumnViewT(BaseColumnView const &base)
Definition: Source.h:836
ndarray::Array< double, 1 > getModelFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:789
boost::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
Definition: BaseRecord.h:51
bool getInstFluxFlag() const
Return true if the measurement in the InstFlux slot failed.
Definition: Source.h:887
double getY() const
Return the centroid slot y coordinate.
Definition: Source.h:933
#define CONST_PTR(...)
Definition: base.h:47
Key< Flag > getApFluxFlagKey() const
Return the key used for the ApFlux slot failure flag.
Definition: Source.h:465
bool getCalibFluxFlag() const
Return true if the measurement in the CalibFlux slot failed.
Definition: Source.h:899
lsst::afw::detection::Footprint Footprint
Definition: Source.h:61
FluxSlotDefinition::ErrValue getInstFluxErr() const
Get the uncertainty on the InstFlux slot measurement.
Definition: Source.h:883
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
SortedCatalogT< Record const > ConstCatalog
Definition: Source.h:209
Key< Flag > getInstFluxFlagKey() const
Return the key used for the InstFlux slot failure flag.
Definition: Source.h:529
FluxSlotDefinition::MeasKey getApFluxKey() const
Return the key used for the ApFlux slot measurement value.
Definition: Source.h:447
FluxSlotDefinition::ErrValue getPsfFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:847
tbl::Key< int > wcs
FluxSlotDefinition::MeasValue getPsfFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:843
FluxSlotDefinition const & getCalibFluxSlot() const
Definition: Source.h:534
boost::shared_ptr< AliasMap > getAliasMap() const
Definition: Schema.h:258
ShapeSlotDefinition::ErrValue getShapeErr() const
Get the uncertainty on the Shape slot measurement.
Definition: Source.h:919
Implementation of the WCS standard for a any projection.
Definition: Wcs.h:107
bool hasModelFluxSlot() const
Return true if the ModelFlux slot corresponds to a valid field.
Definition: Source.h:374
FluxSlotDefinition::MeasKey getPsfFluxKey() const
Return the key used for the PsfFlux slot measurement value.
Definition: Source.h:319
static boost::shared_ptr< IdFactory > makeSimple()
Return a simple IdFactory that simply counts from 1.
CentroidSlotDefinition::ErrValue getCentroidErr() const
Get the uncertainty on the Centroid slot measurement.
Definition: Source.h:907
FluxSlotDefinition::ErrValue getApFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:871
void definePsfFlux(std::string const &name)
Set the measurement used for the PsfFlux slot.
Definition: Source.h:287
static Schema makeMinimalSchema()
Return a minimal schema for Source tables and records.
Definition: Source.h:242
FluxSlotDefinition::ErrKey getModelFluxErrKey() const
Return the key used for the ModelFlux slot uncertainty.
Definition: Source.h:392
Eigen::Matrix< float, 3, 3 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:157
std::map< Citizen const *, CitizenInfo > table
Definition: Citizen.h:93
std::string getPsfFluxDefinition() const
Return the name of the field used for the PsfFlux slot.
Definition: Source.h:301
table::Key< table::Array< Kernel::Pixel > > image
Definition: FixedKernel.cc:117
double getIyy() const
Return the shape slot Iyy value.
Definition: Source.h:939
bool getCentroidFlag() const
Return true if the measurement in the Centroid slot failed.
Definition: Source.h:911
static Key< RecordId > getParentKey()
Key for the parent ID.
Definition: Source.h:259
std::string getShapeDefinition() const
Return the name of the field used for the Shape slot.
Definition: Source.h:685
SortedCatalogT< Record > Catalog
Definition: Source.h:208
ndarray::Array< double, 1 > getApFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:776
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid SourceTable schema.
Definition: Source.h:254
ndarray::Array< double, 1 > getInstFlux() const
Get the value of the InstFlux slot measurement.
Definition: Source.h:794
void defineCalibFlux(std::string const &name)
Set the measurement used for the CalibFlux slot.
Definition: Source.h:543
Table class that must contain a unique ID field and a celestial coordinate field. ...
Definition: Simple.h:85
FluxSlotDefinition::ErrValue getCalibFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:895
double getIxx() const
Return the shape slot Ixx value.
Definition: Source.h:936
int contains(Schema const &other, int flags=EQUAL_KEYS) const
Test whether the given schema is a subset of this.
std::string getInstFluxDefinition() const
Return the name of the field used for the InstFlux slot.
Definition: Source.h:493
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
FluxSlotDefinition const & getPsfFluxSlot() const
Definition: Source.h:278
bool hasApFluxSlot() const
Return true if the ApFlux slot corresponds to a valid field.
Definition: Source.h:438
FluxSlotDefinition const & getModelFluxSlot() const
Definition: Source.h:342
void defineInstFlux(std::string const &name)
Set the measurement used for the InstFlux slot.
Definition: Source.h:479
FluxSlotDefinition::MeasKey getCalibFluxKey() const
Return the key used for the CalibFlux slot measurement value.
Definition: Source.h:575
RecordId getParent() const
Convenience accessors for the keys in the minimal source schema.
Definition: Source.h:928
SortedCatalogT< SourceRecord const > ConstCatalog
Definition: Source.h:87
ndarray::Array< double, 1 > const getIxx() const
Definition: Source.h:819
virtual void _assign(BaseRecord const &other)
Called by assign() after transferring fields to allow subclass data members to be copied...
Key< Flag > getPsfFluxFlagKey() const
Return the key used for the PsfFlux slot failure flag.
Definition: Source.h:337
boost::shared_ptr< Footprint > _footprint
Definition: Source.h:195
Key< Flag > getCalibFluxFlagKey() const
Return the key used for the CalibFlux slot failure flag.
Definition: Source.h:593
SourceColumnViewT< SourceRecord > SourceColumnView
Definition: fwd.h:73
bool hasCalibFluxSlot() const
Return true if the CalibFlux slot corresponds to a valid field.
Definition: Source.h:566
ShapeSlotDefinition::MeasValue getShape() const
Get the value of the Shape slot measurement.
Definition: Source.h:915
tbl::Schema schema
A set of pixels in an Image.
Definition: Footprint.h:62
ndarray::Array< double, 1 > getInstFluxErr() const
Get the uncertainty on the InstFlux slot measurement.
Definition: Source.h:798
A polymorphic functor base class for generating record IDs for a table.
Definition: IdFactory.h:19
void defineShape(std::string const &name)
Set the measurement used for the Shape slot.
Definition: Source.h:671
Key< Flag > getShapeFlagKey() const
Return the key used for the Shape slot failure flag.
Definition: Source.h:721
bool getApFluxFlag() const
Return true if the measurement in the ApFlux slot failed.
Definition: Source.h:875
boost::shared_ptr< BaseRecord > copyRecord(BaseRecord const &input)
Deep-copy a record, requiring that it have the same schema as this table.
ndarray::Array< double, 1 > const getIxy() const
Definition: Source.h:825
SourceFitsFlags
Bitflags to be passed to SourceCatalog::readFits and SourceCatalog::writeFits.
Definition: Source.h:56
Table class that contains measurements made on a single exposure.
Definition: Source.h:203
FluxSlotDefinition::MeasKey getModelFluxKey() const
Return the key used for the ModelFlux slot measurement value.
Definition: Source.h:383
Eigen::Matrix< float, 2, 2 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:115
bool hasShapeSlot() const
Return true if the Shape slot corresponds to a valid field.
Definition: Source.h:694
A multidimensional strided array.
Definition: Array.h:47
double getIxy() const
Return the shape slot Ixy value.
Definition: Source.h:942
Base class for all records.
Definition: BaseRecord.h:27
std::string getCentroidDefinition() const
Return the name of the field used for the Centroid slot.
Definition: Source.h:621
bool getModelFluxFlag() const
Return true if the measurement in the ModelFlux slot failed.
Definition: Source.h:863
CentroidSlotDefinition const & getCentroidSlot() const
Definition: Source.h:598
bool hasInstFluxSlot() const
Return true if the InstFlux slot corresponds to a valid field.
Definition: Source.h:502
Do not read/write footprints at all.
Definition: Source.h:57
bool hasPsfFluxSlot() const
Return true if the PsfFlux slot corresponds to a valid field.
Definition: Source.h:310
ndarray::Array< double, 1 > getApFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:780
FluxSlotDefinition::ErrKey getPsfFluxErrKey() const
Return the key used for the PsfFlux slot uncertainty.
Definition: Source.h:328
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
Key specialization for Flag.
Definition: Flag.h:82
ndarray::Array< double, 1 > getCalibFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:803
FluxSlotDefinition::ErrKey getInstFluxErrKey() const
Return the key used for the InstFlux slot uncertainty.
Definition: Source.h:520
SlotDefinition specialization for centroids.
Definition: slots.h:111
ndarray::Array< double, 1 > getModelFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:785
bool hasCentroidSlot() const
Return true if the Centroid slot corresponds to a valid field.
Definition: Source.h:630
boost::shared_ptr< Footprint > getFootprint() const
Definition: Source.h:89
double MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:72
bool getPsfFluxFlag() const
Return true if the measurement in the PsfFlux slot failed.
Definition: Source.h:851
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Definition: BaseRecord.h:136
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:85
FluxSlotDefinition const & getApFluxSlot() const
Definition: Source.h:406
Key< Flag > getCentroidFlagKey() const
Return the key used for the Centroid slot failure flag.
Definition: Source.h:657
Record class that contains measurements made on a single exposure.
Definition: Source.h:81
static SourceColumnViewT make(boost::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
Definition: Source.h:831
SourceRecord(boost::shared_ptr< SourceTable > const &table)
void defineModelFlux(std::string const &name)
Set the measurement used for the ModelFlux slot.
Definition: Source.h:351
FluxSlotDefinition::ErrKey getApFluxErrKey() const
Return the key used for the ApFlux slot uncertainty.
Definition: Source.h:456
void setFootprint(boost::shared_ptr< Footprint > const &footprint)
Definition: Source.h:91
Record class that must contain a unique ID field and a celestial coordinate field.
Definition: Simple.h:46
boost::int64_t RecordId
Type used for unique IDs for records.
Definition: misc.h:21
ShapeSlotDefinition::MeasKey getShapeKey() const
Return the key used for the Shape slot measurement value.
Definition: Source.h:703
ndarray::Array< double, 1 > getCalibFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:807
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
FluxSlotDefinition::MeasValue getModelFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:855
CentroidSlotDefinition::ErrKey getCentroidErrKey() const
Return the key used for the Centroid slot uncertainty.
Definition: Source.h:648
FluxSlotDefinition::MeasKey getInstFluxKey() const
Return the key used for the InstFlux slot measurement value.
Definition: Source.h:511
SlotDefinition specialization for fluxes.
Definition: slots.h:69
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:207
Read/write heavy footprints as non-heavy footprints.
Definition: Source.h:58
FluxSlotDefinition::MeasValue getCalibFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:891
std::string getCalibFluxDefinition() const
Return the name of the field used for the CalibFlux slot.
Definition: Source.h:557
std::string getApFluxDefinition() const
Return the name of the field used for the ApFlux slot.
Definition: Source.h:429
static boost::shared_ptr< SourceTable > make(Schema const &schema)
Construct a new table.
Definition: Source.h:230
std::string getModelFluxDefinition() const
Return the name of the field used for the ModelFlux slot.
Definition: Source.h:365