LSSTApplications  1.1.2+25,10.0+13,10.0+132,10.0+133,10.0+224,10.0+41,10.0+8,10.0-1-g0f53050+14,10.0-1-g4b7b172+19,10.0-1-g61a5bae+98,10.0-1-g7408a83+3,10.0-1-gc1e0f5a+19,10.0-1-gdb4482e+14,10.0-11-g3947115+2,10.0-12-g8719d8b+2,10.0-15-ga3f480f+1,10.0-2-g4f67435,10.0-2-gcb4bc6c+26,10.0-28-gf7f57a9+1,10.0-3-g1bbe32c+14,10.0-3-g5b46d21,10.0-4-g027f45f+5,10.0-4-g86f66b5+2,10.0-4-gc4fccf3+24,10.0-40-g4349866+2,10.0-5-g766159b,10.0-5-gca2295e+25,10.0-6-g462a451+1
LSSTDataManagementBasePackage
SourceCluster.h
Go to the documentation of this file.
1 // -*- lsst-c++ -*-
2 /*
3  * LSST Data Management System
4  * Copyright 2012 LSST Corporation.
5  *
6  * This product includes software developed by the
7  * LSST Project (http://www.lsst.org/).
8  *
9  * This program is free software: you can redistribute it and/or modify
10  * it under the terms of the GNU General Public License as published by
11  * the Free Software Foundation, either version 3 of the License, or
12  * (at your option) any later version.
13  *
14  * This program is distributed in the hope that it will be useful,
15  * but WITHOUT ANY WARRANTY; without even the implied warranty of
16  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
17  * GNU General Public License for more details.
18  *
19  * You should have received a copy of the LSST License Statement and
20  * the GNU General Public License along with this program. If not,
21  * see <http://www.lsstcorp.org/LegalNotices/>.
22  */
23 
24 // THIS FILE IS AUTOMATICALLY GENERATED, AND WILL BE OVERWRITTEN IF EDITED MANUALLY.
25 
32 #ifndef LSST_AP_CLUSTER_SOURCECLUSTER_H
33 #define LSST_AP_CLUSTER_SOURCECLUSTER_H
34 
35 #include "lsst/tr1/unordered_map.h"
36 
37 #include "lsst/afw/geom.h"
38 #include "lsst/afw/coord.h"
39 #include "lsst/afw/table/Source.h"
41 #include "lsst/afw/table/Catalog.h"
44 
45 
46 namespace lsst { namespace ap { namespace cluster {
47 
48 class SourceClusterTable;
49 
50 template <typename RecordT> class SourceClusterColumnViewT;
51 
52 
53 #if !defined(SWIG)
54 
56 template <typename MeasurementT>
57 struct KeyTuple {
58  typename MeasurementT::MeasKey mean;
59  typename MeasurementT::ErrKey err;
61 
63  KeyTuple() {}
64 
66  typename MeasurementT::MeasKey const & mean_,
67  typename MeasurementT::ErrKey const & err_,
68  lsst::afw::table::Key<int> const & count_
69  ) : mean(mean_), err(err_), count(count_) { }
70 };
71 
73 KeyTuple<lsst::afw::table::Shape> addShapeFields(
75  std::string const & filter,
76  std::string const & name,
77  std::string const & doc);
78 
80 KeyTuple<lsst::afw::table::Flux> addFluxFields(
82  std::string const & filter,
83  std::string const & name,
84  std::string const & doc,
85  std::string const & unit);
86 
87 #endif // !SWIG
88 
89 
99 public:
104 
106  return boost::static_pointer_cast<SourceClusterTable const>(
108  }
109 
111 
114  Eigen::Matrix<float,2,2> const getCoordErr() const;
116  void setCoordErr(Eigen::Matrix<float,2,2> const & value);
117 
122 
124  Eigen::Matrix<float,2,2> const getWeightedMeanCoordErr() const;
126  void setWeightedMeanCoordErr(Eigen::Matrix<float,2,2> const & value);
127 
129  int const getWeightedMeanCoordCount() const;
131  void setWeightedMeanCoordCount(int const & value);
132 
134  int const getNumSources() const;
136  void setNumSources(int const & value);
137 
139  double const getTimeMin() const;
141  void setTimeMin(double const & value);
142 
144  double const getTimeMean() const;
146  void setTimeMean(double const & value);
147 
149  double const getTimeMax() const;
151  void setTimeMax(double const & value);
152 
154 
155 
157 
160  int const getNumSources(std::string const & filter) const;
162  void setNumSources(std::string const & filter, int const & value);
163 
165  double const getTimeMin(std::string const & filter) const;
167  void setTimeMin(std::string const & filter, double const & value);
168 
170  double const getTimeMax(std::string const & filter) const;
172  void setTimeMax(std::string const & filter, double const & value);
173 
174 
176  lsst::afw::table::Flux::MeasValue const getPsfFlux(std::string const & filter) const;
178  void setPsfFlux(std::string const & filter, lsst::afw::table::Flux::MeasValue const & value);
179 
181  lsst::afw::table::Flux::ErrValue const getPsfFluxErr(std::string const & filter) const;
183  void setPsfFluxErr(std::string const & filter, lsst::afw::table::Flux::ErrValue const & value);
184 
186  int const getPsfFluxCount(std::string const & filter) const;
188  void setPsfFluxCount(std::string const & filter, int const & value);
189 
190 
192  lsst::afw::table::Flux::MeasValue const getModelFlux(std::string const & filter) const;
194  void setModelFlux(std::string const & filter, lsst::afw::table::Flux::MeasValue const & value);
195 
197  lsst::afw::table::Flux::ErrValue const getModelFluxErr(std::string const & filter) const;
199  void setModelFluxErr(std::string const & filter, lsst::afw::table::Flux::ErrValue const & value);
200 
202  int const getModelFluxCount(std::string const & filter) const;
204  void setModelFluxCount(std::string const & filter, int const & value);
205 
206 
208  lsst::afw::table::Flux::MeasValue const getApFlux(std::string const & filter) const;
210  void setApFlux(std::string const & filter, lsst::afw::table::Flux::MeasValue const & value);
211 
213  lsst::afw::table::Flux::ErrValue const getApFluxErr(std::string const & filter) const;
215  void setApFluxErr(std::string const & filter, lsst::afw::table::Flux::ErrValue const & value);
216 
218  int const getApFluxCount(std::string const & filter) const;
220  void setApFluxCount(std::string const & filter, int const & value);
221 
222 
224  lsst::afw::table::Flux::MeasValue const getInstFlux(std::string const & filter) const;
226  void setInstFlux(std::string const & filter, lsst::afw::table::Flux::MeasValue const & value);
227 
229  lsst::afw::table::Flux::ErrValue const getInstFluxErr(std::string const & filter) const;
231  void setInstFluxErr(std::string const & filter, lsst::afw::table::Flux::ErrValue const & value);
232 
234  int const getInstFluxCount(std::string const & filter) const;
236  void setInstFluxCount(std::string const & filter, int const & value);
237 
238 
240  lsst::afw::table::Shape::MeasValue const getShape(std::string const & filter) const;
242  void setShape(std::string const & filter, lsst::afw::table::Shape::MeasValue const & value);
243 
245  lsst::afw::table::Shape::ErrValue const getShapeErr(std::string const & filter) const;
247  void setShapeErr(std::string const & filter, lsst::afw::table::Shape::ErrValue const & value);
248 
250  int const getShapeCount(std::string const & filter) const;
252  void setShapeCount(std::string const & filter, int const & value);
253 
254 
256  double getIxx(std::string const & filter) const;
257 
259  double getIyy(std::string const & filter) const;
260 
262  double getIxy(std::string const & filter) const;
263 
265 
266 protected:
268 };
269 
270 
279 public:
284 
297  static PTR(SourceClusterTable) make(lsst::afw::table::Schema const & schema,
298  PTR(lsst::afw::table::IdFactory) const & idFactory);
299 
307  static PTR(SourceClusterTable) make(lsst::afw::table::Schema const & schema) {
309  }
310 
312 
315  return boost::static_pointer_cast<SourceClusterTable>(_clone());
316  }
317 
320  return boost::static_pointer_cast<SourceClusterRecord>(_makeRecord());
321  }
322 
324  PTR(SourceClusterRecord) copyRecord(lsst::afw::table::BaseRecord const & other) {
325  return boost::static_pointer_cast<SourceClusterRecord>(
327  }
328 
330  PTR(SourceClusterRecord) copyRecord(lsst::afw::table::BaseRecord const & other,
331  lsst::afw::table::SchemaMapper const & mapper) {
332  return boost::static_pointer_cast<SourceClusterRecord>(
334  }
335 
337 
341  _keyCoordErr = key;
342  }
344  void defineCoordErr(std::string const & name) {
346  _keyCoordErr = schema[name];
347  }
349  std::string const getCoordErrDefinition() const {
350  return getSchema().find(_keyCoordErr).field.getName();
351  }
354  return _keyCoordErr;
355  }
356 
359  _keyWeightedMeanCoord = key;
360  }
362  void defineWeightedMeanCoord(std::string const & name) {
364  _keyWeightedMeanCoord = schema[name];
365  }
367  std::string const getWeightedMeanCoordDefinition() const {
368  return getSchema().find(_keyWeightedMeanCoord).field.getName();
369  }
372  return _keyWeightedMeanCoord;
373  }
374 
378  }
380  void defineWeightedMeanCoordErr(std::string const & name) {
382  _keyWeightedMeanCoordErr = schema[name];
383  }
385  std::string const getWeightedMeanCoordErrDefinition() const {
386  return getSchema().find(_keyWeightedMeanCoordErr).field.getName();
387  }
391  }
392 
396  }
398  void defineWeightedMeanCoordCount(std::string const & name) {
400  _keyWeightedMeanCoordCount = schema[name];
401  }
403  std::string const getWeightedMeanCoordCountDefinition() const {
404  return getSchema().find(_keyWeightedMeanCoordCount).field.getName();
405  }
409  }
410 
413  _keyNumSources = key;
414  }
416  void defineNumSources(std::string const & name) {
418  _keyNumSources = schema[name];
419  }
421  std::string const getNumSourcesDefinition() const {
422  return getSchema().find(_keyNumSources).field.getName();
423  }
426  return _keyNumSources;
427  }
428 
431  _keyTimeMin = key;
432  }
434  void defineTimeMin(std::string const & name) {
436  _keyTimeMin = schema[name];
437  }
439  std::string const getTimeMinDefinition() const {
440  return getSchema().find(_keyTimeMin).field.getName();
441  }
444  return _keyTimeMin;
445  }
446 
449  _keyTimeMean = key;
450  }
452  void defineTimeMean(std::string const & name) {
454  _keyTimeMean = schema[name];
455  }
457  std::string const getTimeMeanDefinition() const {
458  return getSchema().find(_keyTimeMean).field.getName();
459  }
462  return _keyTimeMean;
463  }
464 
467  _keyTimeMax = key;
468  }
470  void defineTimeMax(std::string const & name) {
472  _keyTimeMax = schema[name];
473  }
475  std::string const getTimeMaxDefinition() const {
476  return getSchema().find(_keyTimeMax).field.getName();
477  }
480  return _keyTimeMax;
481  }
482 
484 
486  std::vector<std::string> const getFilters() const;
487 
489 
492  void defineNumSources(std::string const & filter,
493  lsst::afw::table::Key<int> const & key) {
494  _filterSlots[filter].keyNumSources = key;
495  }
497  void defineNumSources(std::string const & filter, std::string const & name) {
499  _filterSlots[filter].keyNumSources = schema[filter][name];
500  }
502  std::string const getNumSourcesDefinition(std::string const & filter) const {
503  return getSchema().find(getFilterSlots(filter).keyNumSources).field.getName();
504  }
506  lsst::afw::table::Key<int> const getNumSourcesKey(std::string const & filter) const {
507  return getFilterSlots(filter).keyNumSources;
508  }
509 
511  void defineTimeMin(std::string const & filter,
512  lsst::afw::table::Key<double> const & key) {
513  _filterSlots[filter].keyTimeMin = key;
514  }
516  void defineTimeMin(std::string const & filter, std::string const & name) {
518  _filterSlots[filter].keyTimeMin = schema[filter][name];
519  }
521  std::string const getTimeMinDefinition(std::string const & filter) const {
522  return getSchema().find(getFilterSlots(filter).keyTimeMin).field.getName();
523  }
525  lsst::afw::table::Key<double> const getTimeMinKey(std::string const & filter) const {
526  return getFilterSlots(filter).keyTimeMin;
527  }
528 
530  void defineTimeMax(std::string const & filter,
531  lsst::afw::table::Key<double> const & key) {
532  _filterSlots[filter].keyTimeMax = key;
533  }
535  void defineTimeMax(std::string const & filter, std::string const & name) {
537  _filterSlots[filter].keyTimeMax = schema[filter][name];
538  }
540  std::string const getTimeMaxDefinition(std::string const & filter) const {
541  return getSchema().find(getFilterSlots(filter).keyTimeMax).field.getName();
542  }
544  lsst::afw::table::Key<double> const getTimeMaxKey(std::string const & filter) const {
545  return getFilterSlots(filter).keyTimeMax;
546  }
547 
549  void definePsfFlux(std::string const & filter,
551  lsst::afw::table::Flux::ErrKey const & err,
552  lsst::afw::table::Key<int> const & count) {
553  _filterSlots[filter].keyPsfFlux = KeyTuple<lsst::afw::table::Flux>(mean, err, count);
554  }
557  void definePsfFlux(std::string const & filter, std::string const & name) {
559  _filterSlots[filter].keyPsfFlux = KeyTuple<lsst::afw::table::Flux>(
560  schema[filter][name],
561  schema[filter][name]["err"],
562  schema[filter][name]["count"]);
563  }
565  std::string const getPsfFluxDefinition(std::string const & filter) const {
566  return getSchema().find(getFilterSlots(filter).keyPsfFlux.mean).field.getName();
567  }
569  lsst::afw::table::Flux::MeasKey const getPsfFluxKey(std::string const & filter) const {
570  return getFilterSlots(filter).keyPsfFlux.mean;
571  }
573  lsst::afw::table::Flux::ErrKey const getPsfFluxErrKey(std::string const & filter) const {
574  return getFilterSlots(filter).keyPsfFlux.err;
575  }
577  lsst::afw::table::Key<int> const getPsfFluxCountKey(std::string const & filter) const {
578  return getFilterSlots(filter).keyPsfFlux.count;
579  }
580 
582  void defineModelFlux(std::string const & filter,
584  lsst::afw::table::Flux::ErrKey const & err,
585  lsst::afw::table::Key<int> const & count) {
586  _filterSlots[filter].keyModelFlux = KeyTuple<lsst::afw::table::Flux>(mean, err, count);
587  }
590  void defineModelFlux(std::string const & filter, std::string const & name) {
592  _filterSlots[filter].keyModelFlux = KeyTuple<lsst::afw::table::Flux>(
593  schema[filter][name],
594  schema[filter][name]["err"],
595  schema[filter][name]["count"]);
596  }
598  std::string const getModelFluxDefinition(std::string const & filter) const {
599  return getSchema().find(getFilterSlots(filter).keyModelFlux.mean).field.getName();
600  }
602  lsst::afw::table::Flux::MeasKey const getModelFluxKey(std::string const & filter) const {
603  return getFilterSlots(filter).keyModelFlux.mean;
604  }
606  lsst::afw::table::Flux::ErrKey const getModelFluxErrKey(std::string const & filter) const {
607  return getFilterSlots(filter).keyModelFlux.err;
608  }
610  lsst::afw::table::Key<int> const getModelFluxCountKey(std::string const & filter) const {
611  return getFilterSlots(filter).keyModelFlux.count;
612  }
613 
615  void defineApFlux(std::string const & filter,
617  lsst::afw::table::Flux::ErrKey const & err,
618  lsst::afw::table::Key<int> const & count) {
619  _filterSlots[filter].keyApFlux = KeyTuple<lsst::afw::table::Flux>(mean, err, count);
620  }
623  void defineApFlux(std::string const & filter, std::string const & name) {
626  schema[filter][name],
627  schema[filter][name]["err"],
628  schema[filter][name]["count"]);
629  }
631  std::string const getApFluxDefinition(std::string const & filter) const {
632  return getSchema().find(getFilterSlots(filter).keyApFlux.mean).field.getName();
633  }
635  lsst::afw::table::Flux::MeasKey const getApFluxKey(std::string const & filter) const {
636  return getFilterSlots(filter).keyApFlux.mean;
637  }
639  lsst::afw::table::Flux::ErrKey const getApFluxErrKey(std::string const & filter) const {
640  return getFilterSlots(filter).keyApFlux.err;
641  }
643  lsst::afw::table::Key<int> const getApFluxCountKey(std::string const & filter) const {
644  return getFilterSlots(filter).keyApFlux.count;
645  }
646 
648  void defineInstFlux(std::string const & filter,
650  lsst::afw::table::Flux::ErrKey const & err,
651  lsst::afw::table::Key<int> const & count) {
652  _filterSlots[filter].keyInstFlux = KeyTuple<lsst::afw::table::Flux>(mean, err, count);
653  }
656  void defineInstFlux(std::string const & filter, std::string const & name) {
658  _filterSlots[filter].keyInstFlux = KeyTuple<lsst::afw::table::Flux>(
659  schema[filter][name],
660  schema[filter][name]["err"],
661  schema[filter][name]["count"]);
662  }
664  std::string const getInstFluxDefinition(std::string const & filter) const {
665  return getSchema().find(getFilterSlots(filter).keyInstFlux.mean).field.getName();
666  }
668  lsst::afw::table::Flux::MeasKey const getInstFluxKey(std::string const & filter) const {
669  return getFilterSlots(filter).keyInstFlux.mean;
670  }
672  lsst::afw::table::Flux::ErrKey const getInstFluxErrKey(std::string const & filter) const {
673  return getFilterSlots(filter).keyInstFlux.err;
674  }
676  lsst::afw::table::Key<int> const getInstFluxCountKey(std::string const & filter) const {
677  return getFilterSlots(filter).keyInstFlux.count;
678  }
679 
681  void defineShape(std::string const & filter,
684  lsst::afw::table::Key<int> const & count) {
685  _filterSlots[filter].keyShape = KeyTuple<lsst::afw::table::Shape>(mean, err, count);
686  }
689  void defineShape(std::string const & filter, std::string const & name) {
692  schema[filter][name],
693  schema[filter][name]["err"],
694  schema[filter][name]["count"]);
695  }
697  std::string const getShapeDefinition(std::string const & filter) const {
698  return getSchema().find(getFilterSlots(filter).keyShape.mean).field.getName();
699  }
701  lsst::afw::table::Shape::MeasKey const getShapeKey(std::string const & filter) const {
702  return getFilterSlots(filter).keyShape.mean;
703  }
705  lsst::afw::table::Shape::ErrKey const getShapeErrKey(std::string const & filter) const {
706  return getFilterSlots(filter).keyShape.err;
707  }
709  lsst::afw::table::Key<int> const getShapeCountKey(std::string const & filter) const {
710  return getFilterSlots(filter).keyShape.count;
711  }
712 
714 
715 protected:
717  PTR(lsst::afw::table::IdFactory) const & idFactory);
718 
719  SourceClusterTable(SourceClusterTable const & other);
720 
721 private:
722  struct FilterSlots {
731 
732  FilterSlots();
733  ~FilterSlots();
734  };
735 
736  typedef std::tr1::unordered_map<std::string, FilterSlots> FilterSlotsMap;
737 
738  // Return a writer object that knows how to save in FITS format.
740  lsst::afw::table::io::FitsWriter::Fits * fits, int flags) const;
741 
742  FilterSlots const & getFilterSlots(std::string const & filter) const;
743 
744  lsst::afw::table::Key<lsst::afw::table::Covariance<lsst::afw::table::Point<float> > > _keyCoordErr;
745  lsst::afw::table::Key<lsst::afw::coord::Coord> _keyWeightedMeanCoord;
746  lsst::afw::table::Key<lsst::afw::table::Covariance<lsst::afw::table::Point<float> > > _keyWeightedMeanCoordErr;
747  lsst::afw::table::Key<int> _keyWeightedMeanCoordCount;
748  lsst::afw::table::Key<int> _keyNumSources;
749  lsst::afw::table::Key<double> _keyTimeMin;
750  lsst::afw::table::Key<double> _keyTimeMean;
751  lsst::afw::table::Key<double> _keyTimeMax;
752 
754 
755  friend class lsst::afw::table::io::FitsWriter;
756 };
757 
758 
759 template <typename RecordT>
760 class SourceClusterColumnViewT : public lsst::afw::table::ColumnViewT<RecordT> {
761 public:
762 
763  typedef RecordT Record;
764  typedef typename RecordT::Table Table;
765 
767  return this->operator[](this->getTable()->getNumSourcesKey());
768  }
770  return this->operator[](this->getTable()->getTimeMinKey());
771  }
773  return this->operator[](this->getTable()->getTimeMeanKey());
774  }
776  return this->operator[](this->getTable()->getTimeMaxKey());
777  }
778 
779  ndarray::Array<int const,1> const getNumSources(std::string const & filter) const {
780  return this->operator[](this->getTable()->getNumSourcesKey(filter));
781  }
782  ndarray::Array<double const,1> const getTimeMin(std::string const & filter) const {
783  return this->operator[](this->getTable()->getTimeMinKey(filter));
784  }
785  ndarray::Array<double const,1> const getTimeMax(std::string const & filter) const {
786  return this->operator[](this->getTable()->getTimeMaxKey(filter));
787  }
788 
789  ndarray::Array<double const,1> const getPsfFlux(std::string const & filter) const {
790  return this->operator[](this->getTable()->getPsfFluxKey(filter));
791  }
792  ndarray::Array<double const,1> const getApFlux(std::string const & filter) const {
793  return this->operator[](this->getTable()->getApFluxKey(filter));
794  }
795  ndarray::Array<double const,1> const getModelFlux(std::string const & filter) const {
796  return this->operator[](this->getTable()->getModelFluxKey(filter));
797  }
798  ndarray::Array<double const,1> const getInstFlux(std::string const & filter) const {
799  return this->operator[](this->getTable()->getInstFluxKey(filter));
800  }
801 
802  ndarray::Array<double const,1> const getIxx(std::string const & filter) const {
803  return this->operator[](this->getTable()->getShapeKey(filter).getIxx());
804  }
805  ndarray::Array<double const,1> const getIyy(std::string const & filter) const {
806  return this->operator[](this->getTable()->getShapeKey(filter).getIyy());
807  }
808  ndarray::Array<double const,1> const getIxy(std::string const & filter) const {
809  return this->operator[](this->getTable()->getShapeKey(filter).getIxy());
810  }
811 
813  template <typename InputIterator>
814  static SourceClusterColumnViewT make(PTR(Table) const & table,
815  InputIterator first,
816  InputIterator last) {
818  lsst::afw::table::BaseColumnView::make(table, first, last));
819  }
820 
821 protected:
823  lsst::afw::table::ColumnViewT<RecordT>(base) { }
824 };
825 
827 
828 
836 public:
837  SourceClusterIdFactory(int skyTileId);
838  virtual ~SourceClusterIdFactory();
839 
840  virtual lsst::afw::table::RecordId operator()();
841 
842  // Always throws!
843  virtual void notify(lsst::afw::table::RecordId id);
844 
846  return boost::make_shared<SourceClusterIdFactory>(*this);
847  }
848 
849 private:
852 };
853 
854 
855 #ifndef SWIG
856 
859 
860 inline Eigen::Matrix<float,2,2> const SourceClusterRecord::getCoordErr() const {
861  return this->get(getTable()->getCoordErrKey());
862 }
863 inline void SourceClusterRecord::setCoordErr(Eigen::Matrix<float,2,2> const & value) {
864  this->set(getTable()->getCoordErrKey(), value);
865 }
866 
868  return this->get(getTable()->getWeightedMeanCoordKey());
869 }
871  this->set(getTable()->getWeightedMeanCoordKey(), value);
872 }
873 
874 inline Eigen::Matrix<float,2,2> const SourceClusterRecord::getWeightedMeanCoordErr() const {
875  return this->get(getTable()->getWeightedMeanCoordErrKey());
876 }
877 inline void SourceClusterRecord::setWeightedMeanCoordErr(Eigen::Matrix<float,2,2> const & value) {
878  this->set(getTable()->getWeightedMeanCoordErrKey(), value);
879 }
880 
882  return this->get(getTable()->getWeightedMeanCoordCountKey());
883 }
884 inline void SourceClusterRecord::setWeightedMeanCoordCount(int const & value) {
885  this->set(getTable()->getWeightedMeanCoordCountKey(), value);
886 }
887 
888 inline int const SourceClusterRecord::getNumSources() const {
889  return this->get(getTable()->getNumSourcesKey());
890 }
891 inline void SourceClusterRecord::setNumSources(int const & value) {
892  this->set(getTable()->getNumSourcesKey(), value);
893 }
894 
895 inline double const SourceClusterRecord::getTimeMin() const {
896  return this->get(getTable()->getTimeMinKey());
897 }
898 inline void SourceClusterRecord::setTimeMin(double const & value) {
899  this->set(getTable()->getTimeMinKey(), value);
900 }
901 
902 inline double const SourceClusterRecord::getTimeMean() const {
903  return this->get(getTable()->getTimeMeanKey());
904 }
905 inline void SourceClusterRecord::setTimeMean(double const & value) {
906  this->set(getTable()->getTimeMeanKey(), value);
907 }
908 
909 inline double const SourceClusterRecord::getTimeMax() const {
910  return this->get(getTable()->getTimeMaxKey());
911 }
912 inline void SourceClusterRecord::setTimeMax(double const & value) {
913  this->set(getTable()->getTimeMaxKey(), value);
914 }
915 
916 
917 inline int const SourceClusterRecord::getNumSources(std::string const & filter) const {
918  return this->get(getTable()->getNumSourcesKey(filter));
919 }
920 inline void SourceClusterRecord::setNumSources(std::string const & filter, int const & value) {
921  this->set(getTable()->getNumSourcesKey(filter), value);
922 }
923 
924 inline double const SourceClusterRecord::getTimeMin(std::string const & filter) const {
925  return this->get(getTable()->getTimeMinKey(filter));
926 }
927 inline void SourceClusterRecord::setTimeMin(std::string const & filter, double const & value) {
928  this->set(getTable()->getTimeMinKey(filter), value);
929 }
930 
931 inline double const SourceClusterRecord::getTimeMax(std::string const & filter) const {
932  return this->get(getTable()->getTimeMaxKey(filter));
933 }
934 inline void SourceClusterRecord::setTimeMax(std::string const & filter, double const & value) {
935  this->set(getTable()->getTimeMaxKey(filter), value);
936 }
937 
938 
939 inline lsst::afw::table::Flux::MeasValue const SourceClusterRecord::getPsfFlux(std::string const & filter) const {
940  return this->get(getTable()->getPsfFluxKey(filter));
941 }
942 inline void SourceClusterRecord::setPsfFlux(std::string const & filter, lsst::afw::table::Flux::MeasValue const & value) {
943  this->set(getTable()->getPsfFluxKey(filter), value);
944 }
945 
946 inline lsst::afw::table::Flux::ErrValue const SourceClusterRecord::getPsfFluxErr(std::string const & filter) const {
947  return this->get(getTable()->getPsfFluxErrKey(filter));
948 }
949 inline void SourceClusterRecord::setPsfFluxErr(std::string const & filter, lsst::afw::table::Flux::ErrValue const & value) {
950  this->set(getTable()->getPsfFluxErrKey(filter), value);
951 }
952 
953 inline int const SourceClusterRecord::getPsfFluxCount(std::string const & filter) const {
954  return this->get(getTable()->getPsfFluxCountKey(filter));
955 }
956 inline void SourceClusterRecord::setPsfFluxCount(std::string const & filter, int const & value) {
957  this->set(getTable()->getPsfFluxCountKey(filter), value);
958 }
959 
960 
961 inline lsst::afw::table::Flux::MeasValue const SourceClusterRecord::getModelFlux(std::string const & filter) const {
962  return this->get(getTable()->getModelFluxKey(filter));
963 }
964 inline void SourceClusterRecord::setModelFlux(std::string const & filter, lsst::afw::table::Flux::MeasValue const & value) {
965  this->set(getTable()->getModelFluxKey(filter), value);
966 }
967 
968 inline lsst::afw::table::Flux::ErrValue const SourceClusterRecord::getModelFluxErr(std::string const & filter) const {
969  return this->get(getTable()->getModelFluxErrKey(filter));
970 }
971 inline void SourceClusterRecord::setModelFluxErr(std::string const & filter, lsst::afw::table::Flux::ErrValue const & value) {
972  this->set(getTable()->getModelFluxErrKey(filter), value);
973 }
974 
975 inline int const SourceClusterRecord::getModelFluxCount(std::string const & filter) const {
976  return this->get(getTable()->getModelFluxCountKey(filter));
977 }
978 inline void SourceClusterRecord::setModelFluxCount(std::string const & filter, int const & value) {
979  this->set(getTable()->getModelFluxCountKey(filter), value);
980 }
981 
982 
983 inline lsst::afw::table::Flux::MeasValue const SourceClusterRecord::getApFlux(std::string const & filter) const {
984  return this->get(getTable()->getApFluxKey(filter));
985 }
986 inline void SourceClusterRecord::setApFlux(std::string const & filter, lsst::afw::table::Flux::MeasValue const & value) {
987  this->set(getTable()->getApFluxKey(filter), value);
988 }
989 
990 inline lsst::afw::table::Flux::ErrValue const SourceClusterRecord::getApFluxErr(std::string const & filter) const {
991  return this->get(getTable()->getApFluxErrKey(filter));
992 }
993 inline void SourceClusterRecord::setApFluxErr(std::string const & filter, lsst::afw::table::Flux::ErrValue const & value) {
994  this->set(getTable()->getApFluxErrKey(filter), value);
995 }
996 
997 inline int const SourceClusterRecord::getApFluxCount(std::string const & filter) const {
998  return this->get(getTable()->getApFluxCountKey(filter));
999 }
1000 inline void SourceClusterRecord::setApFluxCount(std::string const & filter, int const & value) {
1001  this->set(getTable()->getApFluxCountKey(filter), value);
1002 }
1003 
1004 
1005 inline lsst::afw::table::Flux::MeasValue const SourceClusterRecord::getInstFlux(std::string const & filter) const {
1006  return this->get(getTable()->getInstFluxKey(filter));
1007 }
1008 inline void SourceClusterRecord::setInstFlux(std::string const & filter, lsst::afw::table::Flux::MeasValue const & value) {
1009  this->set(getTable()->getInstFluxKey(filter), value);
1010 }
1011 
1012 inline lsst::afw::table::Flux::ErrValue const SourceClusterRecord::getInstFluxErr(std::string const & filter) const {
1013  return this->get(getTable()->getInstFluxErrKey(filter));
1014 }
1015 inline void SourceClusterRecord::setInstFluxErr(std::string const & filter, lsst::afw::table::Flux::ErrValue const & value) {
1016  this->set(getTable()->getInstFluxErrKey(filter), value);
1017 }
1018 
1019 inline int const SourceClusterRecord::getInstFluxCount(std::string const & filter) const {
1020  return this->get(getTable()->getInstFluxCountKey(filter));
1021 }
1022 inline void SourceClusterRecord::setInstFluxCount(std::string const & filter, int const & value) {
1023  this->set(getTable()->getInstFluxCountKey(filter), value);
1024 }
1025 
1026 
1027 inline lsst::afw::table::Shape::MeasValue const SourceClusterRecord::getShape(std::string const & filter) const {
1028  return this->get(getTable()->getShapeKey(filter));
1029 }
1030 inline void SourceClusterRecord::setShape(std::string const & filter, lsst::afw::table::Shape::MeasValue const & value) {
1031  this->set(getTable()->getShapeKey(filter), value);
1032 }
1033 
1034 inline lsst::afw::table::Shape::ErrValue const SourceClusterRecord::getShapeErr(std::string const & filter) const {
1035  return this->get(getTable()->getShapeErrKey(filter));
1036 }
1037 inline void SourceClusterRecord::setShapeErr(std::string const & filter, lsst::afw::table::Shape::ErrValue const & value) {
1038  this->set(getTable()->getShapeErrKey(filter), value);
1039 }
1040 
1041 inline int const SourceClusterRecord::getShapeCount(std::string const & filter) const {
1042  return this->get(getTable()->getShapeCountKey(filter));
1043 }
1044 inline void SourceClusterRecord::setShapeCount(std::string const & filter, int const & value) {
1045  this->set(getTable()->getShapeCountKey(filter), value);
1046 }
1047 
1048 
1049 inline double SourceClusterRecord::getIxx(std::string const & filter) const {
1050  return get(getTable()->getShapeKey(filter).getIxx());
1051 }
1052 inline double SourceClusterRecord::getIyy(std::string const & filter) const {
1053  return get(getTable()->getShapeKey(filter).getIyy());
1054 }
1055 inline double SourceClusterRecord::getIxy(std::string const & filter) const {
1056  return get(getTable()->getShapeKey(filter).getIxy());
1057 }
1058 
1059 #endif // !SWIG
1060 
1061 }}} // namespace lsst::ap::cluster
1062 
1063 #endif // !LSST_AP_CLUSTER_SOURCECLUSTER_H
void setModelFluxCount(std::string const &filter, int const &value)
Set the number of measurements used to compute the ModelFlux mean in the given filter.
std::string const getTimeMinDefinition() const
Get the name of the field used for the TimeMin slot.
virtual boost::shared_ptr< lsst::afw::table::io::FitsWriter > makeFitsWriter(lsst::afw::table::io::FitsWriter::Fits *fits, int flags) const
Defines the fields and offsets for a table.
Definition: Schema.h:46
std::string const getTimeMinDefinition(std::string const &filter) const
Return the name of the field used for the TimeMin slot in the given filter.
void defineWeightedMeanCoord(std::string const &name)
Set the field used for the WeightedMeanCoord slot using a name.
double getIxx(std::string const &filter) const
Return the shape slot Ixx value for the given filter.
void defineCoordErr(std::string const &name)
Set the field used for the CoordErr slot using a name.
void defineWeightedMeanCoord(lsst::afw::table::Key< lsst::afw::coord::Coord > const &key)
Set the field used for the WeightedMeanCoord slot using keys.
#define CONST_PTR(...)
Definition: base.h:47
An include file to include the header files for lsst::afw::geom.
lsst::afw::table::Key< int > _keyNumSources
void defineTimeMin(lsst::afw::table::Key< double > const &key)
Set the field used for the TimeMin slot using keys.
std::string const getTimeMeanDefinition() const
Get the name of the field used for the TimeMean slot.
Column-wise view into a sequence of records that have been allocated contiguously.
Writer subclass for FITS binary tables.
Definition: FitsWriter.h:20
SourceClusterColumnViewT< SourceClusterRecord > SourceClusterColumnView
int const getPsfFluxCount(std::string const &filter) const
Get the number of measurements used to compute the PsfFlux mean in the given filter.
void setInstFluxErr(std::string const &filter, lsst::afw::table::Flux::ErrValue const &value)
Set the uncertainty of the InstFlux mean in the given filter.
lsst::afw::table::Flux::MeasValue const getInstFlux(std::string const &filter) const
Get the inverse variance weighted mean of the InstFlux slot measurement in the given filter...
lsst::afw::table::Key< double > const getTimeMinKey(std::string const &filter) const
Return the key used for the TimeMin slot in the given filter.
void defineTimeMean(std::string const &name)
Set the field used for the TimeMean slot using a name.
void definePsfFlux(std::string const &filter, lsst::afw::table::Flux::MeasKey const &mean, lsst::afw::table::Flux::ErrKey const &err, lsst::afw::table::Key< int > const &count)
Set the fields used for the PsfFlux slot in the given filter using Keys.
std::string const getNumSourcesDefinition() const
Get the name of the field used for the NumSources slot.
lsst::afw::coord::Coord Coord
Definition: misc.h:39
lsst::afw::table::Flux::ErrValue const getPsfFluxErr(std::string const &filter) const
Get the uncertainty of the PsfFlux mean in the given filter.
static BaseColumnView make(boost::shared_ptr< BaseTable > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
std::string const getApFluxDefinition(std::string const &filter) const
Return the name of the field used for the ApFlux slot in the given filter.
void defineTimeMax(lsst::afw::table::Key< double > const &key)
Set the field used for the TimeMax slot using keys.
std::tr1::unordered_map< std::string, FilterSlots > FilterSlotsMap
lsst::afw::table::Flux::ErrKey const getInstFluxErrKey(std::string const &filter) const
Return the key used for InstFlux slot error or covariance.
Field< MeasTag >::Value MeasValue
the value type used for the measurement
Definition: slots.h:232
An include file to include the header files for lsst::afw::coord.
void defineTimeMax(std::string const &filter, std::string const &name)
Set the TimeMax slot in the given filter to the field named &quot;&lt;filter&gt;.&lt;name&gt;&quot;.
lsst::afw::table::Key< double > const getTimeMaxKey() const
Get the key used for the TimeMax slot.
lsst::afw::table::Key< int > const getShapeCountKey(std::string const &filter) const
Return the key used for the Shape slot count.
void setApFluxErr(std::string const &filter, lsst::afw::table::Flux::ErrValue const &value)
Set the uncertainty of the ApFlux mean in the given filter.
std::vector< SourceCatalog > const cluster(SourceCatalog const &sources, ClusteringControl const &control)
Definition: clustering.cc:578
boost::shared_ptr< SourceClusterRecord > copyRecord(lsst::afw::table::BaseRecord const &other)
Deep-copy a record, requiring that it have the same schema as this table.
boost::shared_ptr< BaseTable const > getTable() const
Return the table this record is associated with.
Definition: BaseRecord.h:51
ndarray::Array< int const, 1 > const getNumSources(std::string const &filter) const
lsst::afw::table::Key< int > const getApFluxCountKey(std::string const &filter) const
Return the key used for the ApFlux slot count.
void setShapeCount(std::string const &filter, int const &value)
Set the number of measurements used to compute the Shape mean in the given filter.
std::string const getWeightedMeanCoordDefinition() const
Get the name of the field used for the WeightedMeanCoord slot.
ndarray::Array< double const, 1 > const getTimeMin(std::string const &filter) const
KeyTuple< lsst::afw::table::Flux > keyApFlux
Record class that contains measurement averages on clusters of single exposure sources.
Definition: SourceCluster.h:98
void defineTimeMin(std::string const &filter, std::string const &name)
Set the TimeMin slot in the given filter to the field named &quot;&lt;filter&gt;.&lt;name&gt;&quot;.
lsst::afw::table::SortedCatalogT< Record > Catalog
void setInstFlux(std::string const &filter, lsst::afw::table::Flux::MeasValue const &value)
Set the inverse variance weighted mean of the InstFlux slot measurement in the given filter...
lsst::afw::table::Key< lsst::afw::table::Covariance< lsst::afw::table::Point< float > > > const getWeightedMeanCoordErrKey() const
Get the key used for the WeightedMeanCoordErr slot.
void setTimeMin(double const &value)
Set the earliest observation time [MJD TAI] of sources in the cluster.
Eigen::Matrix< float, 2, 2 > const getWeightedMeanCoordErr() const
Get the uncertainty of the WeightedMeanCoord slot.
KeyTuple< lsst::afw::table::Flux > keyInstFlux
ndarray::Array< double const, 1 > const getTimeMax(std::string const &filter) const
Eigen::Matrix< float, 2, 2 > const getCoordErr() const
Convenience accessors for filter-agnostic keys.
void defineInstFlux(std::string const &filter, std::string const &name)
Set the fields used for the InstFlux slot in the given filter to the fields named &quot;&lt;filter&gt;...
int const getApFluxCount(std::string const &filter) const
Get the number of measurements used to compute the ApFlux mean in the given filter.
lsst::afw::table::Key< lsst::afw::coord::Coord > _keyWeightedMeanCoord
lsst::afw::table::SortedCatalogT< SourceClusterRecord const > ConstCatalog
lsst::afw::table::Key< double > _keyTimeMin
virtual boost::shared_ptr< BaseTable > _clone() const =0
Clone implementation with noncovariant return types.
static boost::shared_ptr< IdFactory > makeSimple()
Return a simple IdFactory that simply counts from 1.
#define PTR(...)
Definition: base.h:41
ndarray::Array< double const, 1 > const getTimeMin() const
ndarray::Array< double const, 1 > const getApFlux(std::string const &filter) const
void defineApFlux(std::string const &filter, std::string const &name)
Set the fields used for the ApFlux slot in the given filter to the fields named &quot;&lt;filter&gt;.&lt;name&gt;&quot;, &quot;&lt;filter&gt;.&lt;name&gt;.err&quot;, and &quot;&lt;filter&gt;.&lt;name&gt;.count&quot;.
virtual boost::shared_ptr< BaseRecord > _makeRecord()=0
Default-construct an associated record (protected implementation).
Field< ErrTag >::Value ErrValue
the value type used for the uncertainty
Definition: slots.h:233
void defineModelFlux(std::string const &filter, lsst::afw::table::Flux::MeasKey const &mean, lsst::afw::table::Flux::ErrKey const &err, lsst::afw::table::Key< int > const &count)
Set the fields used for the ModelFlux slot in the given filter using Keys.
lsst::afw::table::Flux::ErrKey const getModelFluxErrKey(std::string const &filter) const
Return the key used for ModelFlux slot error or covariance.
std::string const getWeightedMeanCoordErrDefinition() const
Get the name of the field used for the WeightedMeanCoordErr slot.
void setPsfFluxErr(std::string const &filter, lsst::afw::table::Flux::ErrValue const &value)
Set the uncertainty of the PsfFlux mean in the given filter.
ndarray::Array< double const, 1 > const getIxy(std::string const &filter) const
std::string const getShapeDefinition(std::string const &filter) const
Return the name of the field used for the Shape slot in the given filter.
MeasurementT::MeasKey mean
Key used for the mean measured value.
Definition: SourceCluster.h:58
lsst::afw::table::Shape::MeasValue const getShape(std::string const &filter) const
Get the inverse variance weighted mean of the Shape slot measurement in the given filter...
Table class that contains measurement means on clusters of single exposure sources.
double getIxy(std::string const &filter) const
Return the shape slot Ixy value for the given filter.
void setModelFlux(std::string const &filter, lsst::afw::table::Flux::MeasValue const &value)
Set the inverse variance weighted mean of the ModelFlux slot measurement in the given filter...
lsst::afw::table::Flux::MeasKey const getApFluxKey(std::string const &filter) const
Return the key used for the ApFlux slot in the given filter.
lsst::afw::table::Flux::ErrValue const getModelFluxErr(std::string const &filter) const
Get the uncertainty of the ModelFlux mean in the given filter.
lsst::afw::table::Flux::MeasKey const getInstFluxKey(std::string const &filter) const
Return the key used for the InstFlux slot in the given filter.
void defineInstFlux(std::string const &filter, lsst::afw::table::Flux::MeasKey const &mean, lsst::afw::table::Flux::ErrKey const &err, lsst::afw::table::Key< int > const &count)
Set the fields used for the InstFlux slot in the given filter using Keys.
static SourceClusterColumnViewT make(boost::shared_ptr< Table > const &table, InputIterator first, InputIterator last)
Construct a BaseColumnView from an iterator range.
lsst::afw::table::Key< double > _keyTimeMax
double const getTimeMean() const
Get the mean observation time [MJD TAI] of sources in the cluster.
ndarray::Array< double const, 1 > const getTimeMean() const
void setApFluxCount(std::string const &filter, int const &value)
Set the number of measurements used to compute the ApFlux mean in the given filter.
void setNumSources(int const &value)
Set the number of sources in the cluster.
double mean
Definition: attributes.cc:217
Table class that must contain a unique ID field and a celestial coordinate field. ...
Definition: Simple.h:84
FilterSlots const & getFilterSlots(std::string const &filter) const
std::string const getTimeMaxDefinition(std::string const &filter) const
Return the name of the field used for the TimeMax slot in the given filter.
void setCoordErr(Eigen::Matrix< float, 2, 2 > const &value)
Set the uncertainty of the sky-coordinates of the cluster.
lsst::afw::table::Key< lsst::afw::table::Covariance< lsst::afw::table::Point< float > > > _keyWeightedMeanCoordErr
void defineNumSources(lsst::afw::table::Key< int > const &key)
Set the field used for the NumSources slot using keys.
void defineShape(std::string const &filter, std::string const &name)
Set the fields used for the Shape slot in the given filter to the fields named &quot;&lt;filter&gt;.&lt;name&gt;&quot;, &quot;&lt;filter&gt;.&lt;name&gt;.err&quot;, and &quot;&lt;filter&gt;.&lt;name&gt;.count&quot;.
lsst::afw::table::Shape::ErrKey const getShapeErrKey(std::string const &filter) const
Return the key used for Shape slot error or covariance.
tbl::Schema schema
Definition: CoaddPsf.cc:324
Custom catalog class for record/table subclasses that are guaranteed to have an ID, and should generally be sorted by that ID.
Definition: fwd.h:55
boost::shared_ptr< SourceClusterTable const > getTable() const
boost::shared_ptr< SourceClusterRecord > makeRecord()
Default-construct an associated record.
void defineNumSources(std::string const &filter, lsst::afw::table::Key< int > const &key)
Convenience definers for filter-specific keys.
ndarray::Array< double const, 1 > const getPsfFlux(std::string const &filter) const
A point on the unit sphere (sky), specified in spherical polar coordinates.
Definition: Point.h:46
SourceClusterColumnViewT< SourceClusterRecord > ColumnView
std::string const getTimeMaxDefinition() const
Get the name of the field used for the TimeMax slot.
KeyTuple()
Default-constructor; all keys will be invalid.
Definition: SourceCluster.h:63
void setTimeMax(double const &value)
Set the latest observation time [MJD TAI] of sources in the cluster.
lsst::afw::table::Key< lsst::afw::coord::Coord > const getWeightedMeanCoordKey() const
Get the key used for the WeightedMeanCoord slot.
void setInstFluxCount(std::string const &filter, int const &value)
Set the number of measurements used to compute the InstFlux mean in the given filter.
int const getModelFluxCount(std::string const &filter) const
Get the number of measurements used to compute the ModelFlux mean in the given filter.
SourceClusterTable(lsst::afw::table::Schema const &schema, boost::shared_ptr< lsst::afw::table::IdFactory > const &idFactory)
lsst::afw::table::SortedCatalogT< SourceClusterRecord > Catalog
lsst::afw::coord::IcrsCoord const getWeightedMeanCoord() const
Get the inverse variance weighted mean sky-coordinates of the cluster.
static boost::shared_ptr< SourceClusterTable > make(lsst::afw::table::Schema const &schema, boost::shared_ptr< lsst::afw::table::IdFactory > const &idFactory)
Construct a new table.
ndarray::Array< double const, 1 > const getIyy(std::string const &filter) const
lsst::afw::table::Key< lsst::afw::table::Covariance< lsst::afw::table::Point< float > > > const getCoordErrKey() const
Get the key used for the CoordErr slot.
void setTimeMean(double const &value)
Set the mean observation time [MJD TAI] of sources in the cluster.
SchemaItem< T > find(std::string const &name) const
Find a SchemaItem in the Schema by name.
void defineShape(std::string const &filter, lsst::afw::table::Shape::MeasKey const &mean, lsst::afw::table::Shape::ErrKey const &err, lsst::afw::table::Key< int > const &count)
Set the fields used for the Shape slot in the given filter using Keys.
friend class BaseRecord
Definition: BaseTable.h:204
void defineWeightedMeanCoordCount(lsst::afw::table::Key< int > const &key)
Set the field used for the WeightedMeanCoordCount slot using keys.
lsst::afw::table::Key< int > const getWeightedMeanCoordCountKey() const
Get the key used for the WeightedMeanCoordCount slot.
int const getNumSources() const
Get the number of sources in the cluster.
void setWeightedMeanCoord(lsst::afw::coord::IcrsCoord const &value)
Set the inverse variance weighted mean sky-coordinates of the cluster.
double const getTimeMax() const
Get the latest observation time [MJD TAI] of sources in the cluster.
lsst::afw::table::Key< int > const getModelFluxCountKey(std::string const &filter) const
Return the key used for the ModelFlux slot count.
std::string const getInstFluxDefinition(std::string const &filter) const
Return the name of the field used for the InstFlux slot in the given filter.
A polymorphic functor base class for generating record IDs for a table.
Definition: IdFactory.h:19
void definePsfFlux(std::string const &filter, std::string const &name)
Set the fields used for the PsfFlux slot in the given filter to the fields named &quot;&lt;filter&gt;.&lt;name&gt;&quot;, &quot;&lt;filter&gt;.&lt;name&gt;.err&quot;, and &quot;&lt;filter&gt;.&lt;name&gt;.count&quot;.
lsst::afw::table::Key< double > const getTimeMaxKey(std::string const &filter) const
Return the key used for the TimeMax slot in the given filter.
boost::shared_ptr< BaseRecord > copyRecord(BaseRecord const &input)
Deep-copy a record, requiring that it have the same schema as this table.
KeyTuple< lsst::afw::table::Shape > keyShape
void setModelFluxErr(std::string const &filter, lsst::afw::table::Flux::ErrValue const &value)
Set the uncertainty of the ModelFlux mean in the given filter.
lsst::afw::table::Key< int > const getNumSourcesKey() const
Get the key used for the NumSources slot.
void setApFlux(std::string const &filter, lsst::afw::table::Flux::MeasValue const &value)
Set the inverse variance weighted mean of the ApFlux slot measurement in the given filter...
lsst::afw::table::Flux::MeasValue const getModelFlux(std::string const &filter) const
Get the inverse variance weighted mean of the ModelFlux slot measurement in the given filter...
A multidimensional strided array.
Definition: Array.h:47
void defineTimeMax(std::string const &filter, lsst::afw::table::Key< double > const &key)
Set the field used for the TimeMax slot in the given filter using a Key.
std::string const getCoordErrDefinition() const
Get the name of the field used for the CoordErr slot.
lsst::afw::table::Key< double > const getTimeMeanKey() const
Get the key used for the TimeMean slot.
void setShape(std::string const &filter, lsst::afw::table::Shape::MeasValue const &value)
Set the inverse variance weighted mean of the Shape slot measurement in the given filter...
std::string const getWeightedMeanCoordCountDefinition() const
Get the name of the field used for the WeightedMeanCoordCount slot.
Schema getSchema() const
Return the table&#39;s schema.
Definition: BaseTable.h:129
int const getWeightedMeanCoordCount() const
Get the number of measurements used to compute the WeightedMeanCoord slot.
KeyTuple(typename MeasurementT::MeasKey const &mean_, typename MeasurementT::ErrKey const &err_, lsst::afw::table::Key< int > const &count_)
Definition: SourceCluster.h:65
std::vector< std::string > const getFilters() const
Get the lexicographically sorted list of filter names for which slots have been defined.
lsst::afw::table::Key< int > const getNumSourcesKey(std::string const &filter) const
Return the key used for the NumSources slot in the given filter.
ndarray::Array< int const, 1 > const getNumSources() const
int const getInstFluxCount(std::string const &filter) const
Get the number of measurements used to compute the InstFlux mean in the given filter.
void defineTimeMin(std::string const &filter, lsst::afw::table::Key< double > const &key)
Set the field used for the TimeMin slot in the given filter using a Key.
lsst::afw::table::SortedCatalogT< Record const > ConstCatalog
void defineCoordErr(lsst::afw::table::Key< lsst::afw::table::Covariance< lsst::afw::table::Point< float > > > const &key)
Convenience definers for filter-agnostic keys.
lsst::afw::table::Shape::ErrValue const getShapeErr(std::string const &filter) const
Get the uncertainty of the Shape mean in the given filter.
lsst::afw::table::Key< int > count
Key used for the sample count.
Definition: SourceCluster.h:60
lsst::afw::table::Flux::ErrValue const getInstFluxErr(std::string const &filter) const
Get the uncertainty of the InstFlux mean in the given filter.
lsst::afw::table::Flux::MeasKey const getPsfFluxKey(std::string const &filter) const
Return the key used for the PsfFlux slot in the given filter.
KeyTuple< lsst::afw::table::Flux > keyPsfFlux
std::string const getPsfFluxDefinition(std::string const &filter) const
Return the name of the field used for the PsfFlux slot in the given filter.
void setWeightedMeanCoordCount(int const &value)
Set the number of measurements used to compute the WeightedMeanCoord slot.
lsst::afw::table::Key< double > keyTimeMin
lsst::afw::table::Key< double > _keyTimeMean
void defineNumSources(std::string const &filter, std::string const &name)
Set the NumSources slot in the given filter to the field named &quot;&lt;filter&gt;.&lt;name&gt;&quot;. ...
ndarray::Array< double const, 1 > const getTimeMax() const
lsst::afw::table::Flux::ErrKey const getPsfFluxErrKey(std::string const &filter) const
Return the key used for PsfFlux slot error or covariance.
MeasurementT::ErrKey err
Key used for the uncertainty.
Definition: SourceCluster.h:59
double getIyy(std::string const &filter) const
Return the shape slot Iyy value for the given filter.
ndarray::Array< double const, 1 > const getModelFlux(std::string const &filter) const
void setShapeErr(std::string const &filter, lsst::afw::table::Shape::ErrValue const &value)
Set the uncertainty of the Shape mean in the given filter.
ndarray::Array< double const, 1 > const getIxx(std::string const &filter) const
void defineNumSources(std::string const &name)
Set the field used for the NumSources slot using a name.
void setPsfFluxCount(std::string const &filter, int const &value)
Set the number of measurements used to compute the PsfFlux mean in the given filter.
void defineTimeMax(std::string const &name)
Set the field used for the TimeMax slot using a name.
lsst::afw::table::SortedCatalogT< SourceClusterRecord const > ConstSourceClusterCatalog
void defineWeightedMeanCoordErr(lsst::afw::table::Key< lsst::afw::table::Covariance< lsst::afw::table::Point< float > > > const &key)
Set the field used for the WeightedMeanCoordErr slot using keys.
ndarray::Array< double const, 1 > const getInstFlux(std::string const &filter) const
SourceClusterRecord(boost::shared_ptr< SourceClusterTable > const &table)
void defineModelFlux(std::string const &filter, std::string const &name)
Set the fields used for the ModelFlux slot in the given filter to the fields named &quot;&lt;filter&gt;...
std::string const getNumSourcesDefinition(std::string const &filter) const
Return the name of the field used for the NumSources slot in the given filter.
lsst::afw::table::Flux::ErrValue const getApFluxErr(std::string const &filter) const
Get the uncertainty of the ApFlux mean in the given filter.
lsst::afw::table::SortedCatalogT< SourceClusterRecord > SourceClusterCatalog
boost::shared_ptr< SourceClusterTable > clone() const
Return a polymorphic deep copy of the table.
void setPsfFlux(std::string const &filter, lsst::afw::table::Flux::MeasValue const &value)
Set the inverse variance weighted mean of the PsfFlux slot measurement in the given filter...
lsst::afw::table::Key< int > const getPsfFluxCountKey(std::string const &filter) const
Return the key used for the PsfFlux slot count.
lsst::afw::table::Shape::MeasKey const getShapeKey(std::string const &filter) const
Return the key used for the Shape slot in the given filter.
lsst::afw::table::Key< double > const getTimeMinKey() const
Get the key used for the TimeMin slot.
SourceClusterColumnViewT< SourceClusterRecord > ColumnView
Record class that must contain a unique ID field and a celestial coordinate field.
Definition: Simple.h:45
void defineTimeMean(lsst::afw::table::Key< double > const &key)
Set the field used for the TimeMean slot using keys.
double const getTimeMin() const
Get the earliest observation time [MJD TAI] of sources in the cluster.
boost::int64_t RecordId
Type used for unique IDs for records.
Definition: misc.h:21
lsst::afw::table::Flux::MeasKey const getModelFluxKey(std::string const &filter) const
Return the key used for the ModelFlux slot in the given filter.
std::map< Citizen const *, CitizenInfo > table
Definition: Citizen.h:93
SourceClusterColumnViewT(lsst::afw::table::BaseColumnView const &base)
void setWeightedMeanCoordErr(Eigen::Matrix< float, 2, 2 > const &value)
Set the uncertainty of the WeightedMeanCoord slot.
void defineApFlux(std::string const &filter, lsst::afw::table::Flux::MeasKey const &mean, lsst::afw::table::Flux::ErrKey const &err, lsst::afw::table::Key< int > const &count)
Set the fields used for the ApFlux slot in the given filter using Keys.
Tag types used to declare specialized field types.
Definition: misc.h:35
lsst::afw::table::Flux::MeasValue const getPsfFlux(std::string const &filter) const
Get the inverse variance weighted mean of the PsfFlux slot measurement in the given filter...
void defineTimeMin(std::string const &name)
Set the field used for the TimeMin slot using a name.
A class to handle Icrs coordinates (inherits from Coord)
Definition: Coord.h:155
A three-element tuple of mean, uncertainty, and count keys.
Definition: SourceCluster.h:57
lsst::afw::table::Key< int > _keyWeightedMeanCoordCount
void defineWeightedMeanCoordErr(std::string const &name)
Set the field used for the WeightedMeanCoordErr slot using a name.
lsst::afw::table::Key< int > const getInstFluxCountKey(std::string const &filter) const
Return the key used for the InstFlux slot count.
KeyTuple< lsst::afw::table::Flux > keyModelFlux
std::string const getModelFluxDefinition(std::string const &filter) const
Return the name of the field used for the ModelFlux slot in the given filter.
lsst::afw::table::Flux::ErrKey const getApFluxErrKey(std::string const &filter) const
Return the key used for ApFlux slot error or covariance.
lsst::afw::table::Flux::MeasValue const getApFlux(std::string const &filter) const
Get the inverse variance weighted mean of the ApFlux slot measurement in the given filter...
void defineWeightedMeanCoordCount(std::string const &name)
Set the field used for the WeightedMeanCoordCount slot using a name.
int const getShapeCount(std::string const &filter) const
Get the number of measurements used to compute the Shape mean in the given filter.
KeyTuple< lsst::afw::table::Shape > addShapeFields(lsst::afw::table::Schema &schema, std::string const &filter, std::string const &name, std::string const &doc)
Convenience function to setup fields for shapes.
lsst::afw::table::Key< double > keyTimeMax
KeyTuple< lsst::afw::table::Flux > addFluxFields(lsst::afw::table::Schema &schema, std::string const &filter, std::string const &name, std::string const &doc, std::string const &unit)
Convenience function to setup fields for fluxes.
lsst::afw::table::Key< lsst::afw::table::Covariance< lsst::afw::table::Point< float > > > _keyCoordErr