Commit 5235bf10 authored by Reza  ANSARI's avatar Reza ANSARI
Browse files

Ajout de deux scripts piapp pour tracer les resultats de fit de pointage et...

Ajout de deux scripts piapp pour tracer les resultats de fit de pointage et phases avec les satellites, Reza 25/07/2019
parent 5a826df2
###################################################################
#### Analyse dephasage ajustes a partir des satellites
#### AnaPAON4 - Reza , Juillet 2019
###################################################################
setaxesatt 'font=helvetica,bold,16 fixedfontsize minorticks'
##### Le NTuple des phases AVANT correction des baselines
newnt nt z p2 p3 p4 p23 p24 p34 cph flg
ntfrascii nt ntphase.txt
print nt
set T (M_PI*z/180.)
# zone 1 2
# plot2d nt z p2 flg<1 'marker=fbox,7 nsta'
# plot2d nt z 130+360*(7*cos($T)+1.3*sin($T))/23 1 'marker=circle,9 same nsta red'
# plot2d nt z p34 flg<1 'marker=fbox,7 nsta'
# plot2d nt z 282+360*(2*cos($T)+1.4*sin($T))/23 1 'marker=circle,9 same nsta red'
# plot2d nt z p3+cph flg<1 'marker=fbox,7 nsta'
# Define the trigger delay phase correction offset
CPHOFF = 0.
newwin 2 1 1000 500
echo '======== Fitting Phase Phi12 ===> Position 2-1 '
exptovec Vz nt z flg<2 'nodisp'
exptovec Vp2 nt p2 flg<2 'nodisp'
del C
del Vph
cp Vp2 Vph
c++execfrf myfit.cc myfit.h
vec2var C viC
set vvC ( $viC )
plot2d nt z p2 flg<2 'marker=fbox,9 nsta notit'
settitle ' Phase Phi-12 = f(ZenithAngle) ' ' ' 'font=helvetica,bold,16 black'
setaxelabels 'Zenith Angle (deg)' 'Phase (deg)' 'font=helvetica,bolditalic,16 black'
# vecplot Vz Vp2 'marker=fbox,7 nocpts'
func $vvC[0]+($vvC[1]*cos(x*M_PI/180.)+$vvC[2]*sin(x*M_PI/180.))*360./23. -40 15 50 'line=solid,2 same red'
set lines ( "Phase_12=C(0)=$vvC[0] deg." "DeltaZ_12=C(1)=$vvC[1] cm" "DeltaY_12=C(2)=$vvC[2] cm" )
set cols ( red red red )
textdrawer lines cols 'font=helvetica,bold,16 black'
echo '======== Fitting Phase Phi13 ===> Position 3-1 '
exptovec Vz nt z flg<1 'nodisp'
exptovec Vp3 nt p3+cph+$CPHOFF flg<1 'nodisp'
del C
del Vph
cp Vp3 Vph
c++execfrf myfit.cc myfit.h
vec2var C viC
set vvC ( $viC )
plot2d nt z p3+cph+$CPHOFF flg<1 'marker=fbox,9 nsta notit'
settitle ' Phase Phi-13 = f(ZenithAngle) ' ' ' 'font=helvetica,bold,16 black'
setaxelabels 'Zenith Angle (deg)' 'Phase (deg)' 'font=helvetica,bolditalic,16 black'
func $vvC[0]+($vvC[1]*cos(x*M_PI/180.)+$vvC[2]*sin(x*M_PI/180.))*360./23. -40 15 50 'line=solid,2 same red'
set lines ( "Phase_13=C(0)=$vvC[0] deg." "DeltaZ_13=C(1)=$vvC[1] cm" "DeltaY_13=C(2)=$vvC[2] cm" )
set cols ( red red red )
textdrawer lines cols 'font=helvetica,bold,16 black'
w2ps
newwin 2 1 1000 500
echo '======== Fitting Phase Phi14 ===> Position 4-1 '
exptovec Vz nt z flg<1 'nodisp'
exptovec Vp4 nt p4+cph+$CPHOFF flg<1 'nodisp'
del C
del Vph
cp Vp4 Vph
c++execfrf myfit.cc myfit.h
vec2var C viC
set vvC ( $viC )
plot2d nt z p4+cph+$CPHOFF flg<1 'marker=fbox,9 nsta notit'
settitle ' Phase Phi-14 = f(ZenithAngle) ' ' ' 'font=helvetica,bold,16 black'
setaxelabels 'Zenith Angle (deg)' 'Phase (deg)' 'font=helvetica,bolditalic,16 black'
func $vvC[0]+($vvC[1]*cos(x*M_PI/180.)+$vvC[2]*sin(x*M_PI/180.))*360./23. -40 15 50 'line=solid,2 same red'
set lines ( "Phase=C(0)=$vvC[0] deg" "DeltaZ_14=C(1)=$vvC[1] cm" "DeltaY_14=C(2)=$vvC[2] cm" )
set cols ( red red red )
textdrawer lines cols 'font=helvetica,bold,16 black'
echo '======== Fitting Phase Phi34 ===> Position 4-3 '
exptovec Vz nt z flg<1 'nodisp'
exptovec Vp34 nt p34 flg<1 'nodisp'
del C
del Vph
cp Vp34 Vph
c++execfrf myfit.cc myfit.h
vec2var C viC
set vvC ( $viC )
plot2d nt z p34 flg<1 'marker=fbox,9 nsta notit'
settitle ' Phase Phi-34 = f(ZenithAngle) ' ' ' 'font=helvetica,bold,16 black'
setaxelabels 'Zenith Angle (deg)' 'Phase (deg)' 'font=helvetica,bolditalic,16 black'
func $vvC[0]+($vvC[1]*cos(x*M_PI/180.)+$vvC[2]*sin(x*M_PI/180.))*360./23. -40 15 50 'line=solid,2 same red'
set lines ( "Phase_34=C(0)=$vvC[0] deg." "DeltaZ_34=C(1)=$vvC[1] cm" "DeltaY_34=C(2)=$vvC[2] cm" )
set cols ( red red red )
textdrawer lines cols 'font=helvetica,bold,16 black'
w2ps
newwin 2 1 1000 500
echo '======== Fitting Phase Phi23 ===> Position 3-2 '
exptovec Vz nt z flg<1 'nodisp'
exptovec Vp23 nt p23+cph+$CPHOFF flg<1 'nodisp'
del C
del Vph
cp Vp23 Vph
c++execfrf myfit.cc myfit.h
vec2var C viC
set vvC ( $viC )
plot2d nt z p23+cph+$CPHOFF flg<1 'marker=fbox,9 nsta notit'
settitle ' Phase Phi-23 = f(ZenithAngle) ' ' ' 'font=helvetica,bold,16 black'
setaxelabels 'Zenith Angle (deg)' 'Phase (deg)' 'font=helvetica,bolditalic,16 black'
func $vvC[0]+($vvC[1]*cos(x*M_PI/180.)+$vvC[2]*sin(x*M_PI/180.))*360./23. -40 15 50 'line=solid,2 same red'
set lines ( "Phase_23=C(0)=$vvC[0] deg." "DeltaZ_23=C(1)=$vvC[1] cm" "DeltaY_23=C(2)=$vvC[2] cm" )
set cols ( red red red )
textdrawer lines cols 'font=helvetica,bold,16 black'
echo '======== Fitting Phase Phi24 ===> Position 4-2 '
exptovec Vz nt z flg<1 'nodisp'
exptovec Vp24 nt p24+cph+$CPHOFF flg<1 'nodisp'
del C
del Vph
cp Vp24 Vph
c++execfrf myfit.cc myfit.h
vec2var C viC
set vvC ( $viC )
plot2d nt z p24+cph+$CPHOFF flg<1 'marker=fbox,9 nsta notit'
settitle ' Phase Phi-24 = f(ZenithAngle) ' ' ' 'font=helvetica,bold,16 black'
setaxelabels 'Zenith Angle (deg)' 'Phase (deg)' 'font=helvetica,bolditalic,16 black'
func $vvC[0]+($vvC[1]*cos(x*M_PI/180.)+$vvC[2]*sin(x*M_PI/180.))*360./23. -40 15 50 'line=solid,2 same red'
set lines ( "Phase_24=C(0)=$vvC[0] deg." "DeltaZ_24=C(1)=$vvC[1] cm" "DeltaY_24=C(2)=$vvC[2] cm" )
set cols ( red red red )
textdrawer lines cols 'font=helvetica,bold,16 black'
w2ps
#################################################################
##### Le NTuple des phases apres correction des baselines
setaxesatt 'font=helvetica,bold,16 fixedfontsize minorticks'
newnt ntc z p2 p3 p4 p23 p24 p34 cph flg
ntfrascii ntc ntphasecor.txt
print ntc
newwin
plot2d ntc z cph+$CPHOFF flg<3.5 'marker=box,11 navyblue nsta notit'
plot2d ntc z cph+$CPHOFF flg<0.5 'marker=fcircle,7 red same nsta notit'
settitle 'Trigger delay correction (3,4)-(1,2) 2ns->20.5 deg' ' ' 'font=helvetica,bold,14 black'
setaxelabels 'Zenith Angle (deg)' 'TriggerDelay (deg)' 'font=helvetica,bolditalic,16 black'
w2ps
newwin 2 1 1000 500
plot2d ntc z p2 flg<3.5 'marker=box,11 navyblue nsta notit'
plot2d ntc z p2 flg<0.5 'marker=fcircle,7 red same nsta notit'
settitle 'BaselineCor Phase Phi-12 = f(ZenithAngle) ' ' ' 'font=helvetica,bold,14 black'
setaxelabels 'Zenith Angle (deg)' 'Phase (deg)' 'font=helvetica,bolditalic,16 black'
plot2d ntc z p3+cph+$CPHOFF flg<3.5 'marker=box,11 navyblue nsta notit'
plot2d ntc z p3+cph+$CPHOFF flg<0.5 'marker=fcircle,7 red same nsta notit'
settitle 'BaselineCor Phase Phi-13 = f(ZenithAngle) ' ' ' 'font=helvetica,bold,14 black'
setaxelabels 'Zenith Angle (deg)' 'Phase (deg)' 'font=helvetica,bolditalic,16 black'
w2ps
newwin 2 1 1000 500
plot2d ntc z p4+cph+$CPHOFF flg<3.5 'marker=box,11 navyblue nsta notit'
plot2d ntc z p4+cph+$CPHOFF flg<0.5 'marker=fcircle,7 red same nsta notit'
settitle 'BaselineCor Phase Phi-14 = f(ZenithAngle) ' ' ' 'font=helvetica,bold,14 black'
setaxelabels 'Zenith Angle (deg)' 'Phase (deg)' 'font=helvetica,bolditalic,16 black'
plot2d ntc z p23+cph+$CPHOFF-360 flg<3.5 'marker=box,11 navyblue nsta notit'
plot2d ntc z p23+cph+$CPHOFF-360 flg<0.5 'marker=fcircle,7 red same nsta notit'
settitle 'BaselineCor Phase Phi-23 = f(ZenithAngle) ' ' ' 'font=helvetica,bold,14 black'
setaxelabels 'Zenith Angle (deg)' 'Phase (deg)' 'font=helvetica,bolditalic,16 black'
w2ps
newwin 2 1 1000 500
plot2d ntc z p24+cph+$CPHOFF-360 flg<3.5 'marker=box,11 navyblue nsta notit'
plot2d ntc z p24+cph+$CPHOFF-360 flg<0.5 'marker=fcircle,7 red same nsta notit'
settitle 'BaselineCor Phase Phi-24 = f(ZenithAngle) ' ' ' 'font=helvetica,bold,14 black'
setaxelabels 'Zenith Angle (deg)' 'Phase (deg)' 'font=helvetica,bolditalic,16 black'
plot2d ntc z ((p34<20)?p34:p34-360.) flg<3.5 'marker=box,11 navyblue nsta notit'
plot2d ntc z ((p34<20)?p34:p34-360.) flg<0.5 'marker=fcircle,7 red same nsta notit'
settitle 'BaselineCor Phase Phi-34 = f(ZenithAngle) ' ' ' 'font=helvetica,bold,14 black'
setaxelabels 'Zenith Angle (deg)' 'Phase (deg)' 'font=helvetica,bolditalic,16 black'
w2ps
###################################################################
#### Analyse directions pointage ajustees a partir des satellites
#### AnaPAON4 - Reza , Juillet 2019
###################################################################
setaxesatt 'font=helvetica,bold,16 fixedfontsize minorticks'
newnt pnt dset z num D tet phi dtet dphi flg
ntfrascii pnt pointnt.txt
print pnt
set tlines ( "Dish #1" "Dish #2" "Dish #3" "Dish #4" )
set tcols ( black blue red orange )
set cols ( black black blue red orange )
newwin 2 2 1200 800
for i 1:5
plot2dw pnt z D dset (num==$i) "marker=fcircle,11 colbr128 nosizescale colscale nsta showcmap=right"
settitle " D_Dish[$i] = f(ZenithAngle) Color->DataSet" ' ' 'font=helvetica,bold,16 black'
setaxelabels 'Zenith Angle (deg)' "D_Dish[$i]" 'font=helvetica,bolditalic,16 black'
end
w2ps
set PHI (dphi*M_PI/180.)
newwin 2 2 1200 800
for i 1:5
plot2dw pnt z dtet*cos($PHI) dset (num==$i) "marker=ftriangle,11 colbr128 nosizescale colscale nsta showcmap=right"
settitle 'EW Pointing-Shift Color->DataSet' ' ' 'font=helvetica,bold,16 black'
setaxelabels 'Zenith Angle (deg)' 'EW-Point-shift (deg)' 'font=helvetica,bolditalic,16 black'
end
w2ps
newwin 2 2 1200 800
for i 1:5
plot2dw pnt z dtet*sin($PHI) dset (num==$i) "marker=ftriangle,11 colbr128 nosizescale colscale nsta showcmap=right"
settitle 'NS Pointing-Shift Color->DataSet' ' ' 'font=helvetica,bold,16 black'
setaxelabels 'Zenith Angle (deg)' 'NS-Point-shift (deg)' 'font=helvetica,bolditalic,16 black'
end
w2ps
for i 1:5
exptovec DPEW$i pnt dtet*cos($PHI) (num==$i) 'nodisp'
exptovec DPNS$i pnt dtet*sin($PHI) (num==$i) 'nodisp'
end
exptovec VDS pnt dset (num==1) 'nodisp'
newnt rpnt DPEW1 DPEW2 DPEW3 DPEW4 DPNS1 DPNS2 DPNS3 DPNS4 dset
c++exec \
double xnt[15]; \
for(sa_size_t k=0; k<DPEW1.Size(); k++) { \
xnt[0]=DPEW1(k); xnt[1]=DPEW2(k); xnt[2]=DPEW3(k); xnt[3]=DPEW4(k); \
xnt[4]=DPNS1(k); xnt[5]=DPNS2(k); xnt[6]=DPNS3(k); xnt[7]=DPNS4(k); \
xnt[8]=VDS(k); rpnt.Fill(xnt); }
print rpnt
newwin 3 2 1200 800
for i 1:5
js = $i+1
for j $js:5
plot2dw rpnt DPEW$i DPEW$j dset 1 "marker=ftriangle,11 colbr128 nosizescale colscale nsta showcmap=right notit"
settitle "DPEW$j vs DPEW$i Color->DataSet" ' ' 'font=helvetica,bold,16 black'
end
end
w2ps
newwin 3 2 1200 800
for i 1:5
js = $i+1
for j $js:5
plot2dw rpnt DPNS$i DPNS$j dset 1 "marker=ftriangle,11 colbr128 nosizescale colscale nsta showcmap=right notit"
settitle "DPNS$j vs DPNS$i Color->DataSet" ' ' 'font=helvetica,bold,16 black'
end
end
w2ps
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