lsst.jointcal  master-ge1f85bc4d5+2
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
FittedStar.h
Go to the documentation of this file.
1 // -*- LSST-C++ -*-
2 #ifndef LSST_JOINTCAL_FITTED_STAR_H
3 #define LSST_JOINTCAL_FITTED_STAR_H
4 
5 #include <iostream>
6 #include <fstream>
7 
10 
11 namespace lsst {
12 namespace jointcal {
13 
14 class MeasuredStar;
15 class RefStar;
16 class Gtransfo;
17 
20 
22 struct PmBlock {
23  // proper motion in x and y. Units depend on how you fit them
24  double pmx, pmy;
25  double epmx, epmy, epmxy;
26  double color; // OK it is unrelated, but associated in practice
27  bool mightMove;
28 
29  PmBlock() : pmx(0), pmy(0), epmx(0), epmy(0), epmxy(0), color(0), mightMove(false){};
30 };
31 
37 class FittedStar : public BaseStar, public PmBlock {
38 private:
39  double _mag;
40  int _gen;
41  double _wmag;
42  unsigned _indexInMatrix;
43  int _measurementCount;
44  const RefStar* _refStar;
45 
46  double _fluxErr;
47 
48 public:
50  : BaseStar(),
51  _mag(-1),
52  _gen(-1),
53  _wmag(0),
54  _indexInMatrix(-1),
55  _measurementCount(0),
56  _refStar(nullptr) {}
57 
58  FittedStar(const BaseStar& baseStar)
59  : BaseStar(baseStar),
60  _mag(-1),
61  _gen(-1),
62  _wmag(0),
63  _indexInMatrix(0),
64  _measurementCount(0),
65  _refStar(nullptr) {}
66 
68  FittedStar(const MeasuredStar& measuredStar);
69 
72  FittedStar(FittedStar const&) = default;
73  FittedStar(FittedStar&&) = delete;
74  FittedStar& operator=(FittedStar const&) = delete;
75  FittedStar& operator=(FittedStar&&) = delete;
76 
79  _indexInMatrix = -1;
80  _measurementCount = 0;
81  _refStar = nullptr;
82  _wmag = 0;
83  }
84 
86  void dump(std::ostream& stream = std::cout) const {
87  BaseStar::dump(stream);
88  stream << " mcount: " << _measurementCount;
89  }
90 
92  int getMeasurementCount() const { return _measurementCount; }
93  int& getMeasurementCount() { return _measurementCount; }
94 
96  double getMag() const { return _mag; }
97  int getGeneration() const { return _gen; }
98 
100  void setMag(double mag) { _mag = mag; }
101 
103  void addMagMeasurement(double magValue, double magWeight);
104 
106  void setIndexInMatrix(const unsigned& index) { _indexInMatrix = index; };
107 
109  int getIndexInMatrix() const { return _indexInMatrix; }
110 
112  void setRefStar(const RefStar* _refStar);
113 
115  const RefStar* getRefStar() const { return _refStar; };
116 };
117 
118 /****** FittedStarList */
119 
121 class FittedStarList : public StarList<FittedStar> {
122 public:
124 
127 };
128 
129 typedef FittedStarList::const_iterator FittedStarCIterator;
130 typedef FittedStarList::iterator FittedStarIterator;
131 
134 const BaseStarList& Fitted2Base(const FittedStarList& This);
135 const BaseStarList* Fitted2Base(const FittedStarList* This);
136 } // namespace jointcal
137 } // namespace lsst
138 
139 #endif // LSST_JOINTCAL_FITTED_STAR_H
Objects used as position anchors, typically USNO stars.
Definition: RefStar.h:16
const RefStar * getRefStar() const
Get the astrometric reference star associated with this star.
Definition: FittedStar.h:115
objects whose position is going to be fitted. Coordinates in Common Tangent Plane.
Definition: FittedStar.h:22
void addMagMeasurement(double magValue, double magWeight)
this routine will hopefully soon disappear.
Definition: FittedStar.cc:41
double getMag() const
derived using available zero points in input images. In the absence ofZP, ZP= 0.
Definition: FittedStar.h:96
FittedStarList::const_iterator FittedStarCIterator
Definition: FittedStar.h:129
int getGeneration() const
Definition: FittedStar.h:97
The base class for handling stars. Used by all matching routines.
Definition: BaseStar.h:22
std::lists of Stars.
Definition: StarList.h:35
void setIndexInMatrix(const unsigned &index)
index is a value that a fit can set and reread....
Definition: FittedStar.h:106
void setRefStar(const RefStar *_refStar)
Set the astrometric reference star associated with this star.
Definition: FittedStar.cc:30
int getIndexInMatrix() const
Definition: FittedStar.h:109
FittedStarList::iterator FittedStarIterator
Definition: FittedStar.h:130
void setMag(double mag)
Definition: FittedStar.h:100
A list of FittedStar s. Such a list is typically constructed by Associations.
Definition: FittedStar.h:121
objects measured on actual images.
Definition: MeasuredStar.h:18
virtual void dump(std::ostream &stream=std::cout) const
utility
Definition: BaseStar.h:57
BaseStarList & Fitted2Base(FittedStarList &This)
Definition: FittedStar.cc:48
int getMeasurementCount() const
Definition: FittedStar.h:92
FittedStar & operator=(FittedStar const &)=delete
void dump(std::ostream &stream=std::cout) const
utility
Definition: FittedStar.h:86
The objects which have been measured several times.
Definition: FittedStar.h:37
FittedStar(const BaseStar &baseStar)
Definition: FittedStar.h:58