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

MAJ programme visi2ntac (ajout champs day ds le ntuple) et MAJ makefile et...

MAJ programme visi2ntac (ajout champs day ds le ntuple) et MAJ makefile et script shell doproc, Reza 19/05/2015
parent c7924977
......@@ -7,8 +7,8 @@
#####################################################################
#
#DLIST="CasA1142N9mar15 CasA1142N10mar15 CasA1142N11mar15"
DLIST="CasA1142N9mar15 CasA1142N10mar15"
# DLIST="CasA1142N9mar15"
# DLIST="CasA1142N9mar15 CasA1142N10mar15"
DLIST="CasA1142N9mar15"
# DLIST="CasA1142N11mar15 CasA1142N12mar15 CasA1142N13mar15 CasA1142N20mar15"
echo 'DBG****A' $DLIST
for D in $DLIST ; do
......@@ -26,8 +26,10 @@ for D in $DLIST ; do
CMD="./rdvisip4 $IN5 $IN6 $IFILEG $OUTFILE1 $GAINFILE 0"
echo $CMD
time $CMD
echo '-----Processing visibilities in D=' $D
CMD="./visi2ntac $IN5 $IN6 0,$NFILE $GAINFILE $OUTFILE $JFREQ $JFREQB 20 0"
# echo '-----Processing visibilities in D=' $D
# CMD="./visi2ntac $IN5 $IN6 0,$NFILE $GAINFILE $OUTFILE $JFREQ $JFREQB 20 0"
echo '-----Processing visibilities -> DataTable(AutoCor,CrossCor) in D=' $D
CMD="./visi2dtacx $IN5 $IN6 0,$NFILE $GAINFILE $OUTFILE 1375. 1410. 1. 20 0"
echo $CMD
time $CMD
done
......
......@@ -3,11 +3,17 @@
include $(SOPHYABASE)/include/sophyamake.inc
# Define our target list
all : Objs/rdvisip4 Objs/visi2ntac
all : Objs/rdvisip4 Objs/visi2ntac Objs/visi2dtacx
clean :
rm -f Objs/*
######
Objs/visi2dtacx : Objs/visi2dtacx.o Objs/visip4reader.o
$(CXXLINK) -o Objs/visi2dtacx Objs/visi2dtacx.o Objs/visip4reader.o $(SOPHYAEXTSLBLIST)
Objs/visi2dtacx.o : visi2dtacx.cc visip4reader.h
$(CXXCOMPILE) -o Objs/visi2dtacx.o visi2dtacx.cc
######
Objs/visi2ntac : Objs/visi2ntac.o Objs/visip4reader.o
......
......@@ -127,13 +127,13 @@ int main(int narg, char* arg[])
paths.push_back(path5);
paths.push_back(path6);
const char* ntnames[34]={"k","time",
const char* ntnames[35]={"k","day","time",
"p1","p2","p3","p4","p5","p6","p7","p8",
"p1HI","p2HI","p3HI","p4HI","p5HI","p6HI","p7HI","p8HI",
"p1HI5","p2HI5","p3HI5","p4HI5","p5HI5","p6HI5","p7HI5","p8HI5",
"p1B","p2B","p3B","p4B","p5B","p6B","p7B","p8B" };
NTuple nt(34,ntnames);
NTuple nt(35,ntnames,384,false); // float numbers have enough precision for us
r_8 xnt[40];
// Numero de ligne des auto-correlations dans la matrice des visibilites
sa_size_t KVAC[8]={0,8,15,21,26,30,33,35};
......@@ -148,6 +148,7 @@ int main(int narg, char* arg[])
TMatrix< complex<r_4> > vismtx;
TMatrix< complex<r_4> > acsum;
TimeStamp dateobs;
TimeStamp dateorg(2015,1,1,12,0,0.); // Date origine 1 jan 2015
double mttag;
int cnt=0, cntnt=0, pcntnt=0;
int I=0;
......@@ -156,10 +157,10 @@ int main(int narg, char* arg[])
if (fgok) {
if (cnt==0) acsum.SetSize(8, vismtx.NCols());
if (I==0) {
xnt[0]=cnt; xnt[1]=dateobs.SecondsPart();
xnt[0]=cnt; xnt[1]=dateobs.DaysPart()-dateorg.DaysPart(); xnt[2]=dateobs.SecondsPart();
if (prtlev>0)
cout << "visi2ntac/Info: dateobs="<<dateobs<<" SecondsPart()="<<dateobs.SecondsPart()<<endl;
for(int k=0; k<32; k++) xnt[2+k]=0.;
for(int k=0; k<32; k++) xnt[3+k]=0.;
acsum = complex<r_4>(0.,0.);
}
for(int k=0; k<8; k++) acsum.Row(k) += vismtx.Row(KVAC[k]);
......@@ -169,23 +170,23 @@ int main(int narg, char* arg[])
for(int k=0; k<8; k++) {
// correct for gain(nu)
for(sa_size_t c=0; c<vac.Size(); c++) vac(c)=acsum(k,c).real()*gains(k,c);
xnt[2+k] += vac(freqs).Sum(); // integration en bande large
xnt[2+8+k] += vac(freqs21).Sum(); // integration a +/- 1 MHz @ 1420 MHz
xnt[2+16+k] += vac(freqs21_5).Sum(); // integration a +/- 5 MHz @ 1420 MHz
xnt[2+24+k] += vac(freqsB).Sum(); // integration en bande large B
xnt[3+k] += vac(freqs).Sum(); // integration en bande large
xnt[3+8+k] += vac(freqs21).Sum(); // integration a +/- 1 MHz @ 1420 MHz
xnt[3+16+k] += vac(freqs21_5).Sum(); // integration a +/- 5 MHz @ 1420 MHz
xnt[3+24+k] += vac(freqsB).Sum(); // integration en bande large B
}
// puissance moyenne dans la bande large
double fnorm=(1./(double)deltaIavg)/(double)(JFmax-JFmin+1);
for(int k=0; k<8; k++) xnt[2+k]*=fnorm;
for(int k=0; k<8; k++) xnt[3+k]*=fnorm;
// puissance moyenne ds +/5 MHz @1420 , exclu +/- 1 MHz centre a 1420
fnorm=(1./(double)deltaIavg)/(double)((JFmax21_5-JFmin21_5)-(JFmax21-JFmin21));
for(int k=0; k<8; k++) xnt[2+16+k] = (xnt[2+16+k]-xnt[2+8+k])*fnorm;
for(int k=0; k<8; k++) xnt[3+16+k] = (xnt[3+16+k]-xnt[3+8+k])*fnorm;
// puissance moyenne ds +/1 MHz @1420
fnorm=(1./(double)deltaIavg)/(double)(JFmax21-JFmin21+1);
for(int k=0; k<8; k++) xnt[2+8+k]*=fnorm;
for(int k=0; k<8; k++) xnt[3+8+k]*=fnorm;
// puissance moyenne en bande large B
fnorm=(1./(double)deltaIavg)/(double)(JFmaxB-JFminB+1);
for(int k=0; k<8; k++) xnt[2+24+k]*=fnorm;
for(int k=0; k<8; k++) xnt[3+24+k]*=fnorm;
nt.Fill(xnt);
I=0; cntnt++;
}
......
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