10 #ifndef LOFAR_PARMDB_PATCHINFO_H
11 #define LOFAR_PARMDB_PATCHINFO_H
36 PatchInfo(
const std::string& name,
double ra,
double dec,
int category,
41 itsCategory(category),
45 const std::string&
getName()
const {
return itsName; }
48 double getRa()
const {
return itsRa; }
51 double getDec()
const {
return itsDec; }
60 void setRa(
double ra) { itsRa = ra; }
63 void setDec(
double dec) { itsDec = dec; }
75 double itsAppBrightness{0.0};
97 itsPatchId(patchId) {}
100 void add(
double ra,
double dec,
double flux);
107 return std::atan2(itsSumY / itsSumFlux, itsSumX / itsSumFlux);
109 double getDec()
const {
return std::asin(itsSumZ / itsSumFlux); }
119 unsigned int itsPatchId;
Input stream for a blob.
Definition: BlobIStream.h:43
Output stream for a blob.
Definition: BlobOStream.h:40
Info about a patch.
Definition: PatchInfo.h:29
PatchInfo(const std::string &name, double ra, double dec, int category, double apparentBrightness)
Definition: PatchInfo.h:36
double getRa() const
Get the right ascension in radians (J2000).
Definition: PatchInfo.h:48
const std::string & getName() const
Get the patch name.
Definition: PatchInfo.h:45
double getDec() const
Get the declination in radians (J2000).
Definition: PatchInfo.h:51
double apparentBrightness() const
Get the apparent brightness of the patch (in Jy).
Definition: PatchInfo.h:57
void setDec(double dec)
Set the declination in radians (J2000).
Definition: PatchInfo.h:63
void setApparentBrightness(double apparentBrightness)
Set the apparent brightness of the patch (in Jy).
Definition: PatchInfo.h:66
int getCategory() const
Get the category.
Definition: PatchInfo.h:54
PatchInfo()
Default constructor.
Definition: PatchInfo.h:32
void setRa(double ra)
Set the right ascension in radians (J2000).
Definition: PatchInfo.h:60
Info about a patch direction.
Definition: PatchInfo.h:88
unsigned int getPatchId() const
Get the patchId.
Definition: PatchInfo.h:112
void add(double ra, double dec, double flux)
Add a source direction to determine the average patch direction.
double getFlux() const
Get the total flux of the patch.
Definition: PatchInfo.h:103
double getDec() const
Definition: PatchInfo.h:109
double getRa() const
Get the patch direction (flux-weighted average direction of its sources).
Definition: PatchInfo.h:106
PatchSumInfo(unsigned int patchId)
Definition: PatchInfo.h:92
std::ostream & operator<<(std::ostream &os, const PatchInfo &info)
Show the contents of a PatchInfo object.
blob::BlobIStream operator>>(blob::BlobIStream &os, PatchInfo &info)
Read the contents of a PatchInfo object from a blob.
void toSkymodel(std::ostream &output, const PatchInfo &patch)
This file has generic helper routines for testing steps.
Definition: AntennaConfig.h:53