LSSTApplications  1.1.2+25,10.0+13,10.0+132,10.0+133,10.0+224,10.0+41,10.0+8,10.0-1-g0f53050+14,10.0-1-g4b7b172+19,10.0-1-g61a5bae+98,10.0-1-g7408a83+3,10.0-1-gc1e0f5a+19,10.0-1-gdb4482e+14,10.0-11-g3947115+2,10.0-12-g8719d8b+2,10.0-15-ga3f480f+1,10.0-2-g4f67435,10.0-2-gcb4bc6c+26,10.0-28-gf7f57a9+1,10.0-3-g1bbe32c+14,10.0-3-g5b46d21,10.0-4-g027f45f+5,10.0-4-g86f66b5+2,10.0-4-gc4fccf3+24,10.0-40-g4349866+2,10.0-5-g766159b,10.0-5-gca2295e+25,10.0-6-g462a451+1
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 getCentroidFlag() const;
147 
150 
153 
155  bool getShapeFlag() const;
156 
157 
159  double getX() const;
160 
162  double getY() const;
163 
165  double getIxx() const;
166 
168  double getIyy() const;
169 
171  double getIxy() const;
172 
174  void updateCoord(image::Wcs const & wcs);
175 
177  void updateCoord(image::Wcs const & wcs, Key< Point<double> > const & key);
178 
179 protected:
180 
181  SourceRecord(PTR(SourceTable) const & table);
182 
183  virtual void _assign(BaseRecord const & other);
184 
185 private:
187 };
188 
194 class SourceTable : public SimpleTable {
195 public:
196 
201 
212  static PTR(SourceTable) make(Schema const & schema, PTR(IdFactory) const & idFactory);
213 
221  static PTR(SourceTable) make(Schema const & schema) { return make(schema, IdFactory::makeSimple()); }
222 
234  Schema r = getMinimalSchema().schema;
235  r.disconnectAliases();
236  return r;
237  }
238 
245  static bool checkSchema(Schema const & other) {
246  return other.contains(getMinimalSchema().schema);
247  }
248 
250  static Key<RecordId> getParentKey() { return getMinimalSchema().parent; }
251 
253  PTR(SourceTable) clone() const { return boost::static_pointer_cast<SourceTable>(_clone()); }
254 
256  PTR(SourceRecord) makeRecord() { return boost::static_pointer_cast<SourceRecord>(_makeRecord()); }
257 
259  PTR(SourceRecord) copyRecord(BaseRecord const & other) {
260  return boost::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other));
261  }
262 
264  PTR(SourceRecord) copyRecord(BaseRecord const & other, SchemaMapper const & mapper) {
265  return boost::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other, mapper));
266  }
267 
268 
269  FluxSlotDefinition const & getPsfFluxSlot() const { return _slots.defPsfFlux; }
270 
278  void definePsfFlux(std::string const & name) {
279  getSchema().getAliasMap()->set(getPsfFluxSlot().getAlias(getSchema().getVersion()), name);
280  }
281 
292  std::string getPsfFluxDefinition() const {
293  return getSchema().getAliasMap()->get(getPsfFluxSlot().getAlias(getSchema().getVersion()));
294  }
295 
301  bool hasPsfFluxSlot() const {
302  return getPsfFluxSlot().isValid();
303  }
304 
311  return getPsfFluxSlot().getMeasKey();
312  }
313 
320  return getPsfFluxSlot().getErrKey();
321  }
322 
329  return getPsfFluxSlot().getFlagKey();
330  }
331 
332 
333  FluxSlotDefinition const & getModelFluxSlot() const { return _slots.defModelFlux; }
334 
342  void defineModelFlux(std::string const & name) {
343  getSchema().getAliasMap()->set(getModelFluxSlot().getAlias(getSchema().getVersion()), name);
344  }
345 
356  std::string getModelFluxDefinition() const {
357  return getSchema().getAliasMap()->get(getModelFluxSlot().getAlias(getSchema().getVersion()));
358  }
359 
365  bool hasModelFluxSlot() const {
366  return getModelFluxSlot().isValid();
367  }
368 
375  return getModelFluxSlot().getMeasKey();
376  }
377 
384  return getModelFluxSlot().getErrKey();
385  }
386 
393  return getModelFluxSlot().getFlagKey();
394  }
395 
396 
397  FluxSlotDefinition const & getApFluxSlot() const { return _slots.defApFlux; }
398 
406  void defineApFlux(std::string const & name) {
407  getSchema().getAliasMap()->set(getApFluxSlot().getAlias(getSchema().getVersion()), name);
408  }
409 
420  std::string getApFluxDefinition() const {
421  return getSchema().getAliasMap()->get(getApFluxSlot().getAlias(getSchema().getVersion()));
422  }
423 
429  bool hasApFluxSlot() const {
430  return getApFluxSlot().isValid();
431  }
432 
439  return getApFluxSlot().getMeasKey();
440  }
441 
448  return getApFluxSlot().getErrKey();
449  }
450 
457  return getApFluxSlot().getFlagKey();
458  }
459 
460 
461  FluxSlotDefinition const & getInstFluxSlot() const { return _slots.defInstFlux; }
462 
470  void defineInstFlux(std::string const & name) {
471  getSchema().getAliasMap()->set(getInstFluxSlot().getAlias(getSchema().getVersion()), name);
472  }
473 
484  std::string getInstFluxDefinition() const {
485  return getSchema().getAliasMap()->get(getInstFluxSlot().getAlias(getSchema().getVersion()));
486  }
487 
493  bool hasInstFluxSlot() const {
494  return getInstFluxSlot().isValid();
495  }
496 
503  return getInstFluxSlot().getMeasKey();
504  }
505 
512  return getInstFluxSlot().getErrKey();
513  }
514 
521  return getInstFluxSlot().getFlagKey();
522  }
523 
524 
525  CentroidSlotDefinition const & getCentroidSlot() const { return _slots.defCentroid; }
526 
534  void defineCentroid(std::string const & name) {
535  getSchema().getAliasMap()->set(getCentroidSlot().getAlias(getSchema().getVersion()), name);
536  }
537 
548  std::string getCentroidDefinition() const {
549  return getSchema().getAliasMap()->get(getCentroidSlot().getAlias(getSchema().getVersion()));
550  }
551 
557  bool hasCentroidSlot() const {
558  return getCentroidSlot().isValid();
559  }
560 
567  return getCentroidSlot().getMeasKey();
568  }
569 
576  return getCentroidSlot().getErrKey();
577  }
578 
585  return getCentroidSlot().getFlagKey();
586  }
587 
588 
589  ShapeSlotDefinition const & getShapeSlot() const { return _slots.defShape; }
590 
598  void defineShape(std::string const & name) {
599  getSchema().getAliasMap()->set(getShapeSlot().getAlias(getSchema().getVersion()), name);
600  }
601 
612  std::string getShapeDefinition() const {
613  return getSchema().getAliasMap()->get(getShapeSlot().getAlias(getSchema().getVersion()));
614  }
615 
621  bool hasShapeSlot() const {
622  return getShapeSlot().isValid();
623  }
624 
631  return getShapeSlot().getMeasKey();
632  }
633 
640  return getShapeSlot().getErrKey();
641  }
642 
649  return getShapeSlot().getFlagKey();
650  }
651 
652 
653 protected:
654 
655  SourceTable(Schema const & schema, PTR(IdFactory) const & idFactory);
656 
657  SourceTable(SourceTable const & other);
658 
659  virtual void handleAliasChange(std::string const & alias);
660 
661 private:
662 
663  // Struct that holds the minimal schema and the special keys we've added to it.
664  struct MinimalSchema {
667 
668  MinimalSchema();
669  };
670 
671  // Return the singleton minimal schema.
672  static MinimalSchema & getMinimalSchema();
673 
674  friend class io::FitsWriter;
675  friend class SourceRecord;
676 
677  // Return a writer object that knows how to save in FITS format. See also FitsWriter.
678  virtual PTR(io::FitsWriter) makeFitsWriter(fits::Fits * fitsfile, int flags) const;
679 
680  SlotSuite _slots;
681 };
682 
683 template <typename RecordT>
684 class SourceColumnViewT : public ColumnViewT<RecordT> {
685 public:
686 
687  typedef RecordT Record;
688  typedef typename RecordT::Table Table;
689 
690  // See the documentation for BaseColumnView for an explanation of why these
691  // accessors *appear* to violate const-correctness.
692 
695  return this->operator[](this->getTable()->getPsfFluxSlot().getMeasKey());
696  }
699  return this->operator[](this->getTable()->getPsfFluxSlot().getErrKey());
700  }
701 
704  return this->operator[](this->getTable()->getApFluxSlot().getMeasKey());
705  }
708  return this->operator[](this->getTable()->getApFluxSlot().getErrKey());
709  }
710 
713  return this->operator[](this->getTable()->getModelFluxSlot().getMeasKey());
714  }
717  return this->operator[](this->getTable()->getModelFluxSlot().getErrKey());
718  }
719 
722  return this->operator[](this->getTable()->getInstFluxSlot().getMeasKey());
723  }
726  return this->operator[](this->getTable()->getInstFluxSlot().getErrKey());
727  }
728 
729 
731  return this->operator[](this->getTable()->getCentroidKey().getX());
732  }
734  return this->operator[](this->getTable()->getCentroidKey().getY());
735  }
736 
738  return this->operator[](this->getTable()->getShapeKey().getIxx());
739  }
741  return this->operator[](this->getTable()->getShapeKey().getIyy());
742  }
744  return this->operator[](this->getTable()->getShapeKey().getIxy());
745  }
746 
748  template <typename InputIterator>
749  static SourceColumnViewT make(PTR(Table) const & table, InputIterator first, InputIterator last) {
750  return SourceColumnViewT(BaseColumnView::make(table, first, last));
751  }
752 
753 protected:
754  explicit SourceColumnViewT(BaseColumnView const & base) : ColumnViewT<RecordT>(base) {}
755 };
756 
757 typedef SourceColumnViewT<SourceRecord> SourceColumnView;
758 
759 #ifndef SWIG
760 
762  return this->get(getTable()->getPsfFluxSlot().getMeasKey());
763 }
764 
766  return this->get(getTable()->getPsfFluxSlot().getErrKey());
767 }
768 
769 inline bool SourceRecord::getPsfFluxFlag() const {
770  return this->get(getTable()->getPsfFluxSlot().getFlagKey());
771 }
772 
774  return this->get(getTable()->getModelFluxSlot().getMeasKey());
775 }
776 
778  return this->get(getTable()->getModelFluxSlot().getErrKey());
779 }
780 
781 inline bool SourceRecord::getModelFluxFlag() const {
782  return this->get(getTable()->getModelFluxSlot().getFlagKey());
783 }
784 
786  return this->get(getTable()->getApFluxSlot().getMeasKey());
787 }
788 
790  return this->get(getTable()->getApFluxSlot().getErrKey());
791 }
792 
793 inline bool SourceRecord::getApFluxFlag() const {
794  return this->get(getTable()->getApFluxSlot().getFlagKey());
795 }
796 
798  return this->get(getTable()->getInstFluxSlot().getMeasKey());
799 }
800 
802  return this->get(getTable()->getInstFluxSlot().getErrKey());
803 }
804 
805 inline bool SourceRecord::getInstFluxFlag() const {
806  return this->get(getTable()->getInstFluxSlot().getFlagKey());
807 }
808 
810  return this->get(getTable()->getCentroidSlot().getMeasKey());
811 }
812 
814  return this->get(getTable()->getCentroidSlot().getErrKey());
815 }
816 
817 inline bool SourceRecord::getCentroidFlag() const {
818  return this->get(getTable()->getCentroidSlot().getFlagKey());
819 }
820 
822  return this->get(getTable()->getShapeSlot().getMeasKey());
823 }
824 
826  return this->get(getTable()->getShapeSlot().getErrKey());
827 }
828 
829 inline bool SourceRecord::getShapeFlag() const {
830  return this->get(getTable()->getShapeSlot().getFlagKey());
831 }
832 
833 
836 inline double SourceRecord::getX() const {
837  return get(getTable()->getCentroidKey().getX());
838 }
839 inline double SourceRecord::getY() const {
840  return get(getTable()->getCentroidKey().getY());
841 }
842 inline double SourceRecord::getIxx() const {
843  return get(getTable()->getShapeKey().getIxx());
844 }
845 inline double SourceRecord::getIyy() const {
846  return get(getTable()->getShapeKey().getIyy());
847 }
848 inline double SourceRecord::getIxy() const {
849  return get(getTable()->getShapeKey().getIxy());
850 }
851 
852 #endif // !SWIG
853 
854 }}} // namespace lsst::afw::table
855 
856 #endif // !AFW_TABLE_Source_h_INCLUDED
FluxSlotDefinition::MeasValue getInstFlux() const
Get the value of the InstFlux slot measurement.
Definition: Source.h:797
FluxSlotDefinition const & getInstFluxSlot() const
Definition: Source.h:461
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:829
SortedCatalogT< SourceRecord > Catalog
Definition: Source.h:86
ShapeSlotDefinition const & getShapeSlot() const
Definition: Source.h:589
Key< Flag > getModelFluxFlagKey() const
Return the key used for the ModelFlux slot failure flag.
Definition: Source.h:392
FluxSlotDefinition::MeasValue getApFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:785
ndarray::Array< double, 1 > const getY() const
Definition: Source.h:733
CentroidSlotDefinition::MeasValue getCentroid() const
Get the value of the Centroid slot measurement.
Definition: Source.h:809
void setParent(RecordId id)
Convenience accessors for the keys in the minimal source schema.
Definition: Source.h:835
#define CONST_PTR(...)
Definition: base.h:47
void defineCentroid(std::string const &name)
Set the measurement used for the Centroid slot.
Definition: Source.h:534
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:698
Column-wise view into a sequence of records that have been allocated contiguously.
Writer subclass for FITS binary tables.
Definition: FitsWriter.h:20
ndarray::Array< double, 1 > getPsfFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:694
ndarray::Array< double, 1 > const getX() const
Definition: Source.h:730
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
FluxSlotDefinition::ErrValue getModelFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:777
double ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:74
void defineApFlux(std::string const &name)
Set the measurement used for the ApFlux slot.
Definition: Source.h:406
double getX() const
Return the centroid slot x coordinate.
Definition: Source.h:836
CentroidSlotDefinition::MeasKey getCentroidKey() const
Return the key used for the Centroid slot measurement value.
Definition: Source.h:566
ShapeSlotDefinition::ErrKey getShapeErrKey() const
Return the key used for the Shape slot uncertainty.
Definition: Source.h:639
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:740
SourceColumnViewT(BaseColumnView const &base)
Definition: Source.h:754
ndarray::Array< double, 1 > getModelFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:716
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:805
double getY() const
Return the centroid slot y coordinate.
Definition: Source.h:839
Key< Flag > getApFluxFlagKey() const
Return the key used for the ApFlux slot failure flag.
Definition: Source.h:456
lsst::afw::detection::Footprint Footprint
Definition: Source.h:61
FluxSlotDefinition::ErrValue getInstFluxErr() const
Get the uncertainty on the InstFlux slot measurement.
Definition: Source.h:801
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:200
Key< Flag > getInstFluxFlagKey() const
Return the key used for the InstFlux slot failure flag.
Definition: Source.h:520
FluxSlotDefinition::MeasKey getApFluxKey() const
Return the key used for the ApFlux slot measurement value.
Definition: Source.h:438
FluxSlotDefinition::ErrValue getPsfFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:765
FluxSlotDefinition::MeasValue getPsfFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:761
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:825
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:365
FluxSlotDefinition::MeasKey getPsfFluxKey() const
Return the key used for the PsfFlux slot measurement value.
Definition: Source.h:310
static boost::shared_ptr< IdFactory > makeSimple()
Return a simple IdFactory that simply counts from 1.
#define PTR(...)
Definition: base.h:41
CentroidSlotDefinition::ErrValue getCentroidErr() const
Get the uncertainty on the Centroid slot measurement.
Definition: Source.h:813
FluxSlotDefinition::ErrValue getApFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:789
void definePsfFlux(std::string const &name)
Set the measurement used for the PsfFlux slot.
Definition: Source.h:278
static Schema makeMinimalSchema()
Return a minimal schema for Source tables and records.
Definition: Source.h:233
FluxSlotDefinition::ErrKey getModelFluxErrKey() const
Return the key used for the ModelFlux slot uncertainty.
Definition: Source.h:383
Eigen::Matrix< float, 3, 3 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:158
std::string getPsfFluxDefinition() const
Return the name of the field used for the PsfFlux slot.
Definition: Source.h:292
table::Key< table::Array< Kernel::Pixel > > image
Definition: FixedKernel.cc:117
double getIyy() const
Return the shape slot Iyy value.
Definition: Source.h:845
bool getCentroidFlag() const
Return true if the measurement in the Centroid slot failed.
Definition: Source.h:817
static Key< RecordId > getParentKey()
Key for the parent ID.
Definition: Source.h:250
std::string getShapeDefinition() const
Return the name of the field used for the Shape slot.
Definition: Source.h:612
SortedCatalogT< Record > Catalog
Definition: Source.h:199
ndarray::Array< double, 1 > getApFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:703
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid SourceTable schema.
Definition: Source.h:245
ndarray::Array< double, 1 > getInstFlux() const
Get the value of the InstFlux slot measurement.
Definition: Source.h:721
Table class that must contain a unique ID field and a celestial coordinate field. ...
Definition: Simple.h:84
double getIxx() const
Return the shape slot Ixx value.
Definition: Source.h:842
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:484
tbl::Schema schema
Definition: CoaddPsf.cc:324
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:269
bool hasApFluxSlot() const
Return true if the ApFlux slot corresponds to a valid field.
Definition: Source.h:429
FluxSlotDefinition const & getModelFluxSlot() const
Definition: Source.h:333
void defineInstFlux(std::string const &name)
Set the measurement used for the InstFlux slot.
Definition: Source.h:470
RecordId getParent() const
Convenience accessors for the keys in the minimal source schema.
Definition: Source.h:834
SortedCatalogT< SourceRecord const > ConstCatalog
Definition: Source.h:87
ndarray::Array< double, 1 > const getIxx() const
Definition: Source.h:737
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:328
boost::shared_ptr< Footprint > _footprint
Definition: Source.h:186
SourceColumnViewT< SourceRecord > SourceColumnView
Definition: fwd.h:73
ShapeSlotDefinition::MeasValue getShape() const
Get the value of the Shape slot measurement.
Definition: Source.h:821
A set of pixels in an Image.
Definition: Footprint.h:70
ndarray::Array< double, 1 > getInstFluxErr() const
Get the uncertainty on the InstFlux slot measurement.
Definition: Source.h:725
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:598
Key< Flag > getShapeFlagKey() const
Return the key used for the Shape slot failure flag.
Definition: Source.h:648
bool getApFluxFlag() const
Return true if the measurement in the ApFlux slot failed.
Definition: Source.h:793
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:743
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:194
FluxSlotDefinition::MeasKey getModelFluxKey() const
Return the key used for the ModelFlux slot measurement value.
Definition: Source.h:374
Eigen::Matrix< float, 2, 2 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:116
bool hasShapeSlot() const
Return true if the Shape slot corresponds to a valid field.
Definition: Source.h:621
A multidimensional strided array.
Definition: Array.h:47
double getIxy() const
Return the shape slot Ixy value.
Definition: Source.h:848
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:548
bool getModelFluxFlag() const
Return true if the measurement in the ModelFlux slot failed.
Definition: Source.h:781
CentroidSlotDefinition const & getCentroidSlot() const
Definition: Source.h:525
bool hasInstFluxSlot() const
Return true if the InstFlux slot corresponds to a valid field.
Definition: Source.h:493
Do not read/write footprints at all.
Definition: Source.h:57
A class used as a handle to a particular field in a table.
Definition: fwd.h:44
bool hasPsfFluxSlot() const
Return true if the PsfFlux slot corresponds to a valid field.
Definition: Source.h:301
ndarray::Array< double, 1 > getApFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:707
FluxSlotDefinition::ErrKey getPsfFluxErrKey() const
Return the key used for the PsfFlux slot uncertainty.
Definition: Source.h:319
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
Key specialization for Flag.
Definition: Flag.h:82
FluxSlotDefinition::ErrKey getInstFluxErrKey() const
Return the key used for the InstFlux slot uncertainty.
Definition: Source.h:511
SlotDefinition specialization for centroids.
Definition: slots.h:112
ndarray::Array< double, 1 > getModelFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:712
bool hasCentroidSlot() const
Return true if the Centroid slot corresponds to a valid field.
Definition: Source.h:557
boost::shared_ptr< Footprint > getFootprint() const
Definition: Source.h:89
double MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:73
bool getPsfFluxFlag() const
Return true if the measurement in the PsfFlux slot failed.
Definition: Source.h:769
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:397
Key< Flag > getCentroidFlagKey() const
Return the key used for the Centroid slot failure flag.
Definition: Source.h:584
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:749
SourceRecord(boost::shared_ptr< SourceTable > const &table)
void defineModelFlux(std::string const &name)
Set the measurement used for the ModelFlux slot.
Definition: Source.h:342
FluxSlotDefinition::ErrKey getApFluxErrKey() const
Return the key used for the ApFlux slot uncertainty.
Definition: Source.h:447
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:45
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:630
std::map< Citizen const *, CitizenInfo > table
Definition: Citizen.h:93
Tag types used to declare specialized field types.
Definition: misc.h:35
SlotDefinition specialization for shapes.
Definition: slots.h:154
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys...
Definition: aggregates.h:196
FluxSlotDefinition::MeasValue getModelFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:773
CentroidSlotDefinition::ErrKey getCentroidErrKey() const
Return the key used for the Centroid slot uncertainty.
Definition: Source.h:575
FluxSlotDefinition::MeasKey getInstFluxKey() const
Return the key used for the InstFlux slot measurement value.
Definition: Source.h:502
SlotDefinition specialization for fluxes.
Definition: slots.h:70
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:198
Read/write heavy footprints as non-heavy footprints.
Definition: Source.h:58
std::string getApFluxDefinition() const
Return the name of the field used for the ApFlux slot.
Definition: Source.h:420
static boost::shared_ptr< SourceTable > make(Schema const &schema)
Construct a new table.
Definition: Source.h:221
std::string getModelFluxDefinition() const
Return the name of the field used for the ModelFlux slot.
Definition: Source.h:356