LSSTApplications  20.0.0
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 
116 
119 
121  bool getPsfFluxFlag() const;
122 
125 
128 
130  bool getModelFluxFlag() const;
131 
134 
137 
139  bool getApFluxFlag() const;
140 
143 
146 
148  bool getGaussianFluxFlag() const;
149 
152 
155 
157  bool getCalibFluxFlag() const;
158 
161 
164 
166  bool getCentroidFlag() const;
167 
170 
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;
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 
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 
278  std::shared_ptr<SourceTable> clone() const { return std::static_pointer_cast<SourceTable>(_clone()); }
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-22814
387  return getSchema().getAliasMap()->get(getCentroidSlot().getAlias());
388  }
389 
395  [[deprecated("Use `getCentroidSlot().isValid()` instead. To be removed after 20.0.0.")]] // DM-22814
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-22814
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-22814
424  return getCentroidSlot().getErrKey();
425  }
426 
432  [[deprecated("Use `getCentroidSlot().getFlagKey()` instead. To be removed after 20.0.0.")]] // DM-22814
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-22814
465  return getSchema().getAliasMap()->get(getShapeSlot().getAlias());
466  }
467 
473  [[deprecated("Use `getShapeSlot().isValid()` instead. To be removed after 20.0.0.")]] // DM-22814
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-22814
486  getShapeKey() const {
487  return getShapeSlot().getMeasKey();
488  }
489 
495  [[deprecated("Use `getShapeSlot().getErrKey()` instead. To be removed after 20.0.0.")]] // DM-22814
497  getShapeErrKey() const {
498  return getShapeSlot().getErrKey();
499  }
500 
506  [[deprecated("Use `getShapeSlot().getFlagKey()` instead. To be removed after 20.0.0.")]] // DM-22814
507  Key<Flag>
508  getShapeFlagKey() const {
509  return getShapeSlot().getFlagKey();
510  }
511 
512  SourceTable &operator=(SourceTable const &) = delete;
514 
515 protected:
516  SourceTable(Schema const &schema, std::shared_ptr<IdFactory> const &idFactory);
517 
518  SourceTable(SourceTable const &other);
520 
521  void handleAliasChange(std::string const &alias) override;
522 
523  std::shared_ptr<BaseTable> _clone() const override;
524 
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 
630  ~SourceColumnViewT() = default;
631 
632 protected:
633  explicit SourceColumnViewT(BaseColumnView const &base) : ColumnViewT<RecordT>(base) {}
634 };
635 
636 typedef SourceColumnViewT<SourceRecord> SourceColumnView;
637 
639  return this->get(getTable()->getPsfFluxSlot().getMeasKey());
640 }
641 
643  return this->get(getTable()->getPsfFluxSlot().getErrKey());
644 }
645 
646 inline bool SourceRecord::getPsfFluxFlag() const {
647  return this->get(getTable()->getPsfFluxSlot().getFlagKey());
648 }
649 
651  return this->get(getTable()->getModelFluxSlot().getMeasKey());
652 }
653 
655  return this->get(getTable()->getModelFluxSlot().getErrKey());
656 }
657 
658 inline bool SourceRecord::getModelFluxFlag() const {
659  return this->get(getTable()->getModelFluxSlot().getFlagKey());
660 }
661 
663  return this->get(getTable()->getApFluxSlot().getMeasKey());
664 }
665 
667  return this->get(getTable()->getApFluxSlot().getErrKey());
668 }
669 
670 inline bool SourceRecord::getApFluxFlag() const {
671  return this->get(getTable()->getApFluxSlot().getFlagKey());
672 }
673 
675  return this->get(getTable()->getGaussianFluxSlot().getMeasKey());
676 }
677 
679  return this->get(getTable()->getGaussianFluxSlot().getErrKey());
680 }
681 
683  return this->get(getTable()->getGaussianFluxSlot().getFlagKey());
684 }
685 
687  return this->get(getTable()->getCalibFluxSlot().getMeasKey());
688 }
689 
691  return this->get(getTable()->getCalibFluxSlot().getErrKey());
692 }
693 
694 inline bool SourceRecord::getCalibFluxFlag() const {
695  return this->get(getTable()->getCalibFluxSlot().getFlagKey());
696 }
697 
699  return this->get(getTable()->getCentroidSlot().getMeasKey());
700 }
701 
703  return this->get(getTable()->getCentroidSlot().getErrKey());
704 }
705 
706 inline bool SourceRecord::getCentroidFlag() const {
707  return this->get(getTable()->getCentroidSlot().getFlagKey());
708 }
709 
711  return this->get(getTable()->getShapeSlot().getMeasKey());
712 }
713 
715  return this->get(getTable()->getShapeSlot().getErrKey());
716 }
717 
718 inline bool SourceRecord::getShapeFlag() const { return this->get(getTable()->getShapeSlot().getFlagKey()); }
719 
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
lsst::afw::table::SourceRecord::setParent
void setParent(RecordId id)
Definition: Source.h:721
lsst::afw::table::ShapeSlotDefinition::getMeasKey
MeasKey getMeasKey() const
Return the cached Key used to access the slot measurement.
Definition: slots.h:181
schema
table::Schema schema
Definition: Amplifier.cc:115
lsst::afw::table::ShapeSlotDefinition::getErrKey
ErrKey getErrKey() const
Return the cached Key used to access the slot uncertainty.
Definition: slots.h:184
lsst::afw::table::FluxSlotDefinition::ErrValue
double ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:76
Simple.h
lsst::afw::table::SourceColumnViewT::Table
RecordT::Table Table
Definition: Source.h:552
lsst::afw::table::SourceTable::Record
SourceRecord Record
Definition: Source.h:221
lsst::afw::table::SourceTable::getModelFluxSlot
FluxSlotDefinition const & getModelFluxSlot() const
Definition: Source.h:308
lsst::afw::table::SourceFitsFlags
SourceFitsFlags
Bitflags to be passed to SourceCatalog::readFits and SourceCatalog::writeFits.
Definition: Source.h:54
lsst::afw::table::CentroidSlotDefinition::isValid
bool isValid() const
Return true if the key associated with the measurement is valid.
Definition: slots.h:131
std::string
STL class.
std::shared_ptr
STL class.
lsst::afw::table::SourceTable::_clone
std::shared_ptr< BaseTable > _clone() const override
Clone implementation with noncovariant return types.
Definition: Source.cc:419
lsst::afw::table::SourceTable::make
static std::shared_ptr< SourceTable > make(Schema const &schema, std::shared_ptr< IdFactory > const &idFactory)
Construct a new table.
Definition: Source.cc:382
lsst::afw::table::SourceTable::getCentroidSlot
CentroidSlotDefinition const & getCentroidSlot() const
Definition: Source.h:360
lsst::afw::table::SourceTable::defineCentroid
void defineCentroid(std::string const &name)
Set the measurement used for the Centroid slot.
Definition: Source.h:369
lsst::afw::table::SourceColumnViewT::SourceColumnViewT
SourceColumnViewT(SourceColumnViewT const &)=default
lsst::afw::table::SourceRecord
Record class that contains measurements made on a single exposure.
Definition: Source.h:80
lsst::afw::table::BaseRecord::get
Field< T >::Value get(Key< T > const &key) const
Return the value of a field for the given key.
Definition: BaseRecord.h:151
lsst::afw::table::SourceRecord::getApFluxFlag
bool getApFluxFlag() const
Return true if the measurement in the ApFlux slot failed.
Definition: Source.h:670
lsst::afw::table::SourceRecord::getCentroid
CentroidSlotDefinition::MeasValue getCentroid() const
Get the value of the Centroid slot measurement.
Definition: Source.h:698
lsst::afw::table::ColumnViewT
Definition: BaseColumnView.h:170
lsst::afw::table::SourceRecord::getPsfFluxFlag
bool getPsfFluxFlag() const
Return true if the measurement in the PsfFlux slot failed.
Definition: Source.h:646
base
Definition: __init__.py:1
lsst::afw::table::SourceColumnViewT::getPsfInstFluxErr
ndarray::Array< double, 1 > getPsfInstFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:562
lsst::afw::table::SourceRecord::getCalibInstFlux
FluxSlotDefinition::MeasValue getCalibInstFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:686
wcs
table::Key< table::Array< std::uint8_t > > wcs
Definition: SkyWcs.cc:71
lsst::afw::fits::Fits
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Definition: fits.h:297
lsst::afw::table::SourceTable::defineCalibFlux
void defineCalibFlux(std::string const &name)
Set the measurement used for the CalibFlux slot.
Definition: Source.h:356
lsst::afw::table::SourceTable::makeMinimalSchema
static Schema makeMinimalSchema()
Return a minimal schema for Source tables and records.
Definition: Source.h:260
lsst::afw::table::SourceColumnViewT::getApInstFluxErr
ndarray::Array< double, 1 > getApInstFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:571
lsst::afw::table::SourceRecord::getIyy
double getIyy() const
Return the shape slot Iyy value.
Definition: Source.h:725
lsst::afw::table::IdFactory::makeSimple
static std::shared_ptr< IdFactory > makeSimple()
Return a simple IdFactory that simply counts from 1.
Definition: IdFactory.cc:70
lsst::afw::table::SlotSuite::defApFlux
FluxSlotDefinition defApFlux
Definition: slots.h:221
lsst::afw::table._match.first
first
Definition: _match.py:76
lsst::afw::table::SourceColumnViewT::make
static SourceColumnViewT make(std::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
Definition: Source.h:621
lsst::afw
Definition: imageAlgorithm.dox:1
lsst::afw::table::SourceTable::hasShapeSlot
bool hasShapeSlot() const
Return true if the Shape slot corresponds to a valid field.
Definition: Source.h:475
BaseColumnView.h
lsst::afw::table::SourceColumnViewT::getModelInstFlux
ndarray::Array< double, 1 > getModelInstFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:576
lsst::afw::table::SourceTable::getShapeKey
ShapeSlotDefinition::MeasKey getShapeKey() const
Return the key used for the Shape slot measurement value.
Definition: Source.h:486
lsst::afw::table::SlotSuite::defCalibFlux
FluxSlotDefinition defCalibFlux
Definition: slots.h:224
lsst::afw::table::SourceColumnView
SourceColumnViewT< SourceRecord > SourceColumnView
Definition: fwd.h:83
lsst::afw::table::SourceTable::getParentKey
static Key< RecordId > getParentKey()
Key for the parent ID.
Definition: Source.h:275
lsst::afw::table::ShapeSlotDefinition
SlotDefinition specialization for shapes.
Definition: slots.h:167
lsst::afw::table::SourceRecord::SourceRecord
SourceRecord(ConstructionToken const &token, detail::RecordData &&data)
Constructor used by SourceTable.
Definition: Source.h:96
lsst::afw::table::Schema
Defines the fields and offsets for a table.
Definition: Schema.h:50
lsst::afw::table::BaseColumnView
Column-wise view into a sequence of records that have been allocated contiguously.
Definition: BaseColumnView.h:83
lsst::afw::table::SourceRecord::getGaussianInstFluxErr
FluxSlotDefinition::ErrValue getGaussianInstFluxErr() const
Get the uncertainty on the GaussianFlux slot measurement.
Definition: Source.h:678
lsst::afw::geom.transform.transformContinued.name
string name
Definition: transformContinued.py:32
lsst::afw::table::detail::RecordData
Helper struct that contains the information passed from BaseTable to BaseRecord at construction.
Definition: BaseTable.h:32
aggregates.h
lsst::afw::table::SourceTable::getCentroidFlagKey
Key< Flag > getCentroidFlagKey() const
Return the key used for the Centroid slot failure flag.
Definition: Source.h:434
lsst::afw::table::SourceRecord::getCalibInstFluxErr
FluxSlotDefinition::ErrValue getCalibInstFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:690
lsst::afw::table::SourceTable::SourceTable
SourceTable(Schema const &schema, std::shared_ptr< IdFactory > const &idFactory)
Definition: Source.cc:391
lsst::afw::table::SourceTable::operator=
SourceTable & operator=(SourceTable &&)=delete
lsst::afw::table::CovarianceMatrixKey< float, 2 >
lsst::afw::table::SourceRecord::_assign
virtual void _assign(BaseRecord const &other)
Called by assign() after transferring fields to allow subclass data members to be copied.
Definition: Source.cc:374
lsst::afw::table::SourceRecord::getIxy
double getIxy() const
Return the shape slot Ixy value.
Definition: Source.h:726
lsst::afw::table::SourceColumnViewT::getX
ndarray::Array< double, 1 > const getX() const
Definition: Source.h:602
lsst::afw::table::SourceTable::Catalog
SortedCatalogT< Record > Catalog
Definition: Source.h:223
lsst::afw::table::SourceRecord::getGaussianInstFlux
FluxSlotDefinition::MeasValue getGaussianInstFlux() const
Get the value of the GaussianFlux slot measurement.
Definition: Source.h:674
lsst::afw::table::SourceRecord::SourceRecord
SourceRecord(const SourceRecord &)=delete
lsst::afw::table::SourceTable::copyRecord
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
lsst::afw::table::SourceRecord::getPsfInstFlux
FluxSlotDefinition::MeasValue getPsfInstFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:638
lsst::afw::table::SourceColumnViewT
Definition: fwd.h:65
lsst::afw::table::SourceRecord::getFootprint
std::shared_ptr< Footprint > getFootprint() const
Definition: Source.h:100
lsst::afw::table::SourceTable::getShapeFlagKey
Key< Flag > getShapeFlagKey() const
Return the key used for the Shape slot failure flag.
Definition: Source.h:508
lsst::afw::table::SourceTable::getCentroidErrKey
CentroidSlotDefinition::ErrKey getCentroidErrKey() const
Return the key used for the Centroid slot uncertainty.
Definition: Source.h:423
lsst::afw::table::CentroidSlotDefinition
SlotDefinition specialization for centroids.
Definition: slots.h:120
lsst::afw::table::FluxSlotDefinition
SlotDefinition specialization for fluxes.
Definition: slots.h:73
lsst::afw::table::SourceColumnViewT::SourceColumnViewT
SourceColumnViewT(SourceColumnViewT &&)=default
lsst::afw::table::SlotSuite::defCentroid
CentroidSlotDefinition defCentroid
Definition: slots.h:225
lsst::afw::table::CentroidSlotDefinition::getFlagKey
Key< Flag > getFlagKey() const
Return the cached Key used to access the slot failure flag.
Definition: slots.h:140
lsst::afw::table::PointKey< double >
lsst::afw::table::SourceRecord::ConstCatalog
SortedCatalogT< SourceRecord const > ConstCatalog
Definition: Source.h:85
lsst::afw::table::SourceRecord::ColumnView
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:83
lsst::afw::table::SourceTable::defineModelFlux
void defineModelFlux(std::string const &name)
Set the measurement used for the ModelFlux slot.
Definition: Source.h:317
lsst::afw::table::SourceRecord::getCentroidErr
CentroidSlotDefinition::ErrValue getCentroidErr() const
Get the uncertainty on the Centroid slot measurement.
Definition: Source.h:702
lsst::afw::table::SourceRecord::getShape
ShapeSlotDefinition::MeasValue getShape() const
Get the value of the Shape slot measurement.
Definition: Source.h:710
slots.h
lsst::afw::table::SourceRecord::getApInstFlux
FluxSlotDefinition::MeasValue getApInstFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:662
data
char * data
Definition: BaseRecord.cc:62
lsst::afw::table::SourceColumnViewT::getApInstFlux
ndarray::Array< double, 1 > getApInstFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:567
lsst::afw::table::SOURCE_IO_NO_FOOTPRINTS
@ SOURCE_IO_NO_FOOTPRINTS
Do not read/write footprints at all.
Definition: Source.h:55
lsst::afw::table::SourceColumnViewT::getY
ndarray::Array< double, 1 > const getY() const
Definition: Source.h:605
lsst::afw::table::SourceRecord::getParent
RecordId getParent() const
Convenience accessors for the keys in the minimal source schema.
Definition: Source.h:720
lsst::afw::table::QuadrupoleKey
A FunctorKey used to get or set a geom::ellipses::Quadrupole from a tuple of constituent Keys.
Definition: aggregates.h:282
lsst::afw::table::SourceTable::getApFluxSlot
FluxSlotDefinition const & getApFluxSlot() const
Definition: Source.h:321
lsst::afw::table::SourceColumnViewT::operator=
SourceColumnViewT & operator=(SourceColumnViewT const &)=default
lsst::afw::table::SourceColumnViewT::operator=
SourceColumnViewT & operator=(SourceColumnViewT &&)=default
lsst::afw::table::Footprint
lsst::afw::detection::Footprint Footprint
Definition: Source.h:59
other
ItemVariant const * other
Definition: Schema.cc:56
lsst::afw::table::BaseRecord
Base class for all records.
Definition: BaseRecord.h:31
lsst::afw::table::SourceRecord::getX
double getX() const
Return the centroid slot x coordinate.
Definition: Source.h:722
lsst::afw::table::SlotSuite::defPsfFlux
FluxSlotDefinition defPsfFlux
Definition: slots.h:220
lsst::afw::table::SchemaMapper
A mapping between the keys of two Schemas, used to copy data between them.
Definition: SchemaMapper.h:21
lsst::afw::table::SourceColumnViewT::getGaussianInstFlux
ndarray::Array< double, 1 > getGaussianInstFlux() const
Get the value of the GaussianFlux slot measurement.
Definition: Source.h:585
IdFactory.h
lsst::afw::table::Key
A class used as a handle to a particular field in a table.
Definition: fwd.h:45
lsst::afw::table::FluxSlotDefinition::MeasValue
double MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:75
lsst::afw::table::SourceRecord::getShapeErr
ShapeSlotDefinition::ErrValue getShapeErr() const
Get the uncertainty on the Shape slot measurement.
Definition: Source.h:714
lsst::afw::table::SourceTable::ColumnView
SourceColumnViewT< SourceRecord > ColumnView
Definition: Source.h:222
Footprint.h
lsst::afw::table::SourceRecord::getPsfInstFluxErr
FluxSlotDefinition::ErrValue getPsfInstFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:642
lsst::afw::table::SourceRecord::getModelFluxFlag
bool getModelFluxFlag() const
Return true if the measurement in the ModelFlux slot failed.
Definition: Source.h:658
std::int64_t
lsst::afw::table::CentroidSlotDefinition::getErrKey
ErrKey getErrKey() const
Return the cached Key used to access the slot uncertainty.
Definition: slots.h:137
lsst::afw::table::SourceRecord::getIxx
double getIxx() const
Return the shape slot Ixx value.
Definition: Source.h:724
lsst::afw::table::BaseTable::getSchema
Schema getSchema() const
Return the table's schema.
Definition: BaseTable.h:137
lsst::afw::table::SourceRecord::setFootprint
void setFootprint(std::shared_ptr< Footprint > const &footprint)
Definition: Source.h:102
lsst::afw::table::SourceRecord::getModelInstFluxErr
FluxSlotDefinition::ErrValue getModelInstFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:654
lsst::afw::table::SourceTable::clone
std::shared_ptr< SourceTable > clone() const
Return a polymorphic deep copy of the table.
Definition: Source.h:278
lsst::afw::table::BaseColumnView::make
static BaseColumnView make(std::shared_ptr< BaseTable > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
Definition: BaseColumnView.h:197
lsst::afw::table::SourceRecord::getCentroidFlag
bool getCentroidFlag() const
Return true if the measurement in the Centroid slot failed.
Definition: Source.h:706
lsst::afw::table::SourceRecord::SourceRecord
SourceRecord(SourceRecord &&)=delete
lsst::afw::table::SourceColumnViewT::getCalibInstFlux
ndarray::Array< double, 1 > getCalibInstFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:594
lsst::afw::table::SourceColumnViewT::getPsfInstFlux
ndarray::Array< double, 1 > getPsfInstFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:558
lsst
A base class for image defects.
Definition: imageAlgorithm.dox:1
lsst::afw::table::BaseRecord::ConstructionToken
Definition: BaseRecord.h:38
lsst::afw::table::SourceRecord::Table
SourceTable Table
Definition: Source.h:82
lsst::afw::table::SourceTable::getCalibFluxSlot
FluxSlotDefinition const & getCalibFluxSlot() const
Definition: Source.h:347
lsst::afw::table::SourceRecord::getY
double getY() const
Return the centroid slot y coordinate.
Definition: Source.h:723
lsst::afw::table::SourceRecord::getTable
std::shared_ptr< SourceTable const > getTable() const
Definition: Source.h:104
lsst::afw::table::SourceTable::defineShape
void defineShape(std::string const &name)
Set the measurement used for the Shape slot.
Definition: Source.h:447
lsst::afw::table::SourceTable::checkSchema
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid SourceTable schema.
Definition: Source.h:272
lsst::afw::table::SourceTable::defineGaussianFlux
void defineGaussianFlux(std::string const &name)
Set the measurement used for the GaussianFlux slot.
Definition: Source.h:343
lsst::afw::table::SimpleTable
Table class that must contain a unique ID field and a celestial coordinate field.
Definition: Simple.h:102
lsst::afw::geom::ellipses::Quadrupole
An ellipse core with quadrupole moments as parameters.
Definition: Quadrupole.h:47
lsst::geom
Definition: geomOperators.dox:4
lsst::afw::table::SourceColumnViewT::getCalibInstFluxErr
ndarray::Array< double, 1 > getCalibInstFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:598
lsst::afw::table::SourceColumnViewT::getIxx
ndarray::Array< double, 1 > const getIxx() const
Definition: Source.h:609
lsst::afw::table::SourceColumnViewT::SourceColumnViewT
SourceColumnViewT(BaseColumnView const &base)
Definition: Source.h:633
lsst::afw::table::SourceTable::definePsfFlux
void definePsfFlux(std::string const &name)
Set the measurement used for the PsfFlux slot.
Definition: Source.h:304
lsst::afw::table::SourceRecord::getGaussianFluxFlag
bool getGaussianFluxFlag() const
Return true if the measurement in the GaussianFlux slot failed.
Definition: Source.h:682
lsst::afw::table::SourceRecord::Catalog
SortedCatalogT< SourceRecord > Catalog
Definition: Source.h:84
lsst::afw::table::SourceRecord::getCalibFluxFlag
bool getCalibFluxFlag() const
Return true if the measurement in the CalibFlux slot failed.
Definition: Source.h:694
std
STL namespace.
lsst::afw::table::SourceTable::defineApFlux
void defineApFlux(std::string const &name)
Set the measurement used for the ApFlux slot.
Definition: Source.h:330
lsst::afw::table::SOURCE_IO_NO_HEAVY_FOOTPRINTS
@ SOURCE_IO_NO_HEAVY_FOOTPRINTS
Read/write heavy footprints as non-heavy footprints.
Definition: Source.h:56
key
Key< U > key
Definition: Schema.cc:281
lsst::geom::Point< double, 2 >
lsst::afw::table::io::FitsWriter
Writer object for FITS binary tables.
Definition: FitsWriter.h:25
lsst::afw::table::SourceTable::hasCentroidSlot
bool hasCentroidSlot() const
Return true if the Centroid slot corresponds to a valid field.
Definition: Source.h:397
lsst::afw::table::SourceRecord::getApInstFluxErr
FluxSlotDefinition::ErrValue getApInstFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:666
lsst::afw::table::SourceRecord::operator=
SourceRecord & operator=(const SourceRecord &)=delete
lsst::afw::table::BaseTable::copyRecord
std::shared_ptr< BaseRecord > copyRecord(BaseRecord const &input)
Deep-copy a record, requiring that it have the same schema as this table.
Definition: BaseTable.cc:125
mapper
SchemaMapper * mapper
Definition: SchemaMapper.cc:78
lsst::afw::table::SourceTable
Table class that contains measurements made on a single exposure.
Definition: Source.h:219
lsst::afw::table::SourceColumnViewT::getIyy
ndarray::Array< double, 1 > const getIyy() const
Definition: Source.h:612
lsst::afw::table::SlotSuite
An aggregate containing all of the current slots used in SourceTable.
Definition: slots.h:219
lsst::afw::table::SourceTable::operator=
SourceTable & operator=(SourceTable const &)=delete
lsst::afw::table::SourceRecord::~SourceRecord
~SourceRecord()
lsst::afw::table::SourceTable::getShapeSlot
ShapeSlotDefinition const & getShapeSlot() const
Definition: Source.h:438
lsst::afw::table::SourceTable::_makeRecord
std::shared_ptr< BaseRecord > _makeRecord() override
Default-construct an associated record (protected implementation).
Definition: Source.cc:423
lsst::afw::table::ShapeSlotDefinition::ErrValue
Eigen::Matrix< float, 3, 3 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:170
lsst::afw::table::BaseRecord::getTable
std::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
Definition: BaseRecord.h:83
lsst::afw::table::CentroidSlotDefinition::getMeasKey
MeasKey getMeasKey() const
Return the cached Key used to access the slot measurement.
Definition: slots.h:134
lsst::afw::table::SourceTable::getShapeDefinition
std::string getShapeDefinition() const
Return the name of the field used for the Shape slot.
Definition: Source.h:464
lsst::afw::table::Schema::disconnectAliases
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
Definition: Schema.cc:729
lsst::afw::table::ShapeSlotDefinition::getFlagKey
Key< Flag > getFlagKey() const
Return the cached Key used to access the slot failure flag.
Definition: slots.h:187
lsst::afw::table::SlotSuite::defGaussianFlux
FluxSlotDefinition defGaussianFlux
Definition: slots.h:222
lsst::afw::table::SourceTable::ConstCatalog
SortedCatalogT< Record const > ConstCatalog
Definition: Source.h:224
FitsWriter.h
lsst::afw::table::SourceRecord::getShapeFlag
bool getShapeFlag() const
Return true if the measurement in the Shape slot failed.
Definition: Source.h:718
lsst::afw::table::ShapeSlotDefinition::isValid
bool isValid() const
Return true if the key associated with the measurement is valid.
Definition: slots.h:178
lsst::afw::table::CentroidSlotDefinition::ErrValue
Eigen::Matrix< float, 2, 2 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:123
lsst::afw::table::SourceTable::makeRecord
std::shared_ptr< SourceRecord > makeRecord()
Default-construct an associated record.
Definition: Source.h:281
lsst::afw::table::SourceTable::getShapeErrKey
ShapeSlotDefinition::ErrKey getShapeErrKey() const
Return the key used for the Shape slot uncertainty.
Definition: Source.h:497
lsst::afw::table::SourceColumnViewT::getGaussianInstFluxErr
ndarray::Array< double, 1 > getGaussianInstFluxErr() const
Get the uncertainty on the GaussianFlux slot measurement.
Definition: Source.h:589
lsst::afw::table::SimpleRecord
Record class that must contain a unique ID field and a celestial coordinate field.
Definition: Simple.h:48
lsst::afw::table::BaseRecord::set
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Definition: BaseRecord.h:164
lsst::afw::table::SourceTable::copyRecord
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
lsst::afw::detection::Footprint
Class to describe the properties of a detected object from an image.
Definition: Footprint.h:63
Catalog.h
lsst::afw::table::SourceRecord::getModelInstFlux
FluxSlotDefinition::MeasValue getModelInstFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:650
lsst::afw::table::SourceTable::getGaussianFluxSlot
FluxSlotDefinition const & getGaussianFluxSlot() const
Definition: Source.h:334
lsst::afw::table::Schema::getAliasMap
std::shared_ptr< AliasMap > getAliasMap() const
Return the map of aliases.
Definition: Schema.h:269
lsst::afw::table::SourceColumnViewT::getModelInstFluxErr
ndarray::Array< double, 1 > getModelInstFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:580
lsst::afw::table::SourceTable::getPsfFluxSlot
FluxSlotDefinition const & getPsfFluxSlot() const
Definition: Source.h:295
lsst::afw::table::SourceTable::make
static std::shared_ptr< SourceTable > make(Schema const &schema)
Construct a new table.
Definition: Source.h:246
lsst::afw::table::SourceColumnViewT::Record
RecordT Record
Definition: Source.h:551
lsst::afw::table::SourceColumnViewT::~SourceColumnViewT
~SourceColumnViewT()=default
lsst::afw::table::SourceRecord::updateCoord
void updateCoord(geom::SkyWcs const &wcs)
Update the coord field using the given Wcs and the field in the centroid slot.
Definition: Source.cc:368
lsst::afw::table::SortedCatalogT
Custom catalog class for record/table subclasses that are guaranteed to have an ID,...
Definition: fwd.h:63
lsst::afw::table::Key< Flag >
Key specialization for Flag.
Definition: Flag.h:94
lsst::afw::table::SourceTable::getCentroidKey
CentroidSlotDefinition::MeasKey getCentroidKey() const
Return the key used for the Centroid slot measurement value.
Definition: Source.h:410
lsst::afw::table::SourceColumnViewT::getIxy
ndarray::Array< double, 1 > const getIxy() const
Definition: Source.h:615
lsst::afw::table::SourceTable::getCentroidDefinition
std::string getCentroidDefinition() const
Return the name of the field used for the Centroid slot.
Definition: Source.h:386
lsst::afw::table::SlotSuite::defShape
ShapeSlotDefinition defShape
Definition: slots.h:226
lsst::afw::table::SlotSuite::defModelFlux
FluxSlotDefinition defModelFlux
Definition: slots.h:223
lsst::afw::table::SourceRecord::operator=
SourceRecord & operator=(SourceRecord &&)=delete
lsst::afw::table::SourceTable::handleAliasChange
void handleAliasChange(std::string const &alias) override
Definition: Source.cc:398