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

Restructuration du programme de fit de pointage des antennes avec des fonctions, Reza 14/12/2018

parent 85ce088e
......@@ -11,10 +11,19 @@
using namespace std;
using namespace SOPHYA;
//-----------------------------------------------------------------
//---------- BeamTP (Theta,Phi) class
// represents a single dish beam response
//-----------------------------------------------------------------
//---- Systeme de coordonnees local Ox vers l'Est, Oy vers le Nord , Oz vertical, vers le zenith
// Angles dans le repere local , Elevation (par rapport au plan xOy) Azimuth (par rapport l'axe S-N) ,
// dans le sens croissant N->E->S-W
// Pointage de l'antenne dans le plan N-S (en declinaison)
// Si shift_dec>0 , azimuth=0 -> phi_antenne=90 , theta=shift_dec
// shift_dec<0 , azimuth=180 -> phi_antenne=270 (ou -90) , theta=-shift_dec
// Position angulaire des sources :
// - angle theta (avec Oz) = 90.-Elevation-source (degres)
// - angle phi (avec Ox) = 90.-Azimuth (degres)
//-------------------------------------------------------------------------
//--- ACBeam - represents a single dish beam response (auto-correlation)
//-------------------------------------------------------------------------
class ACBeam { // Auto-correlation beam
public:
// constructor: define a lobe to a circular dish of diameter D pointing to the direction (theta_b,phi_b)
......@@ -73,17 +82,17 @@ public:
// Compute the beam normalization factor such as the beam integral over the sphere is equal 1 (unity)
void AutoNormalizeBeam(int m=128, int prtlev=0)
{
//Timing Timer tm("BeamTP::AutoNormalizeBeam()"); tm.Nop();
//Timing Timer tm("ACBeam::AutoNormalizeBeam()"); tm.Nop();
double sum=0.;
SphereHEALPix<double> sphb=getBeamSph(sum,m);
if (sum>1.e-12) {
NormFac_=((double)sphb.NbPixels())/sum/4./M_PI;
if (prtlev>0)
cout << " BeamTP::AutoNormalizeBeam() sum="<<sum<<" NPixels="<<sphb.NbPixels()<<" -> NormFac=N/(sum*4Pi)="<<NormFac_<<endl;
cout << " ACBeam::AutoNormalizeBeam() sum="<<sum<<" NPixels="<<sphb.NbPixels()<<" -> NormFac=N/(sum*4Pi)="<<NormFac_<<endl;
}
else {
NormFac_=1.;
cout << " BeamTP::AutoNormalizeBeam()/Warning sum="<<sum<<" -> NormFac=1"<<endl;
cout << " ACBeam::AutoNormalizeBeam()/Warning sum="<<sum<<" -> NormFac=1"<<endl;
}
}
//--- return the Beam value for a given direction
......
This diff is collapsed.
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