LSSTApplications  19.0.0-14-gb0260a2+72efe9b372,20.0.0+7927753e06,20.0.0+8829bf0056,20.0.0+995114c5d2,20.0.0+b6f4b2abd1,20.0.0+bddc4f4cbe,20.0.0-1-g253301a+8829bf0056,20.0.0-1-g2b7511a+0d71a2d77f,20.0.0-1-g5b95a8c+7461dd0434,20.0.0-12-g321c96ea+23efe4bbff,20.0.0-16-gfab17e72e+fdf35455f6,20.0.0-2-g0070d88+ba3ffc8f0b,20.0.0-2-g4dae9ad+ee58a624b3,20.0.0-2-g61b8584+5d3db074ba,20.0.0-2-gb780d76+d529cf1a41,20.0.0-2-ged6426c+226a441f5f,20.0.0-2-gf072044+8829bf0056,20.0.0-2-gf1f7952+ee58a624b3,20.0.0-20-geae50cf+e37fec0aee,20.0.0-25-g3dcad98+544a109665,20.0.0-25-g5eafb0f+ee58a624b3,20.0.0-27-g64178ef+f1f297b00a,20.0.0-3-g4cc78c6+e0676b0dc8,20.0.0-3-g8f21e14+4fd2c12c9a,20.0.0-3-gbd60e8c+187b78b4b8,20.0.0-3-gbecbe05+48431fa087,20.0.0-38-ge4adf513+a12e1f8e37,20.0.0-4-g97dc21a+544a109665,20.0.0-4-gb4befbc+087873070b,20.0.0-4-gf910f65+5d3db074ba,20.0.0-5-gdfe0fee+199202a608,20.0.0-5-gfbfe500+d529cf1a41,20.0.0-6-g64f541c+d529cf1a41,20.0.0-6-g9a5b7a1+a1cd37312e,20.0.0-68-ga3f3dda+5fca18c6a4,20.0.0-9-g4aef684+e18322736b,w.2020.45
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 
373  ShapeSlotDefinition const &getShapeSlot() const { return _slots.defShape; }
374 
382  void defineShape(std::string const &name) {
383  getSchema().getAliasMap()->set(getShapeSlot().getAlias(), name);
384  }
385 
386  SourceTable &operator=(SourceTable const &) = delete;
388 
389 protected:
390  SourceTable(Schema const &schema, std::shared_ptr<IdFactory> const &idFactory);
391 
392  SourceTable(SourceTable const &other);
394 
395  void handleAliasChange(std::string const &alias) override;
396 
397  std::shared_ptr<BaseTable> _clone() const override;
398 
400 
401 private:
402  // Struct that holds the minimal schema and the special keys we've added to it.
403  struct MinimalSchema {
404  Schema schema;
405  Key<RecordId> parent;
406 
407  MinimalSchema();
408  };
409 
410  // Return the singleton minimal schema.
411  static MinimalSchema &getMinimalSchema();
412 
413  friend class io::FitsWriter;
414  friend class SourceRecord;
415 
416  // Return a writer object that knows how to save in FITS format. See also FitsWriter.
417  std::shared_ptr<io::FitsWriter> makeFitsWriter(fits::Fits *fitsfile, int flags) const override;
418 
419  SlotSuite _slots;
420 };
421 
422 template <typename RecordT>
423 class SourceColumnViewT : public ColumnViewT<RecordT> {
424 public:
425  typedef RecordT Record;
426  typedef typename RecordT::Table Table;
427 
428  // See the documentation for BaseColumnView for an explanation of why these
429  // accessors *appear* to violate const-correctness.
430 
432  ndarray::Array<double, 1> getPsfInstFlux() const {
433  return this->operator[](this->getTable()->getPsfFluxSlot().getMeasKey());
434  }
436  ndarray::Array<double, 1> getPsfInstFluxErr() const {
437  return this->operator[](this->getTable()->getPsfFluxSlot().getErrKey());
438  }
439 
441  ndarray::Array<double, 1> getApInstFlux() const {
442  return this->operator[](this->getTable()->getApFluxSlot().getMeasKey());
443  }
445  ndarray::Array<double, 1> getApInstFluxErr() const {
446  return this->operator[](this->getTable()->getApFluxSlot().getErrKey());
447  }
448 
450  ndarray::Array<double, 1> getModelInstFlux() const {
451  return this->operator[](this->getTable()->getModelFluxSlot().getMeasKey());
452  }
454  ndarray::Array<double, 1> getModelInstFluxErr() const {
455  return this->operator[](this->getTable()->getModelFluxSlot().getErrKey());
456  }
457 
459  ndarray::Array<double, 1> getGaussianInstFlux() const {
460  return this->operator[](this->getTable()->getGaussianFluxSlot().getMeasKey());
461  }
463  ndarray::Array<double, 1> getGaussianInstFluxErr() const {
464  return this->operator[](this->getTable()->getGaussianFluxSlot().getErrKey());
465  }
466 
468  ndarray::Array<double, 1> getCalibInstFlux() const {
469  return this->operator[](this->getTable()->getCalibFluxSlot().getMeasKey());
470  }
472  ndarray::Array<double, 1> getCalibInstFluxErr() const {
473  return this->operator[](this->getTable()->getCalibFluxSlot().getErrKey());
474  }
475 
476  ndarray::Array<double, 1> const getX() const {
477  return this->operator[](this->getTable()->getCentroidSlot().getMeasKey().getX());
478  }
479  ndarray::Array<double, 1> const getY() const {
480  return this->operator[](this->getTable()->getCentroidSlot().getMeasKey().getY());
481  }
482 
483  ndarray::Array<double, 1> const getIxx() const {
484  return this->operator[](this->getTable()->getShapeSlot().getMeasKey().getIxx());
485  }
486  ndarray::Array<double, 1> const getIyy() const {
487  return this->operator[](this->getTable()->getShapeSlot().getMeasKey().getIyy());
488  }
489  ndarray::Array<double, 1> const getIxy() const {
490  return this->operator[](this->getTable()->getShapeSlot().getMeasKey().getIxy());
491  }
492 
494  template <typename InputIterator>
495  static SourceColumnViewT make(std::shared_ptr<Table> const &table, InputIterator first,
496  InputIterator last) {
497  return SourceColumnViewT(BaseColumnView::make(table, first, last));
498  }
499 
504  ~SourceColumnViewT() = default;
505 
506 protected:
507  explicit SourceColumnViewT(BaseColumnView const &base) : ColumnViewT<RecordT>(base) {}
508 };
509 
510 typedef SourceColumnViewT<SourceRecord> SourceColumnView;
511 
513  return this->get(getTable()->getPsfFluxSlot().getMeasKey());
514 }
515 
517  return this->get(getTable()->getPsfFluxSlot().getErrKey());
518 }
519 
520 inline bool SourceRecord::getPsfFluxFlag() const {
521  return this->get(getTable()->getPsfFluxSlot().getFlagKey());
522 }
523 
525  return this->get(getTable()->getModelFluxSlot().getMeasKey());
526 }
527 
529  return this->get(getTable()->getModelFluxSlot().getErrKey());
530 }
531 
532 inline bool SourceRecord::getModelFluxFlag() const {
533  return this->get(getTable()->getModelFluxSlot().getFlagKey());
534 }
535 
537  return this->get(getTable()->getApFluxSlot().getMeasKey());
538 }
539 
541  return this->get(getTable()->getApFluxSlot().getErrKey());
542 }
543 
544 inline bool SourceRecord::getApFluxFlag() const {
545  return this->get(getTable()->getApFluxSlot().getFlagKey());
546 }
547 
549  return this->get(getTable()->getGaussianFluxSlot().getMeasKey());
550 }
551 
553  return this->get(getTable()->getGaussianFluxSlot().getErrKey());
554 }
555 
557  return this->get(getTable()->getGaussianFluxSlot().getFlagKey());
558 }
559 
561  return this->get(getTable()->getCalibFluxSlot().getMeasKey());
562 }
563 
565  return this->get(getTable()->getCalibFluxSlot().getErrKey());
566 }
567 
568 inline bool SourceRecord::getCalibFluxFlag() const {
569  return this->get(getTable()->getCalibFluxSlot().getFlagKey());
570 }
571 
573  return this->get(getTable()->getCentroidSlot().getMeasKey());
574 }
575 
577  return this->get(getTable()->getCentroidSlot().getErrKey());
578 }
579 
580 inline bool SourceRecord::getCentroidFlag() const {
581  return this->get(getTable()->getCentroidSlot().getFlagKey());
582 }
583 
585  return this->get(getTable()->getShapeSlot().getMeasKey());
586 }
587 
589  return this->get(getTable()->getShapeSlot().getErrKey());
590 }
591 
592 inline bool SourceRecord::getShapeFlag() const { return this->get(getTable()->getShapeSlot().getFlagKey()); }
593 
596 inline double SourceRecord::getX() const { return get(getTable()->getCentroidSlot().getMeasKey().getX()); }
597 inline double SourceRecord::getY() const { return get(getTable()->getCentroidSlot().getMeasKey().getY()); }
598 inline double SourceRecord::getIxx() const { return get(getTable()->getShapeSlot().getMeasKey().getIxx()); }
599 inline double SourceRecord::getIyy() const { return get(getTable()->getShapeSlot().getMeasKey().getIyy()); }
600 inline double SourceRecord::getIxy() const { return get(getTable()->getShapeSlot().getMeasKey().getIxy()); }
601 
602 } // namespace table
603 } // namespace afw
604 } // namespace lsst
605 
606 #endif // !AFW_TABLE_Source_h_INCLUDED
lsst::afw::table::SourceRecord::setParent
void setParent(RecordId id)
Definition: Source.h:595
schema
table::Schema schema
Definition: Amplifier.cc:115
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:426
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
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:544
lsst::afw::table::SourceRecord::getCentroid
CentroidSlotDefinition::MeasValue getCentroid() const
Get the value of the Centroid slot measurement.
Definition: Source.h:572
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:520
lsst::afw::table::SourceColumnViewT::getPsfInstFluxErr
ndarray::Array< double, 1 > getPsfInstFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:436
lsst::afw::table::SourceRecord::getCalibInstFlux
FluxSlotDefinition::MeasValue getCalibInstFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:560
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:445
lsst::afw::table::SourceRecord::getIyy
double getIyy() const
Return the shape slot Iyy value.
Definition: Source.h:599
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:74
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:495
lsst::afw
Definition: imageAlgorithm.dox:1
BaseColumnView.h
lsst::afw::table::SourceColumnViewT::getModelInstFlux
ndarray::Array< double, 1 > getModelInstFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:450
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:552
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::SourceRecord::getCalibInstFluxErr
FluxSlotDefinition::ErrValue getCalibInstFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:564
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::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:600
lsst::afw::table::SourceColumnViewT::getX
ndarray::Array< double, 1 > const getX() const
Definition: Source.h:476
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:548
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:512
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::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::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:576
lsst::afw::table::SourceRecord::getShape
ShapeSlotDefinition::MeasValue getShape() const
Get the value of the Shape slot measurement.
Definition: Source.h:584
slots.h
lsst::afw::table::SourceRecord::getApInstFlux
FluxSlotDefinition::MeasValue getApInstFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:536
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:441
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:479
lsst::afw::table::SourceRecord::getParent
RecordId getParent() const
Convenience accessors for the keys in the minimal source schema.
Definition: Source.h:594
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:596
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:459
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:588
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:516
lsst::afw::table::SourceRecord::getModelFluxFlag
bool getModelFluxFlag() const
Return true if the measurement in the ModelFlux slot failed.
Definition: Source.h:532
std::int64_t
lsst::afw::table::SourceRecord::getIxx
double getIxx() const
Return the shape slot Ixx value.
Definition: Source.h:598
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:528
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:580
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:468
lsst::afw::table::SourceColumnViewT::getPsfInstFlux
ndarray::Array< double, 1 > getPsfInstFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:432
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:597
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:382
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: AffineTransform.h:36
lsst::afw::table::SourceColumnViewT::getCalibInstFluxErr
ndarray::Array< double, 1 > getCalibInstFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:472
lsst::afw::table::SourceColumnViewT::getIxx
ndarray::Array< double, 1 > const getIxx() const
Definition: Source.h:483
lsst::afw::table::SourceColumnViewT::SourceColumnViewT
SourceColumnViewT(BaseColumnView const &base)
Definition: Source.h:507
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:556
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:568
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::SourceRecord::getApInstFluxErr
FluxSlotDefinition::ErrValue getApInstFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:540
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:486
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:373
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::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::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:592
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::SourceColumnViewT::getGaussianInstFluxErr
ndarray::Array< double, 1 > getGaussianInstFluxErr() const
Get the uncertainty on the GaussianFlux slot measurement.
Definition: Source.h:463
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:524
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:454
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:425
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::SourceColumnViewT::getIxy
ndarray::Array< double, 1 > const getIxy() const
Definition: Source.h:489
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