10 #ifndef DP3_SKY_MODEL_PATCHINFO_H
11 #define DP3_SKY_MODEL_PATCHINFO_H
25 PatchInfo(
const std::string& name,
double ra,
double dec,
int category,
30 itsCategory(category),
34 const std::string&
getName()
const {
return itsName; }
37 double getRa()
const {
return itsRa; }
40 double getDec()
const {
return itsDec; }
49 void setRa(
double ra) { itsRa = ra; }
52 void setDec(
double dec) { itsDec = dec; }
64 double itsAppBrightness = 0.0;
75 explicit PatchSumInfo(
unsigned int patchId) : itsPatchId(patchId) {}
78 void add(
double ra,
double dec,
double flux);
81 double getFlux()
const {
return itsSumFlux; }
85 return std::atan2(itsSumY / itsSumFlux, itsSumX / itsSumFlux);
87 double getDec()
const {
return std::asin(itsSumZ / itsSumFlux); }
96 double itsSumFlux = 0.0;
97 unsigned int itsPatchId = 0;
Info about a patch.
Definition: PatchInfo.h:19
const std::string & getName() const
Get the patch name.
Definition: PatchInfo.h:34
double getDec() const
Get the declination in radians (J2000).
Definition: PatchInfo.h:40
double apparentBrightness() const
Get the apparent brightness of the patch (in Jy).
Definition: PatchInfo.h:46
void setDec(double dec)
Set the declination in radians (J2000).
Definition: PatchInfo.h:52
double getRa() const
Get the right ascension in radians (J2000).
Definition: PatchInfo.h:37
void setApparentBrightness(double apparentBrightness)
Set the apparent brightness of the patch (in Jy).
Definition: PatchInfo.h:55
PatchInfo(const std::string &name, double ra, double dec, int category, double apparentBrightness)
Definition: PatchInfo.h:25
void setRa(double ra)
Set the right ascension in radians (J2000).
Definition: PatchInfo.h:49
int getCategory() const
Get the category.
Definition: PatchInfo.h:43
Info about a patch direction.
Definition: PatchInfo.h:71
unsigned int getPatchId() const
Get the patchId.
Definition: PatchInfo.h:90
double getDec() const
Definition: PatchInfo.h:87
double getFlux() const
Get the total flux of the patch.
Definition: PatchInfo.h:81
void add(double ra, double dec, double flux)
Add a source direction to determine the average patch direction.
PatchSumInfo(unsigned int patchId)
Definition: PatchInfo.h:75
double getRa() const
Get the patch direction (flux-weighted average direction of its sources).
Definition: PatchInfo.h:84
void toSkyModel(std::ostream &output, const PatchInfo &patch)
Output a patch to a sky_model text file.
std::ostream & operator<<(std::ostream &os, const PatchInfo &info)
Show the contents of a PatchInfo object.