Commit 1d3f5708 authored by Magneville's avatar Magneville
Browse files

Decode arguments with p4autils in rdvisip4,visi2dtacx + minor changes, cmv 17/03/2017

parent ec460df5
......@@ -18,8 +18,8 @@ clean :
visi2dtacx : $(EXE)/visi2dtacx
echo '---visi2dtacx made'
$(EXE)/visi2dtacx : $(OBJ)/visi2dtacx.o $(OBJ)/visip4reader.o
$(CXXLINK) -o $(EXE)/visi2dtacx $(OBJ)/visi2dtacx.o $(OBJ)/visip4reader.o $(SOPHYAEXTSLBLIST)
$(EXE)/visi2dtacx : $(OBJ)/visi2dtacx.o $(OBJ)/p4autils.o $(OBJ)/visip4reader.o
$(CXXLINK) -o $(EXE)/visi2dtacx $(OBJ)/visi2dtacx.o $(OBJ)/p4autils.o $(OBJ)/visip4reader.o $(SOPHYAEXTSLBLIST)
$(OBJ)/visi2dtacx.o : visi2dtacx.cc visip4reader.h
$(CXXCOMPILE) -o $(OBJ)/visi2dtacx.o visi2dtacx.cc
......@@ -51,8 +51,8 @@ $(OBJ)/visi2tmfreq.o : visi2tmfreq.cc visip4reader.h p4autils.h
rdvisip4 : $(EXE)/rdvisip4
echo '---rdvisip4 made'
$(EXE)/rdvisip4 : $(OBJ)/rdvisip4.o $(OBJ)/visip4reader.o
$(CXXLINK) -o $(EXE)/rdvisip4 $(OBJ)/rdvisip4.o $(OBJ)/visip4reader.o $(SOPHYAEXTSLBLIST)
$(EXE)/rdvisip4 : $(OBJ)/rdvisip4.o $(OBJ)/p4autils.o $(OBJ)/visip4reader.o
$(CXXLINK) -o $(EXE)/rdvisip4 $(OBJ)/rdvisip4.o $(OBJ)/p4autils.o $(OBJ)/visip4reader.o $(SOPHYAEXTSLBLIST)
$(OBJ)/rdvisip4.o : rdvisip4.cc visip4reader.h
$(CXXCOMPILE) -o $(OBJ)/rdvisip4.o rdvisip4.cc
......
......@@ -26,10 +26,8 @@ public:
P4FreqBand(double f0=1420., double df=1.)
: f0_(f0), df_(df)
{
double deltanufft=250./4096; // 250 MHz en 4096 frequences
double freqstart=1250.; // Bande de 1250-1500 MHz
jfmin_=(sa_size_t)((f0_-freqstart-0.5*df_)/deltanufft);
jfmax_=(sa_size_t)((f0_-freqstart+0.5*df_)/deltanufft);
jfmin_=(sa_size_t)((f0_-freqstart_-0.5*df_)/deltanufft_);
jfmax_=(sa_size_t)((f0_-freqstart_+0.5*df_)/deltanufft_);
if ((jfmin_<0)||(jfmin_>4095)||(jfmax_<0)||(jfmax_>4095)) {
cout<<"P4FreqBand(f0="<<f0<<" ,df="<<df<<") ERROR -> Out of range (0...4095) jfmin="<<jfmin_<<" jfmax="<<jfmax_<<endl;
throw ParmError("P4FreqBand(f0,df) Out of range (0...4095) jfmin,jfmax");
......@@ -41,6 +39,9 @@ public:
P4FreqBand& operator = (P4FreqBand const& a)
{ f0_=a.f0_; df_=a.df_; jfmin_=a.jfmin_; jfmax_=a.jfmax_; return *this; }
static const int nbnufft_ = 4096; // 4096 frequences
static const double deltanufft_ = 250./nbnufft_; // 250 MHz en 4096 frequences
static const double freqstart_ = 1250.; // Bande de 1250-1500 MHz
double f0_, df_; // frequence centrale et largeur en MHz , f0_-df_/2 <= f <= f0_+df_/2
sa_size_t jfmin_, jfmax_; // numero de colonne de frequence dans la matrice de visibilite
};
......
......@@ -37,6 +37,7 @@
#include "timing.h"
// include lecteur de fichiers visibilites
#include "p4autils.h"
#include "visip4reader.h"
// ---- compute gain for each channel from visibilies and save it to file
......@@ -46,65 +47,41 @@ Matrix computeGain2(Matrix & acs, int SZW=96,float frackeep=0.75);
// ----- fonction pour normaliser les gains
Vector normalizeGain2(Matrix& gain);
//--------------------------- Fonctions de ce fichier -------------------
int Usage(bool fgshort=true);
// int DecodeArgs(int narg, char* arg[]);
/* --Fonction-- */
int Usage(bool fgea)
int Usage(void);
int Usage(void)
{
cout << " --- rdvisip4.cc : Read PPF files produced by mfacq time-frequency\n" << endl;
if (fgea) cout << " rdvisip4: Missing or wrong argument ! " << endl;
cout << " Usage: rdvisip4 [-mr] InPathBAO5 InPathBAO6 Imin,Imax,step OutPPFFile GainPPFFile [PrintLev=1] \n"
<< " -m: read also the mean Fourier coeff matrix \n"
<< " -r: reorder frequence (for FFT firmeware) \n"
<< " -mr: do both \n"
<< " InPathBAO5/6: path for input vismtx_J_iii.ppf on bao5/6 \n"
<< " Imin,Imax,step : read files for Imin<=iii<=Imax iii+=step \n"
<< " OutPPFFile: Output PPF file name (with the average visibility matrix) \n"
<< " GainPPFFile: PPF file name containing the computed gain g(nu) \n"<<endl;
/*
if (fgshort) {
cout << " rdvisip4 -h for detailed instructions" << endl;
return 1;
}
*/
cout<<"--- rdvisip4.cc : Read PPF files produced by mfacq time-frequency\n"<<endl;
cout<<"Usage: visi2dtacx [-arguments] [-m]\n";
P4AnaParams::UsageOptions();
cout<<endl;
return 1;
}
//----------------------------------------------------
//----------------------------------------------------
int main(int narg, char* arg[])
int main(int narg, const char* arg[])
{
if ((narg>1)&&(strcmp(arg[1],"-h")==0)) return Usage(false);
if (narg<6) return Usage(true);
if ((narg>1)&&((strcmp(arg[1],"-m")==0)||(strcmp(arg[1],"-r")==0)||(strcmp(arg[1],"-mr")==0)) && (narg<7)) return Usage(false);
int off = 0;
// --- Decoding parameters
if ((narg>1)&&(strcmp(arg[1],"-h")==0)) return Usage();
P4AnaParams params;
params.DecodeArgs(narg, arg);
string path5 = params.inpath5_;
string path6 = params.inpath6_;
int Imin=params.Imin_, Imax=params.Imax_, Istep=params.Istep_;
string outfile=params.outfile_;
string gainfile=params.gain_gnu_file_;
int prtlev=params.prtlev_;
bool fgreorderfreq = params.fgreorderfreq_;
bool fgrdmean = false;
bool fgreorderfreq = false;
if (strcmp(arg[1],"-m")==0 ){ fgrdmean = true; off++; }
else if (strcmp(arg[1],"-r")==0 ){ fgreorderfreq = true; off++; }
else if (strcmp(arg[1],"-mr")==0 ){ fgrdmean = fgreorderfreq = true; off++; }
string path5 = arg[1+off];
string path6 = arg[2+off];
int Imin=0,Imax=10,Istep=1;
sscanf(arg[3+off],"%d,%d,%d",&Imin,&Imax,&Istep);
string outfile=arg[4+off];
string gainfile=arg[5+off];
int prtlev=1;
if (narg>6+off) prtlev=atoi(arg[6+off]);
if( (params.lastargs_.size()>0) &&(params.lastargs_[0]==string("-m")) ) fgrdmean = true;
cout << " rdvisip4/Info: Path BAO5:"<<path5<<" BAO6:"<<path6<<"\n"
<< " Imin,max,step="<<Imin<<","<<Imax<<","<<Istep<<" OutFile:"<<outfile
<< " PrtLev="<<prtlev
<<endl;
if(fgrdmean) cout << "Trying to read also the FFT mean coef matrix" <<endl;
cout<<"rdvisip4/Info: Path BAO5:"<<path5<<" BAO6:"<<path6<<"\n"
<<"fgreorderfreq="<<params.fgreorderfreq_<<"\n"
<<"Imin,max,step="<<Imin<<","<<Imax<<","<<Istep<<"\n"
<<"PrtLev="<<prtlev<<" OutFile:"<<outfile<<endl;
if(fgrdmean) cout<<"Trying to read also the FFT mean coef matrix"<<endl;
// ---
HiStatsInitiator _inia;
// TArrayInitiator _inia;
int rc = 0;
try {
ResourceUsage resu;
......@@ -144,10 +121,10 @@ int main(int narg, char* arg[])
if (cnt%nmod==0) cout<<"rdvisip4/Info file read count="<<cnt<<" / nfiles="<<nfiles<<endl;
}
}
cout << " rdvisip4/Info: count="<<cnt<<" visimtx read "<<endl;
cout<<"rdvisip4/Info: count="<<cnt<<" visimtx read "<<endl;
if (cnt>0) {
vismtx_mean /= complex<r_4>((r_4)cnt, (r_4)0.);
cout << " rdvisip4/Info: computing gains ..."<<endl;
cout<<" rdvisip4/Info: computing gains ..."<<endl;
computeSaveGain(vismtx_mean, gainfile);
cout<<" rdvisip4/Info: Saving vismtx_mean to PPF file "<<outfile<<endl;
POutPersist po(outfile);
......
......@@ -37,122 +37,73 @@
#include "timing.h"
// include lecteur de fichiers visibilites
#include "p4autils.h"
#include "visip4reader.h"
//--------------------------- Fonctions de ce fichier -------------------
int Usage(bool fgshort=true);
// int DecodeArgs(int narg, char* arg[]);
/* --Fonction-- */
int Usage(bool fgea)
int Usage(void);
int Usage(void)
{
cout << " --- visi2dtacx.cc : Read PPF files produced by mfacq time-frequency\n" << endl;
if (fgea) cout << " visi2dtacx: Missing or wrong argument ! " << endl;
cout << " Usage: visi2dtacx [-reorderfreq] [-tfm Nf] InPathBAO5 InPathBAO6 Imin,Imax GainPPFFile OutPPFFile Freq1 Freq2 DeltaFreq DeltaIAvg [PrtLev=0] \n"
<< " -reorderfreq : reorder frequencies in the spectrum (for FFT firmware) \n"
<< " -tfm Nf : create time-frequncy maps of cross-correlation binning Nf frequencies \n"
<< " InPathBAO5/6: path for input vismtx_J_iii.ppf on bao5/6 \n"
<< " Imin,Imax : read files for Imin<=iii<=Imax iii+=step \n"
<< " GainPPFFile: Input gains PPF file name \n"
<< " OutPPFFile: Output PPF file name \n"
<< " Freq1 Freq2: the two frequencies for which cross-correlations are computed [=1375 1410 MHz] \n"
<< " DeltaFreq: frequency band (in MHz) [=1 MHz] \n"
<< " DeltaIAvg: compute average power every DeltaI input vismtx files, def=10 \n"
<< " Note: bande_freq=[freq1,2-deltafreq , freq1,2+deltafreq] \n"<< endl;
/*
if (fgshort) {
cout << " rdvisip4 -h for detailed instructions" << endl;
return 1;
}
*/
cout << " Usage: visi2dtacx [-arguments] [OutPPFFile]\n"
<< " OutPPFFile: Output PPF file name\n";
P4AnaParams::UsageOptions();
cout<< endl;
return 1;
}
//----------------------------------------------------
//----------------------------------------------------
int main(int narg, char* arg[])
int main(int narg, const char* arg[])
{
if ((narg>1)&&(strcmp(arg[1],"-h")==0)) return Usage(false);
if (narg<10) return Usage(true);
int offa=0;
bool fgreorderfreq=false;
bool FgTFM=false; // true -> create time-frequency maps of cross-correlations
sa_size_t TFMfbin=8;
bool fgdecoded=true;
while (fgdecoded && (narg>2)) {
if (strcmp(arg[1],"-reorderfreq")==0) {
fgreorderfreq=true; arg++; narg--;
}
else if (strcmp(arg[1],"-tfm")==0) {
if (narg<3) Usage(true);
FgTFM=true;
TFMfbin=atoi(arg[2]);
if (TFMfbin<1) TFMfbin=8;
arg+=2; narg-=2;
}
else fgdecoded=false;
}
if ((narg-offa)<10) return Usage(true);
string path5 = arg[offa+1];
string path6 = arg[offa+2];
int Imin,Imax,Istep=1;
sscanf(arg[offa+3],"%d,%d",&Imin,&Imax);
Istep=1;
string gainfile=arg[offa+4];
string outfile=arg[offa+5];
// frequency range definition
double deltafreq=1.;
double freq1=1375.;
double freq2=1410.;
int nargo=narg-offa;
if ((nargo>7)&&(strcmp(arg[offa+6],"-")!=0)) freq1=atof(arg[offa+6]);
if ((nargo>8)&&(strcmp(arg[offa+7],"-")!=0)) freq2=atof(arg[offa+7]);
if ((nargo>6)&&(strcmp(arg[offa+8],"-")!=0)) deltafreq=atof(arg[offa+8]);
// time averaging interval definition, in term of visibility files
int deltaIavg=10;
if ((nargo>9)&&(strcmp(arg[offa+9],"-")!=0)) deltaIavg=atoi(arg[offa+9]);
if (deltaIavg<1) deltaIavg=1;
int prtlev=1;
if (nargo>10) prtlev=atoi(arg[offa+10]);
cout << " visi2dtacx/Info: Path BAO5:"<<path5<<" BAO6:"<<path6<<"\n"
<< " Imin,max,step="<<Imin<<","<<Imax<<","<<Istep<<" OutFile:"<<outfile<<"\n"
<< " freq1="<<freq1<<" freq2="<<freq2<<" deltafreq="<<deltafreq<<" MHz\n"
// << JFmin<<" <=NumFreq<= "<<JFmax<<" "<<JFminB<<" <=NumFreqB<= "<<JFmaxB
<<" DeltaIAvg="<<deltaIavg<<" PrtLev="<<prtlev<<endl;
// --- Decoding parameters
if( (narg<2) || ((narg>1)&&(strcmp(arg[1],"-h")==0) ) ) return Usage();
P4AnaParams params;
params.DecodeArgs(narg, arg);
string outfile = params.outfile_;
if (params.lastargs_.size()>0) outfile = params.lastargs_[0];
bool FgTFM = params.fgTFM_; // true -> create time-frequency maps of cross-correlations
int deltaIavg = params.TFMtimebin_;
sa_size_t TFMfbin = params.TFMfreqbin_;
int Imin = params.Imin_, Imax = params.Imax_, Istep = params.Istep_;
int prtlev = params.prtlev_;
cout <<"visi2dtacx/Info: Path BAO5:"<<params.inpath5_<<" BAO6:"<<params.inpath6_<<"\n"
<<"fgreorderfreq="<<params.fgreorderfreq_<<"\n"
<<"Imin,max,step="<<Imin<<","<<Imax<<","<<Istep<<" DeltaIAvg="<<deltaIavg<<"\n"
<<"outfile="<<outfile<<" PrtLev="<<prtlev<<endl;
// --- Open file to store visibility matrices if requested
string TFMoutfile;
if (FgTFM) {
size_t l = outfile.length();
size_t pp = outfile.rfind('.');
if (pp<l) TFMoutfile = outfile.substr(0,pp) + "_tfm.ppf";
cout << " visi2dtacx/Info: Time-Frequency maps of Xcor will be created and saved to file "
<<TFMoutfile<<endl;
cout <<" visi2dtacx/Info: Time-Frequency maps of Xcor will be created and saved to file "<<TFMoutfile<<endl;
}
//---- calcul des index de bandes de frequences
// --- Calcul des index de bandes de frequences
// pas en frequence du firmware FFT
double deltanufft=250./4096; // 250 MHz en 4096 frequences
sa_size_t DJF=deltafreq/deltanufft;
double freqstart=1250.; // Bande de 1250-1500 MHz
sa_size_t JFmin=(freq1-1250.-deltafreq)/deltanufft;
sa_size_t JFmax=(freq1-1250.+deltafreq)/deltanufft;
sa_size_t JFminB=(freq2-1250.-deltafreq)/deltanufft;
sa_size_t JFmaxB=(freq2-1250.+deltafreq)/deltanufft;
cout << " visi2dtacx/Info: frequency bands ... " <<endl;
cout << " Band 1: "<<freq1<<" +/-"<<deltafreq<<" MHz -> "<<JFmin<<" <=NumFreq<= "<<JFmax<<endl;
cout << " Band 2: "<<freq2<<" +/-"<<deltafreq<<" MHz -> "<<JFminB<<" <=NumFreq<= "<<JFmaxB<<endl;
// Bande de frequence de 2 MHz autour du 21 cm (1420 MHz -> JF=2792)
sa_size_t JFmin21=2776,JFmax21=2808; // +/- 1 MHz autour de 1420 MHz
sa_size_t JFmin21_5=2710,JFmax21_5=2874; // +/- 5 MHz autour de 1420 MHz
cout << " pjHI +/-1 MHz @1420 MHz " << JFmin21<<" <=NumFreq<= "<<JFmax21
<< " pjHI +/-5 MHz @1420 MHz " << JFmin21_5<<" <=NumFreq<= "<<JFmax21_5 << endl;
if(params.fbands_.size()<2) {
cout<<"ERROR_arguments: Give exactly 2 frequency bands using the -freq option"<<endl;
return Usage();
}
double freq1 = params.fbands_[0].f0_, deltafreq1 = params.fbands_[0].df_;
sa_size_t JFmin = params.fbands_[0].jfmin_, JFmax = params.fbands_[0].jfmax_;
double freq2 = params.fbands_[1].f0_, deltafreq2 = params.fbands_[1].df_;
sa_size_t JFminB = params.fbands_[1].jfmin_, JFmaxB = params.fbands_[1].jfmax_;
cout<<"visi2dtacx/Info: frequency bands ... \n"
<<"Band 1: "<<freq1<<" +/-"<<deltafreq1/2<<" MHz -> "<<JFmin <<" <=NumFreq<= "<<JFmax <<"\n"
<<"Band 2: "<<freq2<<" +/-"<<deltafreq2/2<<" MHz -> "<<JFminB<<" <=NumFreq<= "<<JFmaxB<<endl;
// --- Bandes de frequence de 2 MHz autour du 21 cm (1420 MHz -> JF=2792)
P4FreqBand f21_1(1420.405751786,2.); // +/- 1 MHz autour de 1420 MHz
P4FreqBand f21_5(1420.405751786,10.); // +/- 5 MHz autour de 1420 MHz
sa_size_t JFmin21_1 = f21_1.jfmin_, JFmax21_1 = f21_1.jfmax_;
sa_size_t JFmin21_5 = f21_5.jfmin_, JFmax21_5 = f21_5.jfmax_;
cout<<"pjHI +/-"<<f21_1.df_/2.<<" MHz @"<<f21_1.f0_<<" MHz "<<JFmin21_1<<" <=NumFreq<= "<<JFmax21_1<<"\n"
<<"pjHI +/-"<<f21_5.df_/2.<<" MHz @"<<f21_5.f0_<<" MHz "<<JFmin21_5<<" <=NumFreq<= "<<JFmax21_5<<endl;
// ---
HiStatsInitiator _inia;
// TArrayInitiator _inia;
int rc = 0;
try {
ResourceUsage resu;
......@@ -162,12 +113,12 @@ int main(int narg, char* arg[])
// Numero des lignes des cross-correlations 1H-2H 1H-3H 1H-4H 2H-3H 2H-4H 3H-4H dans la matrice des visibilites
sa_size_t KVCXHH[6]={1,2,3,9,10,16};
cout << " visi2dtacx/Info: reading input gain file"<<gainfile<<" ...";
cout<<"visi2dtacx/Info: reading input gain file: \""<<params.gain_gnu_file_<<"\" ...\n";
Matrix gains;
Vector gn;
double GAINTHR = 0.005; // limite inferieur du gain avant faire 1/G
{
PInPersist pin(gainfile);
PInPersist pin(params.gain_gnu_file_);
pin>>PPFNameTag("gains")>>gains;
pin>>PPFNameTag("gn")>>gn;
for (int p=0; p<8; p++) cout<<"gn["<<p<<"]="<<gn(p)<<" ";
......@@ -187,7 +138,7 @@ int main(int narg, char* arg[])
gaincx(4,c)=sqrt(gains(1,c)*gains(3,c)); // 2H-4H
gaincx(5,c)=sqrt(gains(2,c)*gains(3,c)); // 3H-4H
}
cout << " DONE"<<endl;
cout<<"DONE"<<endl;
const char* dtnames[53]={"k","day","time",
"p1","p2","p3","p4","p5","p6","p7","p8",
......@@ -208,14 +159,14 @@ int main(int narg, char* arg[])
dt.AddComplexColumn(dtnames[3+32+kk]);
Range freqs(JFmin,JFmax);
Range freqs21(JFmin21,JFmax21);
Range freqs21_1(JFmin21_1,JFmax21_1);
Range freqs21_5(JFmin21_5,JFmax21_5);
Range freqsB(JFminB,JFmaxB);
vector<string> paths;
paths.push_back(path5);
paths.push_back(path6);
VisiP4Reader vreader(paths, Imin,Imax,Istep,fgreorderfreq);
paths.push_back(params.inpath5_);
paths.push_back(params.inpath6_);
VisiP4Reader vreader(paths, Imin,Imax,Istep,params.fgreorderfreq_);
vreader.setPrintLevel(prtlev);
bool fgok=true;
TMatrix< complex<r_4> > vismtx;
......@@ -248,14 +199,14 @@ int main(int narg, char* arg[])
if (FgTFM) { //allocating time-frequency maps
tfmSX=(Imax-Imin)/Istep/deltaIavg;
tfmSY=vismtx.NCols()/TFMfbin;
cout << " visi2dtacx/Info: allocating Time-Freqncy maps : Time->NX="<<tfmSX<<" x Freq->NY="<<tfmSY<<endl;
cout<<"visi2dtacx/Info: allocating Time-Frequency maps : Time->NX="<<tfmSX<<" x Freq->NY="<<tfmSY<<endl;
for(int k=0; k<6; k++) vtfm.push_back( TArray< complex<r_4> >(tfmSX, tfmSY) );
}
}
if (I==0) { // start filling a new DataTable row
dateobs=cfdate;
if (prtlev>0)
cout << "visi2dtacx/Info: dateobs="<<dateobs<<" SecondsPart()="<<dateobs.SecondsPart()<<endl;
cout<<"visi2dtacx/Info: dateobs="<<dateobs<<" SecondsPart()="<<dateobs.SecondsPart()<<endl;
for(int k=0; k<32; k++) acdt[k]=0.;
for(int k=0; k<18; k++) cxdt[k]=complex<r_8>(0.,0.);
acsum = complex<r_4>(0.,0.);
......@@ -275,7 +226,7 @@ int main(int narg, char* arg[])
for(sa_size_t c=0; c<vac.Size(); c++) vac(c)=acsum(k,c).real()*gains(k,c);
acdt[k] += vac(freqs).Sum(); // integration en bande 1
acdt[k+8] += vac(freqsB).Sum(); // integration en bande large B
acdt[k+16] += vac(freqs21).Sum(); // integration a +/- 1 MHz @ 1420 MHz
acdt[k+16] += vac(freqs21_1).Sum(); // integration a +/- 1 MHz @ 1420 MHz
acdt[k+24] += vac(freqs21_5).Sum(); // integration a +/- 5 MHz @ 1420 MHz
}
//---- On s'occupe des cross-correlations 1H-2H ... 3H-4H
......@@ -285,7 +236,7 @@ int main(int narg, char* arg[])
vcx(c)=complex<r_8>((r_8)cxsum(k,c).real(), (r_8)cxsum(k,c).imag())*complex<r_8>(gaincx(k,c), 0.);
cxdt[k] += vcx(freqs).Sum(); // integration en bande 1
cxdt[k+6] += vcx(freqsB).Sum(); // integration en bande large B
cxdt[k+12] += vcx(freqs21).Sum(); // integration a +/- 1 MHz @ 1420 MHz
cxdt[k+12] += vcx(freqs21_1).Sum(); // integration a +/- 1 MHz @ 1420 MHz
if (FgTFM && (TFMtmidx<tfmSX)) { //filling time-frequency maps
TArray< complex<r_4> > & tfmap = vtfm[k];
......@@ -306,10 +257,10 @@ int main(int narg, char* arg[])
for(int k=0; k<8; k++) acdt[k+8]*=fnorm;
for(int k=0; k<6; k++) cxdt[k+6]*=complex<r_8>(fnorm,0.);
// Moyennes ds +/5 MHz @1420 , exclu +/- 1 MHz centre a 1420
fnorm=(1./(double)deltaIavg)/(double)((JFmax21_5-JFmin21_5)-(JFmax21-JFmin21));
fnorm=(1./(double)deltaIavg)/(double)((JFmax21_5-JFmin21_5)-(JFmax21_1-JFmin21_1));
for(int k=0; k<8; k++) acdt[k+24] = (acdt[k+24]-acdt[k+16])*fnorm;
// Moyennes ds +/1 MHz @1420
fnorm=(1./(double)deltaIavg)/(double)(JFmax21-JFmin21+1);
fnorm=(1./(double)deltaIavg)/(double)(JFmax21_1-JFmin21_1+1);
for(int k=0; k<8; k++) acdt[k+16]*=fnorm;
for(int k=0; k<6; k++) cxdt[k+12]*=complex<r_8>(fnorm,0.);
// remplissage datatable
......@@ -324,15 +275,14 @@ int main(int narg, char* arg[])
}
cnt++;
if ((cntnt>0)&&(cntnt%10==0)&&(cntnt>pcntnt)) {
cout << " visi2dtacx/Info: fill-count="<<cntnt<<" fileCount="<<cnt<<" /Max="<<Imax
<<" DateObs="<<dateobs<<endl;
cout<<"visi2dtacx/Info: fill-count="<<cntnt<<" fileCount="<<cnt<<" /Max="<<Imax<<" DateObs="<<dateobs<<endl;
pcntnt=cntnt;
}
}
}
cout << " visi2dtacx/Info: count="<<cnt<<" visimtx read "<<endl;
cout<<"visi2dtacx/Info: count="<<cnt<<" visimtx read "<<endl;
dt.SetShowMinMaxFlag(true);
cout << dt;
cout<<dt;
cout<<" visi2dtacx/Info: Saving auto-corr=f(time) datatable to PPF file "<<outfile<<endl;
POutPersist po(outfile);
po<<dt;
......@@ -370,4 +320,3 @@ int main(int narg, char* arg[])
}
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