Commit cfd0d826 authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Classe P4RAMapUtil completee et information sur les les limites/resolution en...

Classe P4RAMapUtil completee et information sur les les limites/resolution en RA ajoutee ds la partie DVList-Info(), Reza 19/08/2018
parent 7dcd115e
......@@ -620,22 +620,29 @@ double P4Coords::RAFromTimeTUXE(TimeStamp const & tu)
P4RAMapUtil::P4RAMapUtil(P4AnaParams const& param)
: RAcenter_(param.RAcenter_), RAwidth_(param.RAwidth_), RAresol_mn_(param.RAresol_mn_)
{
if ((RAcenter_<0.)||(RAcenter_>=24.)||(RAwidth_<=1.e-19)||(RAwidth_>24.)||(RAresol_mn_<1.e-19)||(RAresol_mn_>360.))
throw ParmError("P4RAMapUtil::P4RAMapUtil(P4AnaParams const&) Bad RAcenter_ or RAwidth_ or RAresol_mn_ parameters");
invres_hours_ = 60./RAresol_mn_;
size_ = (sa_size_t)(RAwidth_*invres_hours_);
size_24hours_ = (sa_size_t)(24.*invres_hours_);
cout << " P4RAMapUtil: Resol(min)="<<RAresol_mn_<<" size="<< size_<<" size for 24 hours="<<size_24hours_<<endl;
checkRALimits();
}
P4RAMapUtil::P4RAMapUtil(double RAcenter, double RAwidth, double RAresol_mn)
: RAcenter_(RAcenter), RAwidth_(RAwidth), RAresol_mn_(RAresol_mn)
{
checkRALimits();
}
void P4RAMapUtil::checkRALimits()
{
if ((RAcenter_<0.)||(RAcenter_>=24.)||(RAwidth_<=1.e-19)||(RAwidth_>24.)||(RAresol_mn_<1.e-19)||(RAresol_mn_>360.))
throw ParmError("P4RAMapUtil::P4RAMapUtil(RAcenter,...) Bad RAcenter_ or RAwidth_ or RAresol_mn_ parameters");
throw ParmError("P4RAMapUtil::checkRALimits() Bad RAcenter_ or RAwidth_ or RAresol_mn_ parameters");
invres_hours_ = 60./RAresol_mn_;
size_ = (sa_size_t)(RAwidth_*invres_hours_);
size_24hours_ = (sa_size_t)(24.*invres_hours_);
cout << " P4RAMapUtil: Resol(min)="<<RAresol_mn_<<" size="<< size_<<" size for 24 hours="<<size_24hours_<<endl;
// computing limits
double demilargeur=RAwidth_*0.5;
double RAmin_ = RAcenter_-demilargeur;
double RAmax_ = RAcenter_+demilargeur;
cout << "P4RAMapUtil::checkRALimits(): "<<RAmin_<<" <=ra<= "<<RAmax_<<" Resol(min)="<<RAresol_mn_
<<" size="<< size_<<" size for 24 hours="<<size_24hours_<<endl;
return;
}
sa_size_t P4RAMapUtil::getMapIndex(double ra)
......
......@@ -251,10 +251,23 @@ public:
P4RAMapUtil(double RAcenter, double RAwidth=24., double RAresol_mn=1.);
inline sa_size_t getMapSize() { return size_; }
//! return the index in map for ra (in decimal hours) - return negative if outside map
//! return the index in map for \b ra (Right Ascension, in decimal hours) - return negative if outside map
sa_size_t getMapIndex(double ra);
//! return the map center RA (Right Ascension, in decimal hours)
inline double getRACenter() const { return RAcenter_; }
//! return the map center RA (Right Ascension, in decimal hours)
inline double getRAWidth() const { return RAwidth_; }
//! return the map resolution RA (in minute)
inline double getRAResolution() const { return RAresol_mn_; }
//! return the minimum RA limit of the map (Right Ascension, in decimal hours)
inline double getRAMin() const { return RAmin_; }
//! return the maximum RA limit of the map (Right Ascension, in decimal hours)
inline double getRAMax() const { return RAmax_; }
//! method called by the constructor to compute and check limits
void checkRALimits();
double RAcenter_, RAwidth_, RAresol_mn_;
double RAmin_, RAmax_;
double invres_hours_;
sa_size_t size_;
sa_size_t size_24hours_;
......
......@@ -239,6 +239,12 @@ int main(int narg, const char* arg[])
if (fgelevset) visaI["ELEVATION"]=elevation;
visaI["FREQCENTER"]=freqbands.getBand(l).getCentralFreq();
visaI["FREQBAND"]=freqbands.getBand(l).getBandwidth();
visaI["RA_MAP_SIZE"]=ram.getMapSize();
visaI["RA_CENTER"]=ram.getRACenter();
visaI["RA_WIDTH"]=ram.getRAWidth();
visaI["RA_MIN"]=ram.getRAMin();
visaI["RA_MAX"]=ram.getRAMax();
visaI["RA_RESOL_MIN"]=ram.getRAResolution();
arr.Info()=visaI;
visaI["DATADESC"]="PAON4 Auto/Cx HH visibilities AC,1-2,1-3,1-4,2-3,2-4,3-4";
arrZ.Info()=visaI;
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment