DP3
SourceInfo.h
Go to the documentation of this file.
1 // SourceInfo.h: Info about a source
2 //
3 // Copyright (C) 2020 ASTRON (Netherlands Institute for Radio Astronomy)
4 // SPDX-License-Identifier: GPL-3.0-or-later
5 
6 #ifndef LOFAR_PARMDB_SOURCEINFO_H
7 #define LOFAR_PARMDB_SOURCEINFO_H
8 
9 #include <casacore/casa/Arrays/Array.h>
10 #include <casacore/measures/Measures/MDirection.h>
11 
12 namespace dp3::sky_model {
13 
14 class SourceInfo {
15  public:
18  enum Type { POINT = 0, GAUSSIAN = 1, DISK = 2, SHAPELET = 3 };
19 
30  SourceInfo(const std::string& name, Type type,
31  const std::string& refType = "J2000", bool useLogarithmicSI = true,
32  unsigned int spectralIndexNTerms = 0,
33  double spectralIndexRefFreqHz = 0.,
34  bool useRotationMeasure = false,
35  bool positionAngleIsAbsolute = false);
36 
39 
42 
44  const std::string& getName() const { return itsName; }
45 
47  Type getType() const { return itsType; }
48 
50  const std::string& getRefType() const { return itsRefType; }
51 
55  bool getHasLogarithmicSI() const { return itsHasLogarithmicSI; }
56 
60  bool getPositionAngleIsAbsolute() const { return itsPositionAngleIsAbsolute; }
61 
64  unsigned int getNSpectralTerms() const { return itsNSpTerms; }
65 
67  double getSpectralTermsRefFreq() const { return itsSpTermsRefFreq; }
68 
71  bool getUseRotationMeasure() const { return itsUseRotMeas; }
72 
75  const casacore::Array<double>& getShapeletCoeffI() const {
76  return itsShapeletCoeffI;
77  }
78  const casacore::Array<double>& getShapeletCoeffQ() const {
79  return itsShapeletCoeffQ;
80  }
81  const casacore::Array<double>& getShapeletCoeffU() const {
82  return itsShapeletCoeffU;
83  }
84  const casacore::Array<double>& getShapeletCoeffV() const {
85  return itsShapeletCoeffV;
86  }
87  double getShapeletScaleI() const { return itsShapeletScaleI; }
88  double getShapeletScaleQ() const { return itsShapeletScaleQ; }
89  double getShapeletScaleU() const { return itsShapeletScaleU; }
90  double getShapeletScaleV() const { return itsShapeletScaleV; }
91  void setShapeletCoeff(const casacore::Array<double>& I,
92  const casacore::Array<double>& Q,
93  const casacore::Array<double>& U,
94  const casacore::Array<double>& V);
95  void setShapeletScale(double scaleI, double scaleQ, double scaleU,
96  double scaleV);
98 
99  private:
100  string itsName;
101  Type itsType;
102  string itsRefType;
103  uint32_t itsNSpTerms;
104  double itsSpTermsRefFreq;
105  bool itsHasLogarithmicSI;
107  bool itsUseRotMeas;
108  bool itsPositionAngleIsAbsolute;
112  double itsShapeletScaleI;
113  double itsShapeletScaleQ;
114  double itsShapeletScaleU;
115  double itsShapeletScaleV;
116  casacore::Array<double> itsShapeletCoeffI;
117  casacore::Array<double> itsShapeletCoeffQ;
118  casacore::Array<double> itsShapeletCoeffU;
119  casacore::Array<double> itsShapeletCoeffV;
120 };
121 
122 } // namespace dp3::sky_model
123 
124 #endif
Definition: SourceInfo.h:14
SourceInfo(const SourceInfo &)
Copy constructor.
double getShapeletScaleV() const
Definition: SourceInfo.h:90
void setShapeletCoeff(const casacore::Array< double > &I, const casacore::Array< double > &Q, const casacore::Array< double > &U, const casacore::Array< double > &V)
const std::string & getName() const
Get the source name.
Definition: SourceInfo.h:44
unsigned int getNSpectralTerms() const
Definition: SourceInfo.h:64
const std::string & getRefType() const
Get the reference type.
Definition: SourceInfo.h:50
double getShapeletScaleU() const
Definition: SourceInfo.h:89
const casacore::Array< double > & getShapeletCoeffI() const
Definition: SourceInfo.h:75
double getShapeletScaleQ() const
Definition: SourceInfo.h:88
const casacore::Array< double > & getShapeletCoeffQ() const
Definition: SourceInfo.h:78
bool getHasLogarithmicSI() const
Definition: SourceInfo.h:55
void setShapeletScale(double scaleI, double scaleQ, double scaleU, double scaleV)
double getShapeletScaleI() const
Definition: SourceInfo.h:87
const casacore::Array< double > & getShapeletCoeffV() const
Definition: SourceInfo.h:84
double getSpectralTermsRefFreq() const
Get the reference frequency (in Hz) for the spectral index.
Definition: SourceInfo.h:67
Type getType() const
Get the source type.
Definition: SourceInfo.h:47
bool getPositionAngleIsAbsolute() const
Definition: SourceInfo.h:60
SourceInfo(const std::string &name, Type type, const std::string &refType="J2000", bool useLogarithmicSI=true, unsigned int spectralIndexNTerms=0, double spectralIndexRefFreqHz=0., bool useRotationMeasure=false, bool positionAngleIsAbsolute=false)
bool getUseRotationMeasure() const
Definition: SourceInfo.h:71
SourceInfo & operator=(const SourceInfo &)
Assignment.
const casacore::Array< double > & getShapeletCoeffU() const
Definition: SourceInfo.h:81
Type
Definition: SourceInfo.h:18
@ POINT
Definition: SourceInfo.h:18
@ SHAPELET
Definition: SourceInfo.h:18
@ GAUSSIAN
Definition: SourceInfo.h:18
@ DISK
Definition: SourceInfo.h:18
Definition: Patch.h:14