lsst.jointcal  16.0-28-gfc9ea6c+5
RefStar.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 /*
3  * This file is part of jointcal.
4  *
5  * Developed for the LSST Data Management System.
6  * This product includes software developed by the LSST Project
7  * (https://www.lsst.org).
8  * See the COPYRIGHT file at the top-level directory of this distribution
9  * for details of code ownership.
10  *
11  * This program is free software: you can redistribute it and/or modify
12  * it under the terms of the GNU General Public License as published by
13  * the Free Software Foundation, either version 3 of the License, or
14  * (at your option) any later version.
15  *
16  * This program is distributed in the hope that it will be useful,
17  * but WITHOUT ANY WARRANTY; without even the implied warranty of
18  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
19  * GNU General Public License for more details.
20  *
21  * You should have received a copy of the GNU General Public License
22  * along with this program. If not, see <https://www.gnu.org/licenses/>.
23  */
24 
25 #ifndef LSST_JOINTCAL_REF_STAR_H
26 #define LSST_JOINTCAL_REF_STAR_H
27 
28 #include <vector>
29 #include <fstream>
30 
32 #include "lsst/jointcal/StarList.h"
33 
34 namespace lsst {
35 namespace jointcal {
36 
39 class RefStar : public BaseStar {
40 public:
41  RefStar(double xx, double yy, double defaultFlux, double defaultFluxErr, std::vector<double>& refFluxList,
42  std::vector<double>& refFluxErrList)
43  : BaseStar(xx, yy, defaultFlux, defaultFluxErr),
44  _refFluxList(refFluxList),
45  _refFluxErrList(refFluxErrList) {}
46 
48  RefStar(RefStar const&) = delete;
49  RefStar(RefStar&&) = delete;
50  RefStar& operator=(RefStar const&) = default;
51  RefStar& operator=(RefStar&&) = delete;
52 
53  void dump(std::ostream& stream = std::cout) const {
54  BaseStar::dump(stream);
55  stream << " refFlux: [";
56  for (auto x : _refFluxList) {
57  stream << x << ", ";
58  }
59  stream << "]";
60  }
61 
62  using BaseStar::getFlux;
65  double getFlux(size_t filter) const { return _refFluxList[filter]; }
67  double getFluxErr(size_t filter) const { return _refFluxErrList[filter]; }
68 
69 private:
70  // on-sky flux, in nanojansky, per filter
71  std::vector<double> _refFluxList;
72  std::vector<double> _refFluxErrList;
73 };
74 
75 /****** RefStarList ***********/
76 
77 class Frame;
78 
79 // typedef StarList<RefStar> RefStarList;
80 class RefStarList : public StarList<RefStar> {};
81 
82 typedef RefStarList::const_iterator RefStarCIterator;
83 typedef RefStarList::iterator RefStarIterator;
84 
87 const BaseStarList& Ref2Base(const RefStarList& This);
88 const BaseStarList* Ref2Base(const RefStarList* This);
89 } // namespace jointcal
90 } // namespace lsst
91 
92 #endif // LSST_JOINTCAL_REF_STAR_H
Objects used as position anchors, typically USNO stars.
Definition: RefStar.h:39
double getFluxErr(size_t filter) const
reference fluxErr in a given filter
Definition: RefStar.h:67
RefStar(double xx, double yy, double defaultFlux, double defaultFluxErr, std::vector< double > &refFluxList, std::vector< double > &refFluxErrList)
Definition: RefStar.h:41
RefStar & operator=(RefStar const &)=default
virtual void dump(std::ostream &stream=std::cout) const
utility
Definition: BaseStar.h:82
double getFluxErr() const
Definition: BaseStar.h:100
double x
coordinate
Definition: Point.h:41
The base class for handling stars. Used by all matching routines.
Definition: BaseStar.h:50
std::lists of Stars.
Definition: StarList.h:58
rectangle with sides parallel to axes.
Definition: Frame.h:38
Class for a simple mapping implementing a generic AstrometryTransform.
double getFlux() const
Definition: BaseStar.h:96
RefStarList::const_iterator RefStarCIterator
Definition: RefStar.h:82
void dump(std::ostream &stream=std::cout) const
utility
Definition: RefStar.h:53
double getFlux(size_t filter) const
reference flux in a given filter
Definition: RefStar.h:65
RefStarList::iterator RefStarIterator
Definition: RefStar.h:83
STL class.
BaseStarList & Ref2Base(RefStarList &This)
Definition: RefStar.cc:34