LSSTApplications  18.0.0+106,18.0.0+50,19.0.0,19.0.0+1,19.0.0+10,19.0.0+11,19.0.0+13,19.0.0+17,19.0.0+2,19.0.0-1-g20d9b18+6,19.0.0-1-g425ff20,19.0.0-1-g5549ca4,19.0.0-1-g580fafe+6,19.0.0-1-g6fe20d0+1,19.0.0-1-g7011481+9,19.0.0-1-g8c57eb9+6,19.0.0-1-gb5175dc+11,19.0.0-1-gdc0e4a7+9,19.0.0-1-ge272bc4+6,19.0.0-1-ge3aa853,19.0.0-10-g448f008b,19.0.0-12-g6990b2c,19.0.0-2-g0d9f9cd+11,19.0.0-2-g3d9e4fb2+11,19.0.0-2-g5037de4,19.0.0-2-gb96a1c4+3,19.0.0-2-gd955cfd+15,19.0.0-3-g2d13df8,19.0.0-3-g6f3c7dc,19.0.0-4-g725f80e+11,19.0.0-4-ga671dab3b+1,19.0.0-4-gad373c5+3,19.0.0-5-ga2acb9c+2,19.0.0-5-gfe96e6c+2,w.2020.01
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 #ifndef AFW_TABLE_Source_h_INCLUDED
25 #define AFW_TABLE_Source_h_INCLUDED
26 
27 #include "boost/array.hpp"
28 #include "boost/type_traits/is_convertible.hpp"
29 
31 #include "lsst/afw/table/Simple.h"
34 #include "lsst/afw/table/Catalog.h"
36 #include "lsst/afw/table/slots.h"
38 
39 namespace lsst {
40 namespace afw {
41 
42 namespace geom {
43 class SkyWcs;
44 } // namespace geom
45 
46 namespace table {
47 
57 };
58 
60 
61 class SourceRecord;
62 class SourceTable;
63 
64 template <typename RecordT>
65 class SourceColumnViewT;
66 
80 class SourceRecord : public SimpleRecord {
81 public:
82  typedef SourceTable Table;
86 
97  SimpleRecord(token, std::move(data))
98  {}
99 
100  std::shared_ptr<Footprint> getFootprint() const { return _footprint; }
101 
102  void setFootprint(std::shared_ptr<Footprint> const &footprint) { _footprint = footprint; }
103 
105  return std::static_pointer_cast<SourceTable const>(BaseRecord::getTable());
106  }
107 
109  RecordId getParent() const;
111  void setParent(RecordId id);
113 
115  FluxSlotDefinition::MeasValue getPsfInstFlux() const;
116 
118  FluxSlotDefinition::ErrValue getPsfInstFluxErr() const;
119 
121  bool getPsfFluxFlag() const;
122 
124  FluxSlotDefinition::MeasValue getModelInstFlux() const;
125 
127  FluxSlotDefinition::ErrValue getModelInstFluxErr() const;
128 
130  bool getModelFluxFlag() const;
131 
133  FluxSlotDefinition::MeasValue getApInstFlux() const;
134 
136  FluxSlotDefinition::ErrValue getApInstFluxErr() const;
137 
139  bool getApFluxFlag() const;
140 
142  FluxSlotDefinition::MeasValue getGaussianInstFlux() const;
143 
145  FluxSlotDefinition::ErrValue getGaussianInstFluxErr() const;
146 
148  bool getGaussianFluxFlag() const;
149 
151  FluxSlotDefinition::MeasValue getCalibInstFlux() const;
152 
154  FluxSlotDefinition::ErrValue getCalibInstFluxErr() const;
155 
157  bool getCalibFluxFlag() const;
158 
160  CentroidSlotDefinition::MeasValue getCentroid() const;
161 
163  CentroidSlotDefinition::ErrValue getCentroidErr() const;
164 
166  bool getCentroidFlag() const;
167 
169  ShapeSlotDefinition::MeasValue getShape() const;
170 
172  ShapeSlotDefinition::ErrValue getShapeErr() const;
173 
175  bool getShapeFlag() const;
176 
178  double getX() const;
179 
181  double getY() const;
182 
184  double getIxx() const;
185 
187  double getIyy() const;
188 
190  double getIxy() const;
191 
193  void updateCoord(geom::SkyWcs const &wcs);
194 
196  void updateCoord(geom::SkyWcs const &wcs, PointKey<double> const &key);
197 
198  SourceRecord(const SourceRecord &) = delete;
199  SourceRecord &operator=(const SourceRecord &) = delete;
200  SourceRecord(SourceRecord &&) = delete;
201  SourceRecord &operator=(SourceRecord &&) = delete;
202  ~SourceRecord();
203 
204 protected:
205 
206  virtual void _assign(BaseRecord const &other);
207 
208 private:
209  friend class SourceTable;
210 
211  std::shared_ptr<Footprint> _footprint;
212 };
213 
219 class SourceTable : public SimpleTable {
220 public:
225 
236  static std::shared_ptr<SourceTable> make(Schema const &schema,
237  std::shared_ptr<IdFactory> const &idFactory);
238 
247  return make(schema, IdFactory::makeSimple());
248  }
249 
261  Schema r = getMinimalSchema().schema;
262  r.disconnectAliases();
263  return r;
264  }
265 
272  static bool checkSchema(Schema const &other) { return other.contains(getMinimalSchema().schema); }
273 
275  static Key<RecordId> getParentKey() { return getMinimalSchema().parent; }
276 
279 
282  return std::static_pointer_cast<SourceRecord>(_makeRecord());
283  }
284 
287  return std::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other));
288  }
289 
292  return std::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other, mapper));
293  }
294 
295  FluxSlotDefinition const &getPsfFluxSlot() const { return _slots.defPsfFlux; }
296 
305  getSchema().getAliasMap()->set(getPsfFluxSlot().getAlias(), name);
306  }
307 
308  FluxSlotDefinition const &getModelFluxSlot() const { return _slots.defModelFlux; }
309 
318  getSchema().getAliasMap()->set(getModelFluxSlot().getAlias(), name);
319  }
320 
321  FluxSlotDefinition const &getApFluxSlot() const { return _slots.defApFlux; }
322 
331  getSchema().getAliasMap()->set(getApFluxSlot().getAlias(), name);
332  }
333 
334  FluxSlotDefinition const &getGaussianFluxSlot() const { return _slots.defGaussianFlux; }
335 
344  getSchema().getAliasMap()->set(getGaussianFluxSlot().getAlias(), name);
345  }
346 
347  FluxSlotDefinition const &getCalibFluxSlot() const { return _slots.defCalibFlux; }
348 
357  getSchema().getAliasMap()->set(getCalibFluxSlot().getAlias(), name);
358  }
359 
360  CentroidSlotDefinition const &getCentroidSlot() const { return _slots.defCentroid; }
361 
370  getSchema().getAliasMap()->set(getCentroidSlot().getAlias(), name);
371  }
372 
382  [
383  [deprecated("Use `getSchema().getAliasMap()->get(\"slot_Centroid\")` instead. To be removed "
384  "after 20.0.0.")]] // DM-22276
387  return getSchema().getAliasMap()->get(getCentroidSlot().getAlias());
388  }
389 
395  [[deprecated("Use `getCentroidSlot().isValid()` instead. To be removed after 20.0.0.")]] // DM-22276
396  bool
397  hasCentroidSlot() const {
398  return getCentroidSlot().isValid();
399  }
400 
406  [
407  [deprecated("Use `getCentroidSlot().getMeasKey()` instead. To be removed after "
408  "20.0.0.")]] // DM-22276
410  getCentroidKey() const {
411  return getCentroidSlot().getMeasKey();
412  }
413 
419  [
420  [deprecated("Use `getCentroidSlot().getErrKey()` instead. To be removed after "
421  "20.0.0.")]] // DM-22276
424  return getCentroidSlot().getErrKey();
425  }
426 
432  [[deprecated("Use `getCentroidSlot().getFlagKey()` instead. To be removed after 20.0.0.")]] // DM-22276
433  Key<Flag>
435  return getCentroidSlot().getFlagKey();
436  }
437 
438  ShapeSlotDefinition const &getShapeSlot() const { return _slots.defShape; }
439 
447  void defineShape(std::string const &name) {
448  getSchema().getAliasMap()->set(getShapeSlot().getAlias(), name);
449  }
450 
460  [
461  [deprecated("Use `getSchema().getAliasMap()->get(\"slot_Shape\")` instead. To be removed after "
462  "20.0.0.")]] // DM-22276
465  return getSchema().getAliasMap()->get(getShapeSlot().getAlias());
466  }
467 
473  [[deprecated("Use `getShapeSlot().isValid()` instead. To be removed after 20.0.0.")]] // DM-22276
474  bool
475  hasShapeSlot() const {
476  return getShapeSlot().isValid();
477  }
478 
484  [[deprecated("Use `getShapeSlot().getMeasKey()` instead. To be removed after 20.0.0.")]] // DM-22276
486  getShapeKey() const {
487  return getShapeSlot().getMeasKey();
488  }
489 
495  [[deprecated("Use `getShapeSlot().getErrKey()` instead. To be removed after 20.0.0.")]] // DM-22276
497  getShapeErrKey() const {
498  return getShapeSlot().getErrKey();
499  }
500 
506  [[deprecated("Use `getShapeSlot().getFlagKey()` instead. To be removed after 20.0.0.")]] // DM-22276
507  Key<Flag>
508  getShapeFlagKey() const {
509  return getShapeSlot().getFlagKey();
510  }
511 
512  SourceTable &operator=(SourceTable const &) = delete;
513  SourceTable &operator=(SourceTable &&) = delete;
514 
515 protected:
516  SourceTable(Schema const &schema, std::shared_ptr<IdFactory> const &idFactory);
517 
518  SourceTable(SourceTable const &other);
519  SourceTable(SourceTable &&other);
520 
521  void handleAliasChange(std::string const &alias) override;
522 
523  std::shared_ptr<BaseTable> _clone() const override;
524 
525  std::shared_ptr<BaseRecord> _makeRecord() override;
526 
527 private:
528  // Struct that holds the minimal schema and the special keys we've added to it.
529  struct MinimalSchema {
530  Schema schema;
531  Key<RecordId> parent;
532 
533  MinimalSchema();
534  };
535 
536  // Return the singleton minimal schema.
537  static MinimalSchema &getMinimalSchema();
538 
539  friend class io::FitsWriter;
540  friend class SourceRecord;
541 
542  // Return a writer object that knows how to save in FITS format. See also FitsWriter.
543  std::shared_ptr<io::FitsWriter> makeFitsWriter(fits::Fits *fitsfile, int flags) const override;
544 
545  SlotSuite _slots;
546 };
547 
548 template <typename RecordT>
549 class SourceColumnViewT : public ColumnViewT<RecordT> {
550 public:
551  typedef RecordT Record;
552  typedef typename RecordT::Table Table;
553 
554  // See the documentation for BaseColumnView for an explanation of why these
555  // accessors *appear* to violate const-correctness.
556 
558  ndarray::Array<double, 1> getPsfInstFlux() const {
559  return this->operator[](this->getTable()->getPsfFluxSlot().getMeasKey());
560  }
562  ndarray::Array<double, 1> getPsfInstFluxErr() const {
563  return this->operator[](this->getTable()->getPsfFluxSlot().getErrKey());
564  }
565 
567  ndarray::Array<double, 1> getApInstFlux() const {
568  return this->operator[](this->getTable()->getApFluxSlot().getMeasKey());
569  }
571  ndarray::Array<double, 1> getApInstFluxErr() const {
572  return this->operator[](this->getTable()->getApFluxSlot().getErrKey());
573  }
574 
576  ndarray::Array<double, 1> getModelInstFlux() const {
577  return this->operator[](this->getTable()->getModelFluxSlot().getMeasKey());
578  }
580  ndarray::Array<double, 1> getModelInstFluxErr() const {
581  return this->operator[](this->getTable()->getModelFluxSlot().getErrKey());
582  }
583 
585  ndarray::Array<double, 1> getGaussianInstFlux() const {
586  return this->operator[](this->getTable()->getGaussianFluxSlot().getMeasKey());
587  }
589  ndarray::Array<double, 1> getGaussianInstFluxErr() const {
590  return this->operator[](this->getTable()->getGaussianFluxSlot().getErrKey());
591  }
592 
594  ndarray::Array<double, 1> getCalibInstFlux() const {
595  return this->operator[](this->getTable()->getCalibFluxSlot().getMeasKey());
596  }
598  ndarray::Array<double, 1> getCalibInstFluxErr() const {
599  return this->operator[](this->getTable()->getCalibFluxSlot().getErrKey());
600  }
601 
602  ndarray::Array<double, 1> const getX() const {
603  return this->operator[](this->getTable()->getCentroidKey().getX());
604  }
605  ndarray::Array<double, 1> const getY() const {
606  return this->operator[](this->getTable()->getCentroidKey().getY());
607  }
608 
609  ndarray::Array<double, 1> const getIxx() const {
610  return this->operator[](this->getTable()->getShapeKey().getIxx());
611  }
612  ndarray::Array<double, 1> const getIyy() const {
613  return this->operator[](this->getTable()->getShapeKey().getIyy());
614  }
615  ndarray::Array<double, 1> const getIxy() const {
616  return this->operator[](this->getTable()->getShapeKey().getIxy());
617  }
618 
620  template <typename InputIterator>
621  static SourceColumnViewT make(std::shared_ptr<Table> const &table, InputIterator first,
622  InputIterator last) {
623  return SourceColumnViewT(BaseColumnView::make(table, first, last));
624  }
625 
626  SourceColumnViewT(SourceColumnViewT const &) = default;
627  SourceColumnViewT(SourceColumnViewT &&) = default;
628  SourceColumnViewT &operator=(SourceColumnViewT const &) = default;
629  SourceColumnViewT &operator=(SourceColumnViewT &&) = default;
630  ~SourceColumnViewT() = default;
631 
632 protected:
633  explicit SourceColumnViewT(BaseColumnView const &base) : ColumnViewT<RecordT>(base) {}
634 };
635 
637 
638 inline FluxSlotDefinition::MeasValue SourceRecord::getPsfInstFlux() const {
639  return this->get(getTable()->getPsfFluxSlot().getMeasKey());
640 }
641 
642 inline FluxSlotDefinition::ErrValue SourceRecord::getPsfInstFluxErr() const {
643  return this->get(getTable()->getPsfFluxSlot().getErrKey());
644 }
645 
646 inline bool SourceRecord::getPsfFluxFlag() const {
647  return this->get(getTable()->getPsfFluxSlot().getFlagKey());
648 }
649 
650 inline FluxSlotDefinition::MeasValue SourceRecord::getModelInstFlux() const {
651  return this->get(getTable()->getModelFluxSlot().getMeasKey());
652 }
653 
654 inline FluxSlotDefinition::ErrValue SourceRecord::getModelInstFluxErr() const {
655  return this->get(getTable()->getModelFluxSlot().getErrKey());
656 }
657 
658 inline bool SourceRecord::getModelFluxFlag() const {
659  return this->get(getTable()->getModelFluxSlot().getFlagKey());
660 }
661 
662 inline FluxSlotDefinition::MeasValue SourceRecord::getApInstFlux() const {
663  return this->get(getTable()->getApFluxSlot().getMeasKey());
664 }
665 
666 inline FluxSlotDefinition::ErrValue SourceRecord::getApInstFluxErr() const {
667  return this->get(getTable()->getApFluxSlot().getErrKey());
668 }
669 
670 inline bool SourceRecord::getApFluxFlag() const {
671  return this->get(getTable()->getApFluxSlot().getFlagKey());
672 }
673 
674 inline FluxSlotDefinition::MeasValue SourceRecord::getGaussianInstFlux() const {
675  return this->get(getTable()->getGaussianFluxSlot().getMeasKey());
676 }
677 
678 inline FluxSlotDefinition::ErrValue SourceRecord::getGaussianInstFluxErr() const {
679  return this->get(getTable()->getGaussianFluxSlot().getErrKey());
680 }
681 
682 inline bool SourceRecord::getGaussianFluxFlag() const {
683  return this->get(getTable()->getGaussianFluxSlot().getFlagKey());
684 }
685 
686 inline FluxSlotDefinition::MeasValue SourceRecord::getCalibInstFlux() const {
687  return this->get(getTable()->getCalibFluxSlot().getMeasKey());
688 }
689 
690 inline FluxSlotDefinition::ErrValue SourceRecord::getCalibInstFluxErr() const {
691  return this->get(getTable()->getCalibFluxSlot().getErrKey());
692 }
693 
694 inline bool SourceRecord::getCalibFluxFlag() const {
695  return this->get(getTable()->getCalibFluxSlot().getFlagKey());
696 }
697 
698 inline CentroidSlotDefinition::MeasValue SourceRecord::getCentroid() const {
699  return this->get(getTable()->getCentroidSlot().getMeasKey());
700 }
701 
702 inline CentroidSlotDefinition::ErrValue SourceRecord::getCentroidErr() const {
703  return this->get(getTable()->getCentroidSlot().getErrKey());
704 }
705 
706 inline bool SourceRecord::getCentroidFlag() const {
707  return this->get(getTable()->getCentroidSlot().getFlagKey());
708 }
709 
710 inline ShapeSlotDefinition::MeasValue SourceRecord::getShape() const {
711  return this->get(getTable()->getShapeSlot().getMeasKey());
712 }
713 
714 inline ShapeSlotDefinition::ErrValue SourceRecord::getShapeErr() const {
715  return this->get(getTable()->getShapeSlot().getErrKey());
716 }
717 
718 inline bool SourceRecord::getShapeFlag() const { return this->get(getTable()->getShapeSlot().getFlagKey()); }
719 
720 inline RecordId SourceRecord::getParent() const { return get(SourceTable::getParentKey()); }
721 inline void SourceRecord::setParent(RecordId id) { set(SourceTable::getParentKey(), id); }
722 inline double SourceRecord::getX() const { return get(getTable()->getCentroidKey().getX()); }
723 inline double SourceRecord::getY() const { return get(getTable()->getCentroidKey().getY()); }
724 inline double SourceRecord::getIxx() const { return get(getTable()->getShapeKey().getIxx()); }
725 inline double SourceRecord::getIyy() const { return get(getTable()->getShapeKey().getIyy()); }
726 inline double SourceRecord::getIxy() const { return get(getTable()->getShapeKey().getIxy()); }
727 
728 } // namespace table
729 } // namespace afw
730 } // namespace lsst
731 
732 #endif // !AFW_TABLE_Source_h_INCLUDED
FluxSlotDefinition const & getGaussianFluxSlot() const
Definition: Source.h:334
An ellipse core with quadrupole moments as parameters.
Definition: Quadrupole.h:47
bool hasCentroidSlot() const
Return true if the Centroid slot corresponds to a valid field.
Definition: Source.h:397
Defines the fields and offsets for a table.
Definition: Schema.h:50
ndarray::Array< double, 1 > getCalibInstFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:594
Column-wise view into a sequence of records that have been allocated contiguously.
Writer object for FITS binary tables.
Definition: FitsWriter.h:25
FluxSlotDefinition const & getApFluxSlot() const
Definition: Source.h:321
SortedCatalogT< SourceRecord const > ConstCatalog
Definition: Source.h:85
Helper struct that contains the information passed from BaseTable to BaseRecord at construction...
Definition: BaseTable.h:32
void defineCalibFlux(std::string const &name)
Set the measurement used for the CalibFlux slot.
Definition: Source.h:356
A mapping between the keys of two Schemas, used to copy data between them.
Definition: SchemaMapper.h:21
SourceColumnViewT(BaseColumnView const &base)
Definition: Source.h:633
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:83
ShapeSlotDefinition const & getShapeSlot() const
Definition: Source.h:438
std::shared_ptr< Footprint > getFootprint() const
Definition: Source.h:100
FluxSlotDefinition const & getCalibFluxSlot() const
Definition: Source.h:347
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
Definition: Schema.cc:729
STL namespace.
SortedCatalogT< Record > Catalog
Definition: Source.h:223
void defineGaussianFlux(std::string const &name)
Set the measurement used for the GaussianFlux slot.
Definition: Source.h:343
table::Key< int > id
Definition: Detector.cc:162
std::shared_ptr< SourceRecord > copyRecord(BaseRecord const &other)
Deep-copy a record, requiring that it have the same schema as this table.
Definition: Source.h:286
ItemVariant const * other
Definition: Schema.cc:56
SchemaMapper * mapper
Definition: SchemaMapper.cc:78
void definePsfFlux(std::string const &name)
Set the measurement used for the PsfFlux slot.
Definition: Source.h:304
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Definition: fits.h:297
std::string getCentroidDefinition() const
Return the name of the field used for the Centroid slot.
Definition: Source.h:386
ndarray::Array< double, 1 > const getY() const
Definition: Source.h:605
ndarray::Array< double, 1 > const getX() const
Definition: Source.h:602
table::Key< table::Array< std::uint8_t > > wcs
Definition: SkyWcs.cc:71
An aggregate containing all of the current slots used in SourceTable.
Definition: slots.h:219
STL class.
SourceRecord(ConstructionToken const &token, detail::RecordData &&data)
Constructor used by SourceTable.
Definition: Source.h:96
ndarray::Array< double, 1 > const getIxy() const
Definition: Source.h:615
ndarray::Array< double, 1 > getGaussianInstFluxErr() const
Get the uncertainty on the GaussianFlux slot measurement.
Definition: Source.h:589
ndarray::Array< double, 1 > getApInstFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:567
ndarray::Array< double, 1 > getGaussianInstFlux() const
Get the value of the GaussianFlux slot measurement.
Definition: Source.h:585
Table class that must contain a unique ID field and a celestial coordinate field. ...
Definition: Simple.h:102
A base class for image defects.
char * data
Definition: BaseRecord.cc:62
Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID.
Definition: fwd.h:63
std::shared_ptr< SourceTable const > getTable() const
Definition: Source.h:104
int contains(Schema const &other, int flags=EQUAL_KEYS) const
Test whether the given schema is a subset of this.
Definition: Schema.cc:679
static SourceColumnViewT make(std::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
Definition: Source.h:621
CentroidSlotDefinition::MeasKey getCentroidKey() const
Return the key used for the Centroid slot measurement value.
Definition: Source.h:410
table::Schema schema
Definition: Amplifier.cc:115
ndarray::Array< double, 1 > const getIxx() const
Definition: Source.h:609
bool hasShapeSlot() const
Return true if the Shape slot corresponds to a valid field.
Definition: Source.h:475
Key< U > key
Definition: Schema.cc:281
static Schema makeMinimalSchema()
Return a minimal schema for Source tables and records.
Definition: Source.h:260
SourceColumnViewT< SourceRecord > SourceColumnView
Definition: fwd.h:83
T static_pointer_cast(T... args)
SortedCatalogT< SourceRecord > Catalog
Definition: Source.h:84
std::shared_ptr< SourceRecord > copyRecord(BaseRecord const &other, SchemaMapper const &mapper)
Deep-copy a record, requiring that it have the same schema as this table.
Definition: Source.h:291
ndarray::Array< double, 1 > getPsfInstFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:562
SortedCatalogT< Record const > ConstCatalog
Definition: Source.h:224
Class to describe the properties of a detected object from an image.
Definition: Footprint.h:62
void defineModelFlux(std::string const &name)
Set the measurement used for the ModelFlux slot.
Definition: Source.h:317
SourceFitsFlags
Bitflags to be passed to SourceCatalog::readFits and SourceCatalog::writeFits.
Definition: Source.h:54
Table class that contains measurements made on a single exposure.
Definition: Source.h:219
static std::shared_ptr< SourceTable > make(Schema const &schema)
Construct a new table.
Definition: Source.h:246
Definition: __init__.py:1
Key< Flag > getCentroidFlagKey() const
Return the key used for the Centroid slot failure flag.
Definition: Source.h:434
CentroidSlotDefinition::ErrKey getCentroidErrKey() const
Return the key used for the Centroid slot uncertainty.
Definition: Source.h:423
Base class for all records.
Definition: BaseRecord.h:31
A class used as a handle to a particular field in a table.
Definition: fwd.h:45
Key specialization for Flag.
Definition: Flag.h:94
ndarray::Array< double, 1 > getModelInstFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:580
void setFootprint(std::shared_ptr< Footprint > const &footprint)
Definition: Source.h:102
Eigen::Matrix< float, 3, 3 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:170
SlotDefinition specialization for centroids.
Definition: slots.h:120
Read/write heavy footprints as non-heavy footprints.
Definition: Source.h:56
lsst::afw::detection::Footprint Footprint
Definition: Source.h:59
ShapeSlotDefinition::MeasKey getShapeKey() const
Return the key used for the Shape slot measurement value.
Definition: Source.h:486
Do not read/write footprints at all.
Definition: Source.h:55
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:447
static Key< RecordId > getParentKey()
Key for the parent ID.
Definition: Source.h:275
std::shared_ptr< SourceTable > clone() const
Return a polymorphic deep copy of the table.
Definition: Source.h:278
FluxSlotDefinition const & getPsfFluxSlot() const
Definition: Source.h:295
void defineCentroid(std::string const &name)
Set the measurement used for the Centroid slot.
Definition: Source.h:369
double ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:76
FluxSlotDefinition const & getModelFluxSlot() const
Definition: Source.h:308
ndarray::Array< double, 1 > getApInstFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:571
Record class that must contain a unique ID field and a celestial coordinate field.
Definition: Simple.h:48
ndarray::Array< double, 1 > getPsfInstFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:558
SlotDefinition specialization for shapes.
Definition: slots.h:167
CentroidSlotDefinition const & getCentroidSlot() const
Definition: Source.h:360
ndarray::Array< double, 1 > const getIyy() const
Definition: Source.h:612
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys...
Definition: aggregates.h:282
double MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:75
ShapeSlotDefinition::ErrKey getShapeErrKey() const
Return the key used for the Shape slot uncertainty.
Definition: Source.h:497
SlotDefinition specialization for fluxes.
Definition: slots.h:73
Key< Flag > getShapeFlagKey() const
Return the key used for the Shape slot failure flag.
Definition: Source.h:508
ndarray::Array< double, 1 > getModelInstFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:576
void defineApFlux(std::string const &name)
Set the measurement used for the ApFlux slot.
Definition: Source.h:330
ndarray::Array< double, 1 > getCalibInstFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:598
std::string getShapeDefinition() const
Return the name of the field used for the Shape slot.
Definition: Source.h:464
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid SourceTable schema.
Definition: Source.h:272
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:222
std::shared_ptr< SourceRecord > makeRecord()
Default-construct an associated record.
Definition: Source.h:281
Eigen::Matrix< float, 2, 2 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:123