Commit 7c4759cc authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Amelioration print des resultats du fit des baselines, Reza 05/03/2019

parent e0d562c7
......@@ -1033,11 +1033,11 @@ int CxBaselineFitter::dofit(string outfilename, bool fgfixbaseline, bool fgphi0o
if (fgphi0only) mFit.SetFix(2*i+1, 0.);
v_err_phi_0[i]=0.; v_err_a_phi[i]=0.;
sprintf(pname,"BaselineShift_X_%d",(int)(i+2));
mFit.SetParam(6+3*i,pname,v_baselineshits[i].X(),0.02,-0.25,0.25);
mFit.SetParam(6+3*i,pname,v_baselineshits[i].X(),0.01,-0.25,0.25);
sprintf(pname,"BaselineShift_Y_%d",(int)(i+2));
mFit.SetParam(7+3*i,pname,v_baselineshits[i].Y(),0.02,-0.25,0.25);
mFit.SetParam(7+3*i,pname,v_baselineshits[i].Y(),0.01,-0.25,0.25);
sprintf(pname,"BaselineShift_Z_%d",(int)(i+2));
mFit.SetParam(8+3*i,pname,v_baselineshits[i].Z(),0.02,-0.25,0.25);
mFit.SetParam(8+3*i,pname,v_baselineshits[i].Z(),0.01,-0.25,0.25);
if (fgfixbaseline) {
cout << " ... fitting phases only, fixed baselines "<<endl;
mFit.SetFix(6+3*i); mFit.SetFix(7+3*i); mFit.SetFix(8+3*i);
......@@ -1046,7 +1046,7 @@ int CxBaselineFitter::dofit(string outfilename, bool fgfixbaseline, bool fgphi0o
cout << " Performing the fit (tot_npoints_fit= "<<tot_npoints_fit<<" ?= (npoints2="<<npoints2<<") ..."<< endl;
rcfit = mFit.doFit(); xi2red=-99999.;
cout<< "------ Fit result Reduce_Chisquare = " << mFit.GetChi2Red()<< " nstep="<<mFit.GetNStep() << " rc="<<rcfit<<endl;
mFit.PrintFit();
if (_prtlevel_>1) mFit.PrintFit();
for(size_t j=0; j<4; j++)
for(size_t i=0; i<(NB_ANTENNES-1); i++) {
......@@ -1067,7 +1067,15 @@ int CxBaselineFitter::dofit(string outfilename, bool fgfixbaseline, bool fgphi0o
double ezs=mFit.GetParmErr(i*3+8);
v_baselineshits[i]=Vector3d(xs,ys,zs);
v_err_baselineshits[i]=Vector3d(exs,eys,ezs);
// on calcule la phase ajustee pour la frequence de reference 1300 MHz
double phase=gxi2.getPhase4Freq(v_phi_0[i],v_a_phi[i],1300.);
while (phase<0.) phase += 2.*M_PI;
while (phase>2.*M_PI) phase -= 2.*M_PI;
cout <<"---Ant["<<i+2<<" Phase(@1300MHz)= "<<setw(10)<<Angle(phase).ToDegree()<<" phi_0= "<<setw(10)
<<Angle(v_phi_0[i]).ToDegree()<<" +/- "<<setw(10)<<Angle(v_err_phi_0[i]).ToDegree()<<" deg."
<<" a_phi= "<<setw(8)<<Angle(v_a_phi[i]).ToDegree()<<" +/- "<<setw(10)
<<Angle(v_err_a_phi[i]).ToDegree()<<" deg/250 MHz"<<endl;
cout <<" Baselineshift["<<i+2<<" = "<<v_baselineshits[i] << " +/- " << v_err_baselineshits[i] << " m."<<endl;
}
fit_done=true;
return 0;
......
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