LSST Applications  21.0.0-172-gfb10e10a+18fedfabac,22.0.0+297cba6710,22.0.0+80564b0ff1,22.0.0+8d77f4f51a,22.0.0+a28f4c53b1,22.0.0+dcf3732eb2,22.0.1-1-g7d6de66+2a20fdde0d,22.0.1-1-g8e32f31+297cba6710,22.0.1-1-geca5380+7fa3b7d9b6,22.0.1-12-g44dc1dc+2a20fdde0d,22.0.1-15-g6a90155+515f58c32b,22.0.1-16-g9282f48+790f5f2caa,22.0.1-2-g92698f7+dcf3732eb2,22.0.1-2-ga9b0f51+7fa3b7d9b6,22.0.1-2-gd1925c9+bf4f0e694f,22.0.1-24-g1ad7a390+a9625a72a8,22.0.1-25-g5bf6245+3ad8ecd50b,22.0.1-25-gb120d7b+8b5510f75f,22.0.1-27-g97737f7+2a20fdde0d,22.0.1-32-gf62ce7b1+aa4237961e,22.0.1-4-g0b3f228+2a20fdde0d,22.0.1-4-g243d05b+871c1b8305,22.0.1-4-g3a563be+32dcf1063f,22.0.1-4-g44f2e3d+9e4ab0f4fa,22.0.1-42-gca6935d93+ba5e5ca3eb,22.0.1-5-g15c806e+85460ae5f3,22.0.1-5-g58711c4+611d128589,22.0.1-5-g75bb458+99c117b92f,22.0.1-6-g1c63a23+7fa3b7d9b6,22.0.1-6-g50866e6+84ff5a128b,22.0.1-6-g8d3140d+720564cf76,22.0.1-6-gd805d02+cc5644f571,22.0.1-8-ge5750ce+85460ae5f3,master-g6e05de7fdc+babf819c66,master-g99da0e417a+8d77f4f51a,w.2021.48
LSST Data Management Base Package
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 
29 #include "lsst/afw/table/Simple.h"
32 #include "lsst/afw/table/Catalog.h"
34 #include "lsst/afw/table/slots.h"
36 
37 namespace lsst {
38 namespace afw {
39 
40 namespace geom {
41 class SkyWcs;
42 } // namespace geom
43 
44 namespace table {
45 
55 };
56 
58 
59 class SourceRecord;
60 class SourceTable;
61 
62 template <typename RecordT>
63 class SourceColumnViewT;
64 
78 class SourceRecord : public SimpleRecord {
79 public:
80  using Table = SourceTable;
84 
95  SimpleRecord(token, std::move(data))
96  {}
97 
98  std::shared_ptr<Footprint> getFootprint() const { return _footprint; }
99 
100  void setFootprint(std::shared_ptr<Footprint> const &footprint) { _footprint = footprint; }
101 
103  return std::static_pointer_cast<SourceTable const>(BaseRecord::getTable());
104  }
105 
107  RecordId getParent() const;
109  void setParent(RecordId id);
111 
114 
117 
119  bool getPsfFluxFlag() const;
120 
123 
126 
128  bool getModelFluxFlag() const;
129 
132 
135 
137  bool getApFluxFlag() const;
138 
141 
144 
146  bool getGaussianFluxFlag() const;
147 
150 
153 
155  bool getCalibFluxFlag() const;
156 
159 
162 
164  bool getCentroidFlag() const;
165 
168 
171 
173  bool getShapeFlag() const;
174 
176  double getX() const;
177 
179  double getY() const;
180 
182  double getIxx() const;
183 
185  double getIyy() const;
186 
188  double getIxy() const;
189 
191  void updateCoord(geom::SkyWcs const &wcs);
192 
194  void updateCoord(geom::SkyWcs const &wcs, PointKey<double> const &key);
195 
196  SourceRecord(const SourceRecord &) = delete;
197  SourceRecord &operator=(const SourceRecord &) = delete;
201 
202 protected:
203 
204  virtual void _assign(BaseRecord const &other);
205 
206 private:
207  friend class SourceTable;
208 
209  std::shared_ptr<Footprint> _footprint;
210 };
211 
217 class SourceTable : public SimpleTable {
218 public:
223 
235  std::shared_ptr<IdFactory> const &idFactory);
236 
245  return make(schema, IdFactory::makeSimple());
246  }
247 
259  Schema r = getMinimalSchema().schema;
260  r.disconnectAliases();
261  return r;
262  }
263 
270  static bool checkSchema(Schema const &other) { return other.contains(getMinimalSchema().schema); }
271 
273  static Key<RecordId> getParentKey() { return getMinimalSchema().parent; }
274 
276  std::shared_ptr<SourceTable> clone() const { return std::static_pointer_cast<SourceTable>(_clone()); }
277 
280  return std::static_pointer_cast<SourceRecord>(_makeRecord());
281  }
282 
285  return std::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other));
286  }
287 
290  return std::static_pointer_cast<SourceRecord>(BaseTable::copyRecord(other, mapper));
291  }
292 
293  FluxSlotDefinition const &getPsfFluxSlot() const { return _slots.defPsfFlux; }
294 
303  getSchema().getAliasMap()->set(getPsfFluxSlot().getAlias(), name);
304  }
305 
306  FluxSlotDefinition const &getModelFluxSlot() const { return _slots.defModelFlux; }
307 
316  getSchema().getAliasMap()->set(getModelFluxSlot().getAlias(), name);
317  }
318 
319  FluxSlotDefinition const &getApFluxSlot() const { return _slots.defApFlux; }
320 
329  getSchema().getAliasMap()->set(getApFluxSlot().getAlias(), name);
330  }
331 
332  FluxSlotDefinition const &getGaussianFluxSlot() const { return _slots.defGaussianFlux; }
333 
342  getSchema().getAliasMap()->set(getGaussianFluxSlot().getAlias(), name);
343  }
344 
345  FluxSlotDefinition const &getCalibFluxSlot() const { return _slots.defCalibFlux; }
346 
355  getSchema().getAliasMap()->set(getCalibFluxSlot().getAlias(), name);
356  }
357 
358  CentroidSlotDefinition const &getCentroidSlot() const { return _slots.defCentroid; }
359 
368  getSchema().getAliasMap()->set(getCentroidSlot().getAlias(), name);
369  }
370 
371  ShapeSlotDefinition const &getShapeSlot() const { return _slots.defShape; }
372 
380  void defineShape(std::string const &name) {
381  getSchema().getAliasMap()->set(getShapeSlot().getAlias(), name);
382  }
383 
384  SourceTable &operator=(SourceTable const &) = delete;
386 
387 protected:
388  SourceTable(Schema const &schema, std::shared_ptr<IdFactory> const &idFactory);
389 
390  SourceTable(SourceTable const &other);
391  SourceTable(SourceTable &&other);
392 
393  void handleAliasChange(std::string const &alias) override;
394 
395  std::shared_ptr<BaseTable> _clone() const override;
396 
398 
399 private:
400  // Struct that holds the minimal schema and the special keys we've added to it.
401  struct MinimalSchema {
402  Schema schema;
403  Key<RecordId> parent;
404 
405  MinimalSchema();
406  };
407 
408  // Return the singleton minimal schema.
409  static MinimalSchema &getMinimalSchema();
410 
411  friend class io::FitsWriter;
412  friend class SourceRecord;
413 
414  // Return a writer object that knows how to save in FITS format. See also FitsWriter.
415  std::shared_ptr<io::FitsWriter> makeFitsWriter(fits::Fits *fitsfile, int flags) const override;
416 
417  SlotSuite _slots;
418 };
419 
420 template <typename RecordT>
421 class SourceColumnViewT : public ColumnViewT<RecordT> {
422 public:
423  using Record = RecordT;
424  using Table = typename RecordT::Table;
425 
426  // See the documentation for BaseColumnView for an explanation of why these
427  // accessors *appear* to violate const-correctness.
428 
430  ndarray::Array<double, 1> getPsfInstFlux() const {
431  return this->operator[](this->getTable()->getPsfFluxSlot().getMeasKey());
432  }
434  ndarray::Array<double, 1> getPsfInstFluxErr() const {
435  return this->operator[](this->getTable()->getPsfFluxSlot().getErrKey());
436  }
437 
439  ndarray::Array<double, 1> getApInstFlux() const {
440  return this->operator[](this->getTable()->getApFluxSlot().getMeasKey());
441  }
443  ndarray::Array<double, 1> getApInstFluxErr() const {
444  return this->operator[](this->getTable()->getApFluxSlot().getErrKey());
445  }
446 
448  ndarray::Array<double, 1> getModelInstFlux() const {
449  return this->operator[](this->getTable()->getModelFluxSlot().getMeasKey());
450  }
452  ndarray::Array<double, 1> getModelInstFluxErr() const {
453  return this->operator[](this->getTable()->getModelFluxSlot().getErrKey());
454  }
455 
457  ndarray::Array<double, 1> getGaussianInstFlux() const {
458  return this->operator[](this->getTable()->getGaussianFluxSlot().getMeasKey());
459  }
461  ndarray::Array<double, 1> getGaussianInstFluxErr() const {
462  return this->operator[](this->getTable()->getGaussianFluxSlot().getErrKey());
463  }
464 
466  ndarray::Array<double, 1> getCalibInstFlux() const {
467  return this->operator[](this->getTable()->getCalibFluxSlot().getMeasKey());
468  }
470  ndarray::Array<double, 1> getCalibInstFluxErr() const {
471  return this->operator[](this->getTable()->getCalibFluxSlot().getErrKey());
472  }
473 
474  ndarray::Array<double, 1> const getX() const {
475  return this->operator[](this->getTable()->getCentroidSlot().getMeasKey().getX());
476  }
477  ndarray::Array<double, 1> const getY() const {
478  return this->operator[](this->getTable()->getCentroidSlot().getMeasKey().getY());
479  }
480 
481  ndarray::Array<double, 1> const getIxx() const {
482  return this->operator[](this->getTable()->getShapeSlot().getMeasKey().getIxx());
483  }
484  ndarray::Array<double, 1> const getIyy() const {
485  return this->operator[](this->getTable()->getShapeSlot().getMeasKey().getIyy());
486  }
487  ndarray::Array<double, 1> const getIxy() const {
488  return this->operator[](this->getTable()->getShapeSlot().getMeasKey().getIxy());
489  }
490 
492  template <typename InputIterator>
493  static SourceColumnViewT make(std::shared_ptr<Table> const &table, InputIterator first,
494  InputIterator last) {
495  return SourceColumnViewT(BaseColumnView::make(table, first, last));
496  }
497 
502  ~SourceColumnViewT() = default;
503 
504 protected:
505  explicit SourceColumnViewT(BaseColumnView const &base) : ColumnViewT<RecordT>(base) {}
506 };
507 
508 using SourceColumnView = SourceColumnViewT<SourceRecord>;
509 
511  return this->get(getTable()->getPsfFluxSlot().getMeasKey());
512 }
513 
515  return this->get(getTable()->getPsfFluxSlot().getErrKey());
516 }
517 
518 inline bool SourceRecord::getPsfFluxFlag() const {
519  return this->get(getTable()->getPsfFluxSlot().getFlagKey());
520 }
521 
523  return this->get(getTable()->getModelFluxSlot().getMeasKey());
524 }
525 
527  return this->get(getTable()->getModelFluxSlot().getErrKey());
528 }
529 
530 inline bool SourceRecord::getModelFluxFlag() const {
531  return this->get(getTable()->getModelFluxSlot().getFlagKey());
532 }
533 
535  return this->get(getTable()->getApFluxSlot().getMeasKey());
536 }
537 
539  return this->get(getTable()->getApFluxSlot().getErrKey());
540 }
541 
542 inline bool SourceRecord::getApFluxFlag() const {
543  return this->get(getTable()->getApFluxSlot().getFlagKey());
544 }
545 
547  return this->get(getTable()->getGaussianFluxSlot().getMeasKey());
548 }
549 
551  return this->get(getTable()->getGaussianFluxSlot().getErrKey());
552 }
553 
555  return this->get(getTable()->getGaussianFluxSlot().getFlagKey());
556 }
557 
559  return this->get(getTable()->getCalibFluxSlot().getMeasKey());
560 }
561 
563  return this->get(getTable()->getCalibFluxSlot().getErrKey());
564 }
565 
566 inline bool SourceRecord::getCalibFluxFlag() const {
567  return this->get(getTable()->getCalibFluxSlot().getFlagKey());
568 }
569 
571  return this->get(getTable()->getCentroidSlot().getMeasKey());
572 }
573 
575  return this->get(getTable()->getCentroidSlot().getErrKey());
576 }
577 
578 inline bool SourceRecord::getCentroidFlag() const {
579  return this->get(getTable()->getCentroidSlot().getFlagKey());
580 }
581 
583  return this->get(getTable()->getShapeSlot().getMeasKey());
584 }
585 
587  return this->get(getTable()->getShapeSlot().getErrKey());
588 }
589 
590 inline bool SourceRecord::getShapeFlag() const { return this->get(getTable()->getShapeSlot().getFlagKey()); }
591 
594 inline double SourceRecord::getX() const { return get(getTable()->getCentroidSlot().getMeasKey().getX()); }
595 inline double SourceRecord::getY() const { return get(getTable()->getCentroidSlot().getMeasKey().getY()); }
596 inline double SourceRecord::getIxx() const { return get(getTable()->getShapeSlot().getMeasKey().getIxx()); }
597 inline double SourceRecord::getIyy() const { return get(getTable()->getShapeSlot().getMeasKey().getIyy()); }
598 inline double SourceRecord::getIxy() const { return get(getTable()->getShapeSlot().getMeasKey().getIxy()); }
599 
600 } // namespace table
601 } // namespace afw
602 } // namespace lsst
603 
604 #endif // !AFW_TABLE_Source_h_INCLUDED
table::Key< std::string > name
Definition: Amplifier.cc:116
char * data
Definition: BaseRecord.cc:61
SchemaMapper * mapper
Definition: SchemaMapper.cc:71
table::Key< table::Array< std::uint8_t > > wcs
Definition: SkyWcs.cc:66
table::Schema schema
Definition: python.h:134
Class to describe the properties of a detected object from an image.
Definition: Footprint.h:63
A simple struct that combines the two arguments that must be passed to most cfitsio routines and cont...
Definition: fits.h:297
An ellipse core with quadrupole moments as parameters.
Definition: Quadrupole.h:47
Column-wise view into a sequence of records that have been allocated contiguously.
static BaseColumnView make(std::shared_ptr< BaseTable > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
ndarray::ArrayRef< T, 1 > const operator[](Key< T > const &key) const
Return a 1-d array corresponding to a scalar field (or subfield).
Base class for all records.
Definition: BaseRecord.h:31
void set(Key< T > const &key, U const &value)
Set value of a field for the given key.
Definition: BaseRecord.h:164
Field< T >::Value get(Key< T > const &key) const
Return the value of a field for the given key.
Definition: BaseRecord.h:151
std::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
Definition: BaseRecord.h:83
Base class for all tables.
Definition: BaseTable.h:61
Schema getSchema() const
Return the table's schema.
Definition: BaseTable.h:137
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:128
SlotDefinition specialization for centroids.
Definition: slots.h:120
Eigen::Matrix< float, 2, 2 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:123
typename RecordT::Table Table
std::shared_ptr< Table > getTable() const
Return the table that owns the records.
SlotDefinition specialization for fluxes.
Definition: slots.h:73
double ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:76
double MeasValue
Type returned by accessing the slot measurement.
Definition: slots.h:75
static std::shared_ptr< IdFactory > makeSimple()
Return a simple IdFactory that simply counts from 1.
Definition: IdFactory.cc:70
A class used as a handle to a particular field in a table.
Definition: Key.h:53
Defines the fields and offsets for a table.
Definition: Schema.h:51
void disconnectAliases()
Sever the connection between this schema and any others with which it shares aliases.
Definition: Schema.cc:540
int contains(Schema const &other, int flags=EQUAL_KEYS) const
Test whether the given schema is a subset of this.
Definition: Schema.cc:490
std::shared_ptr< AliasMap > getAliasMap() const
Return the map of aliases.
Definition: Schema.h:279
A mapping between the keys of two Schemas, used to copy data between them.
Definition: SchemaMapper.h:21
SlotDefinition specialization for shapes.
Definition: slots.h:167
Eigen::Matrix< float, 3, 3 > ErrValue
Type returned by accessing the slot uncertainty.
Definition: slots.h:170
Record class that must contain a unique ID field and a celestial coordinate field.
Definition: Simple.h:48
Table class that must contain a unique ID field and a celestial coordinate field.
Definition: Simple.h:102
Custom catalog class for record/table subclasses that are guaranteed to have an ID,...
Definition: SortedCatalog.h:42
SourceColumnViewT & operator=(SourceColumnViewT const &)=default
ndarray::Array< double, 1 > getPsfInstFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:434
ndarray::Array< double, 1 > getApInstFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:439
ndarray::Array< double, 1 > const getY() const
Definition: Source.h:477
ndarray::Array< double, 1 > getApInstFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:443
SourceColumnViewT(BaseColumnView const &base)
Definition: Source.h:505
ndarray::Array< double, 1 > getCalibInstFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:466
ndarray::Array< double, 1 > getGaussianInstFluxErr() const
Get the uncertainty on the GaussianFlux slot measurement.
Definition: Source.h:461
ndarray::Array< double, 1 > getPsfInstFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:430
SourceColumnViewT & operator=(SourceColumnViewT &&)=default
ndarray::Array< double, 1 > const getIxy() const
Definition: Source.h:487
ndarray::Array< double, 1 > getModelInstFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:448
static SourceColumnViewT make(std::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
Definition: Source.h:493
SourceColumnViewT(SourceColumnViewT &&)=default
ndarray::Array< double, 1 > getGaussianInstFlux() const
Get the value of the GaussianFlux slot measurement.
Definition: Source.h:457
SourceColumnViewT(SourceColumnViewT const &)=default
ndarray::Array< double, 1 > const getX() const
Definition: Source.h:474
ndarray::Array< double, 1 > const getIyy() const
Definition: Source.h:484
ndarray::Array< double, 1 > getModelInstFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:452
ndarray::Array< double, 1 > const getIxx() const
Definition: Source.h:481
ndarray::Array< double, 1 > getCalibInstFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:470
Record class that contains measurements made on a single exposure.
Definition: Source.h:78
FluxSlotDefinition::ErrValue getCalibInstFluxErr() const
Get the uncertainty on the CalibFlux slot measurement.
Definition: Source.h:562
virtual void _assign(BaseRecord const &other)
Called by assign() after transferring fields to allow subclass data members to be copied.
Definition: Source.cc:374
double getIxx() const
Return the shape slot Ixx value.
Definition: Source.h:596
std::shared_ptr< SourceTable const > getTable() const
Definition: Source.h:102
SourceRecord & operator=(SourceRecord &&)=delete
bool getCalibFluxFlag() const
Return true if the measurement in the CalibFlux slot failed.
Definition: Source.h:566
FluxSlotDefinition::ErrValue getGaussianInstFluxErr() const
Get the uncertainty on the GaussianFlux slot measurement.
Definition: Source.h:550
SourceRecord & operator=(const SourceRecord &)=delete
bool getShapeFlag() const
Return true if the measurement in the Shape slot failed.
Definition: Source.h:590
double getX() const
Return the centroid slot x coordinate.
Definition: Source.h:594
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
double getY() const
Return the centroid slot y coordinate.
Definition: Source.h:595
FluxSlotDefinition::MeasValue getGaussianInstFlux() const
Get the value of the GaussianFlux slot measurement.
Definition: Source.h:546
double getIyy() const
Return the shape slot Iyy value.
Definition: Source.h:597
CentroidSlotDefinition::MeasValue getCentroid() const
Get the value of the Centroid slot measurement.
Definition: Source.h:570
bool getCentroidFlag() const
Return true if the measurement in the Centroid slot failed.
Definition: Source.h:578
FluxSlotDefinition::MeasValue getApInstFlux() const
Get the value of the ApFlux slot measurement.
Definition: Source.h:534
bool getModelFluxFlag() const
Return true if the measurement in the ModelFlux slot failed.
Definition: Source.h:530
void setParent(RecordId id)
Definition: Source.h:593
FluxSlotDefinition::MeasValue getModelInstFlux() const
Get the value of the ModelFlux slot measurement.
Definition: Source.h:522
double getIxy() const
Return the shape slot Ixy value.
Definition: Source.h:598
SourceRecord(const SourceRecord &)=delete
ShapeSlotDefinition::ErrValue getShapeErr() const
Get the uncertainty on the Shape slot measurement.
Definition: Source.h:586
FluxSlotDefinition::ErrValue getPsfInstFluxErr() const
Get the uncertainty on the PsfFlux slot measurement.
Definition: Source.h:514
ShapeSlotDefinition::MeasValue getShape() const
Get the value of the Shape slot measurement.
Definition: Source.h:582
RecordId getParent() const
Convenience accessors for the keys in the minimal source schema.
Definition: Source.h:592
CentroidSlotDefinition::ErrValue getCentroidErr() const
Get the uncertainty on the Centroid slot measurement.
Definition: Source.h:574
FluxSlotDefinition::MeasValue getPsfInstFlux() const
Get the value of the PsfFlux slot measurement.
Definition: Source.h:510
FluxSlotDefinition::ErrValue getApInstFluxErr() const
Get the uncertainty on the ApFlux slot measurement.
Definition: Source.h:538
std::shared_ptr< Footprint > getFootprint() const
Definition: Source.h:98
SourceRecord(SourceRecord &&)=delete
void setFootprint(std::shared_ptr< Footprint > const &footprint)
Definition: Source.h:100
bool getGaussianFluxFlag() const
Return true if the measurement in the GaussianFlux slot failed.
Definition: Source.h:554
FluxSlotDefinition::ErrValue getModelInstFluxErr() const
Get the uncertainty on the ModelFlux slot measurement.
Definition: Source.h:526
FluxSlotDefinition::MeasValue getCalibInstFlux() const
Get the value of the CalibFlux slot measurement.
Definition: Source.h:558
bool getPsfFluxFlag() const
Return true if the measurement in the PsfFlux slot failed.
Definition: Source.h:518
SourceRecord(ConstructionToken const &token, detail::RecordData &&data)
Constructor used by SourceTable.
Definition: Source.h:94
bool getApFluxFlag() const
Return true if the measurement in the ApFlux slot failed.
Definition: Source.h:542
Table class that contains measurements made on a single exposure.
Definition: Source.h:217
SourceTable & operator=(SourceTable &&)=delete
void defineCalibFlux(std::string const &name)
Set the measurement used for the CalibFlux slot.
Definition: Source.h:354
static std::shared_ptr< SourceTable > make(Schema const &schema, std::shared_ptr< IdFactory > const &idFactory)
Construct a new table.
Definition: Source.cc:382
std::shared_ptr< SourceTable > clone() const
Return a polymorphic deep copy of the table.
Definition: Source.h:276
FluxSlotDefinition const & getPsfFluxSlot() const
Definition: Source.h:293
SourceTable(SourceTable const &other)
friend class SourceRecord
Definition: Source.h:412
SourceTable(Schema const &schema, std::shared_ptr< IdFactory > const &idFactory)
Definition: Source.cc:391
FluxSlotDefinition const & getApFluxSlot() const
Definition: Source.h:319
FluxSlotDefinition const & getGaussianFluxSlot() const
Definition: Source.h:332
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:289
void defineApFlux(std::string const &name)
Set the measurement used for the ApFlux slot.
Definition: Source.h:328
std::shared_ptr< BaseRecord > _makeRecord() override
Default-construct an associated record (protected implementation).
Definition: Source.cc:423
void definePsfFlux(std::string const &name)
Set the measurement used for the PsfFlux slot.
Definition: Source.h:302
static Key< RecordId > getParentKey()
Key for the parent ID.
Definition: Source.h:273
static Schema makeMinimalSchema()
Return a minimal schema for Source tables and records.
Definition: Source.h:258
static std::shared_ptr< SourceTable > make(Schema const &schema)
Construct a new table.
Definition: Source.h:244
SourceTable & operator=(SourceTable const &)=delete
FluxSlotDefinition const & getModelFluxSlot() const
Definition: Source.h:306
ShapeSlotDefinition const & getShapeSlot() const
Definition: Source.h:371
void defineGaussianFlux(std::string const &name)
Set the measurement used for the GaussianFlux slot.
Definition: Source.h:341
std::shared_ptr< SourceRecord > makeRecord()
Default-construct an associated record.
Definition: Source.h:279
void defineShape(std::string const &name)
Set the measurement used for the Shape slot.
Definition: Source.h:380
std::shared_ptr< BaseTable > _clone() const override
Clone implementation with noncovariant return types.
Definition: Source.cc:419
FluxSlotDefinition const & getCalibFluxSlot() const
Definition: Source.h:345
CentroidSlotDefinition const & getCentroidSlot() const
Definition: Source.h:358
void handleAliasChange(std::string const &alias) override
Definition: Source.cc:398
void defineCentroid(std::string const &name)
Set the measurement used for the Centroid slot.
Definition: Source.h:367
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:284
void defineModelFlux(std::string const &name)
Set the measurement used for the ModelFlux slot.
Definition: Source.h:315
static bool checkSchema(Schema const &other)
Return true if the given schema is a valid SourceTable schema.
Definition: Source.h:270
Writer object for FITS binary tables.
Definition: FitsWriter.h:25
lsst::afw::detection::Footprint Footprint
Definition: Source.h:57
SourceColumnViewT< SourceRecord > SourceColumnView
Definition: fwd.h:84
SourceFitsFlags
Bitflags to be passed to SourceCatalog::readFits and SourceCatalog::writeFits.
Definition: Source.h:52
@ SOURCE_IO_NO_FOOTPRINTS
Do not read/write footprints at all.
Definition: Source.h:53
@ SOURCE_IO_NO_HEAVY_FOOTPRINTS
Read/write heavy footprints as non-heavy footprints.
Definition: Source.h:54
A base class for image defects.
STL namespace.
An aggregate containing all of the current slots used in SourceTable.
Definition: slots.h:219
CentroidSlotDefinition defCentroid
Definition: slots.h:225
FluxSlotDefinition defModelFlux
Definition: slots.h:223
FluxSlotDefinition defCalibFlux
Definition: slots.h:224
FluxSlotDefinition defApFlux
Definition: slots.h:221
FluxSlotDefinition defPsfFlux
Definition: slots.h:220
ShapeSlotDefinition defShape
Definition: slots.h:226
FluxSlotDefinition defGaussianFlux
Definition: slots.h:222
Helper struct that contains the information passed from BaseTable to BaseRecord at construction.
Definition: BaseTable.h:32