Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
BAORadio
AnaPAON4
Commits
e04fa54e
Commit
e04fa54e
authored
Mar 04, 2019
by
Reza ANSARI
Browse files
Suite (/Debug) impression summary des fits AutoCor et Cross-Cor, Reza 04/04/2019
parent
35126414
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
78 additions
and
7 deletions
+78
-7
trkacxfit.cc
trkacxfit.cc
+17
-0
trkfit.cc
trkfit.cc
+47
-6
trkfit.h
trkfit.h
+14
-1
No files found.
trkacxfit.cc
View file @
e04fa54e
...
...
@@ -174,6 +174,23 @@ int main (int narg, char* arg[])
cxbfit
.
saveExpectedCx
(
cxbckfile
);
}
}
{
// Resume resultat fits auto-correlations
cout
<<
" ---------- Summary Dish diameter / pointing fit from Auto-Correlations ---------- "
<<
endl
;
for
(
size_t
i
=
0
;
i
<
v_acxd
.
size
();
i
++
)
{
cout
<<
"================================= TrackSet["
<<
i
+
1
<<
"] ================================="
<<
endl
;
v_acxd
[
i
].
PrintACFitSummary
(
cout
);
}
cout
<<
"=================================================================================="
<<
endl
;
}
if
(
do_cxfit
)
{
// Resume resultat fit cross-cor
cout
<<
" ---------- Summary phase fitting for cross-correlations ---------- "
<<
endl
;
for
(
size_t
i
=
0
;
i
<
v_acxd
.
size
();
i
++
)
{
cout
<<
"================================= TrackSet["
<<
i
+
1
<<
"] ================================="
<<
endl
;
v_acxd
[
i
].
PrintCxPhaseFitSummary
(
cout
);
}
cout
<<
"=================================================================================="
<<
endl
;
}
Timer
tm
(
"trkacxfit"
);
}
// End of try bloc
catch
(
PThrowable
&
exc
)
{
...
...
trkfit.cc
View file @
e04fa54e
...
...
@@ -184,7 +184,13 @@ AcxDataSet::AcxDataSet(AcxDataSet const & a)
tot_npoints
(
a
.
tot_npoints
),
v_freqs
(
a
.
v_freqs
),
v_noAC
(
a
.
v_noAC
),
v_noCx
(
a
.
v_noCx
),
zenang
(
a
.
zenang
),
theta_0
(
a
.
theta_0
),
phi_0
(
a
.
phi_0
),
v_acbeams
(
a
.
v_acbeams
),
v_cxbeams
(
a
.
v_cxbeams
),
v_phase
(
a
.
v_phase
),
v_phi_0
(
a
.
v_phi_0
),
v_a_phi
(
a
.
v_a_phi
),
v_Acx
(
a
.
v_Acx
),
v_Bcx
(
a
.
v_Bcx
)
v_RcFit_ac
(
a
.
v_RcFit_ac
),
v_xi2red_ac
(
a
.
v_xi2red_ac
),
v_Ddish
(
a
.
v_Ddish
),
v_thetaant
(
a
.
v_thetaant
),
v_phiant
(
a
.
v_phiant
),
v_err_Ddish
(
a
.
v_err_Ddish
),
v_err_thetaant
(
a
.
v_err_thetaant
),
v_err_phiant
(
a
.
v_err_phiant
),
v_RcFit_cx
(
a
.
v_RcFit_cx
),
v_xi2red_cx
(
a
.
v_xi2red_cx
),
v_phase
(
a
.
v_phase
),
v_phi_0
(
a
.
v_phi_0
),
v_a_phi
(
a
.
v_a_phi
),
v_err_phi_0
(
a
.
v_err_phi_0
),
v_err_a_phi
(
a
.
v_err_a_phi
),
v_Acx
(
a
.
v_Acx
),
v_Bcx
(
a
.
v_Bcx
)
{
}
...
...
@@ -197,8 +203,12 @@ AcxDataSet & AcxDataSet::operator = (AcxDataSet const & a)
tot_npoints
=
a
.
tot_npoints
;
v_freqs
=
a
.
v_freqs
;
v_noAC
=
a
.
v_noAC
;
v_noCx
=
a
.
v_noCx
;
zenang
=
a
.
zenang
;
theta_0
=
a
.
theta_0
;
phi_0
=
a
.
phi_0
;
v_acbeams
=
a
.
v_acbeams
;
v_cxbeams
=
a
.
v_cxbeams
;
v_phase
=
a
.
v_phase
;
v_phi_0
=
a
.
v_phi_0
;
v_a_phi
=
a
.
v_a_phi
;
v_Acx
=
a
.
v_Acx
;
v_Bcx
=
a
.
v_Bcx
;
v_RcFit_ac
=
a
.
v_RcFit_ac
;
v_xi2red_ac
=
a
.
v_xi2red_ac
;
v_Ddish
=
a
.
v_Ddish
;
v_thetaant
=
a
.
v_thetaant
;
v_phiant
=
a
.
v_phiant
;
v_RcFit_cx
=
a
.
v_RcFit_cx
;
v_xi2red_cx
=
a
.
v_xi2red_cx
;
v_phase
=
a
.
v_phase
;
v_phi_0
=
a
.
v_phi_0
;
v_a_phi
=
a
.
v_a_phi
;
v_err_phi_0
=
a
.
v_err_phi_0
;
v_err_a_phi
=
a
.
v_err_a_phi
;
v_Acx
=
a
.
v_Acx
;
v_Bcx
=
a
.
v_Bcx
;
return
(
*
this
);
}
...
...
@@ -297,10 +307,30 @@ size_t AcxDataSet::ReadData(TrkInputDataSet & tkds)
return
tot_npoints
;
}
ostream
&
AcxDataSet
::
PrintACFitSummary
(
ostream
&
os
)
{
const
char
*
acnames
[
4
]
=
{
"AC-1"
,
"AC-2"
,
"AC-3"
,
"AC-4"
};
os
<<
"--------- Fitted Parameters and errors from AutoCorrelations (D-dish, Theta,Phi Antennes) "
<<
endl
;
for
(
size_t
i
=
0
;
i
<
getNbAutoCor
();
i
++
)
{
double
thetaant
=
v_thetaant
[
i
];
double
err_thetaant
=
v_err_thetaant
[
i
];
double
phiant
=
v_phiant
[
i
];
double
err_phiant
=
v_err_phiant
[
i
];
double
elevdeg
=
90.
-
Angle
(
thetaant
).
ToDegree
();
double
err_elevdeg
=
Angle
(
err_thetaant
).
ToDegree
();
double
azimdeg
=
90.
-
Angle
(
phiant
).
ToDegree
();
if
(
azimdeg
<
0.
)
azimdeg
+=
360.
;
double
err_azimdeg
=
Angle
(
err_phiant
).
ToDegree
();
os
<<
acnames
[
i
]
<<
" D= "
<<
setw
(
6
)
<<
v_Ddish
[
i
]
<<
" +/- "
<<
setw
(
6
)
<<
v_err_Ddish
[
i
];
os
<<
" Elev(deg)= "
<<
setw
(
8
)
<<
elevdeg
<<
" +/- "
<<
setw
(
8
)
<<
err_elevdeg
;
os
<<
" Azim(deg)= "
<<
setw
(
8
)
<<
azimdeg
<<
" +/- "
<<
setw
(
8
)
<<
err_azimdeg
;
os
<<
" RcFit="
<<
setw
(
6
)
<<
v_RcFit_ac
[
i
]
<<
" Xi2Red="
<<
setw
(
8
)
<<
v_xi2red_ac
[
i
]
<<
endl
;
}
return
os
;
}
ostream
&
AcxDataSet
::
PrintCxPhaseFitSummary
(
ostream
&
os
)
{
const
char
*
cxnames
[
6
]
=
{
"Cx-1x2"
,
"Cx-1x3"
,
"Cx-1x4"
,
"Cx-2x3"
,
"Cx-2x4"
,
"Cx-3x4"
};
os
<<
"--------- Fitted phases @1300 MHz "
;
os
<<
"---------
Cx-
Fitted phases @1300 MHz "
;
for
(
size_t
i
=
0
;
i
<
getNbCrossCor
();
i
++
)
os
<<
setw
(
8
)
<<
Angle
(
v_phase
[
i
]).
ToDegree
()
<<
" ; "
;
cout
<<
endl
;
double
dphi23
=
v_phase
[
1
]
-
v_phase
[
0
];
if
(
dphi23
<
0.
)
dphi23
+=
(
2.
*
M_PI
);
double
dphi24
=
v_phase
[
2
]
-
v_phase
[
0
];
if
(
dphi24
<
0.
)
dphi24
+=
(
2.
*
M_PI
);
...
...
@@ -309,10 +339,11 @@ ostream & AcxDataSet::PrintCxPhaseFitSummary(ostream & os)
os
<<
" Cx-2x3: Phi3-Phi2= "
<<
setw
(
6
)
<<
Angle
(
dphi23
).
ToDegree
()
<<
" EqualTo? Phi23= "
<<
setw
(
6
)
<<
Angle
(
v_phase
[
3
]).
ToDegree
()
<<
endl
;
os
<<
" Cx-2x4: Phi4-Phi2= "
<<
setw
(
6
)
<<
Angle
(
dphi24
).
ToDegree
()
<<
" EqualTo? Phi24= "
<<
setw
(
6
)
<<
Angle
(
v_phase
[
4
]).
ToDegree
()
<<
endl
;
os
<<
" Cx-3x4: Phi4-Phi3= "
<<
setw
(
6
)
<<
Angle
(
dphi34
).
ToDegree
()
<<
" EqualTo? Phi34= "
<<
setw
(
6
)
<<
Angle
(
v_phase
[
5
]).
ToDegree
()
<<
endl
;
os
<<
"--------- Fitted Parameters and errors ( Phi(freq)=phi0+a_phi*(freq-1250.)/250. "
<<
endl
;
os
<<
"---------
Cx-
Fitted Parameters and errors ( Phi(freq)=phi0+a_phi*(freq-1250.)/250. "
<<
endl
;
for
(
size_t
i
=
0
;
i
<
getNbCrossCor
();
i
++
)
{
os
<<
cxnames
[
i
]
<<
" phi0= "
<<
setw
(
8
)
<<
Angle
(
v_phi_0
[
i
]).
ToDegree
()
<<
" +/- "
<<
setw
(
8
)
<<
Angle
(
v_err_phi_0
[
i
]).
ToDegree
()
<<
" a_phi= "
<<
setw
(
8
)
<<
Angle
(
v_a_phi
[
i
]).
ToDegree
()
<<
" +/- "
<<
setw
(
8
)
<<
Angle
(
v_err_a_phi
[
i
]).
ToDegree
()
<<
endl
;
<<
" a_phi= "
<<
setw
(
8
)
<<
Angle
(
v_a_phi
[
i
]).
ToDegree
()
<<
" +/- "
<<
setw
(
8
)
<<
Angle
(
v_err_a_phi
[
i
]).
ToDegree
()
<<
" RcFit="
<<
setw
(
6
)
<<
v_RcFit_cx
[
i
]
<<
" Xi2Red="
<<
setw
(
8
)
<<
v_xi2red_cx
[
i
]
<<
endl
;
}
return
os
;
}
...
...
@@ -584,6 +615,14 @@ int ACxSetFitter::doACfit(string outfilename)
fit_ac_done
=
true
;
acxd_
.
v_acbeams
=
v_acbeams
;
acxd_
.
v_RcFit_ac
=
v_RcFit_ac
;
acxd_
.
v_xi2red_ac
=
v_xi2red_ac
;
acxd_
.
v_Ddish
=
v_Ddish
;
acxd_
.
v_thetaant
=
v_thetaant
;
acxd_
.
v_thetaant
=
v_thetaant
;
acxd_
.
v_err_Ddish
=
v_err_Ddish
;
acxd_
.
v_err_thetaant
=
v_err_thetaant
;
acxd_
.
v_err_phiant
=
v_err_phiant
;
return
0
;
}
...
...
@@ -841,6 +880,8 @@ int ACxSetFitter::doCxfit(string outfilenamecx, bool useAac, bool fg_B0, bool fg
ofr
<<
"# Cx-3x4: "
<<
setw
(
6
)
<<
Angle
(
dphi34
).
ToDegree
()
<<
" ==? "
<<
setw
(
6
)
<<
Angle
(
v_phase
[
5
]).
ToDegree
()
<<
endl
;
fit_cx_done
=
true
;
acxd_
.
v_cxbeams
=
v_cxbeams
;
acxd_
.
v_RcFit_cx
=
v_RcFit_cx
;
acxd_
.
v_xi2red_cx
=
v_xi2red_cx
;
acxd_
.
v_phase
=
v_phase
;
acxd_
.
v_phi_0
=
v_phi_0
;
acxd_
.
v_a_phi
=
v_a_phi
;
...
...
trkfit.h
View file @
e04fa54e
...
...
@@ -73,6 +73,7 @@ public:
static
inline
size_t
getNbAutoCor
()
{
return
4
;
}
static
inline
size_t
getNbCrossCor
()
{
return
6
;
}
ostream
&
PrintACFitSummary
(
ostream
&
os
);
ostream
&
PrintCxPhaseFitSummary
(
ostream
&
os
);
vector
<
vector
<
double
>
>
v_time_data
;
...
...
@@ -92,7 +93,19 @@ public:
double
theta_0
,
phi_0
;
// Theta, phi angles corresponding
vector
<
CxBeam
>
v_acbeams
;
// the four aut-correlations beams after fit
vector
<
CxBeam
>
v_cxbeams
;
// the six cross correlations after fit
vector
<
CxBeam
>
v_cxbeams
;
// the six cross correlations after fit
//---- Resultat fits auto-corr
vector
<
int
>
v_RcFit_ac
;
vector
<
double
>
v_xi2red_ac
;
vector
<
double
>
v_Ddish
;
vector
<
double
>
v_thetaant
,
v_phiant
;
vector
<
double
>
v_err_Ddish
;
vector
<
double
>
v_err_thetaant
,
v_err_phiant
;
//---- Resultat fits cross-corr
vector
<
int
>
v_RcFit_cx
;
vector
<
double
>
v_xi2red_cx
;
vector
<
double
>
v_phase
;
// fitted phases for individual cross-correlations at reference frequency - reference frequency = 1300 MHz
vector
<
double
>
v_phi_0
;
// fitted phases zero-point (Phi0) for individual cross-correlations
vector
<
double
>
v_a_phi
;
// fitted phases slope (a_phi = slope with frequency) for individual cross-correlations
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment