// lecture des fichiers acq de Pittsburgh Dec 2010 // et ecriture des matrices de visi temps-frequence // > make OBJ=$CMVPROG/obj/ EXE=$CMVPROG/exe/ chanum_1210 svv2mtx2_1210 #include "sopnamsp.h" #include "machdefs.h" #include #include #include #include #include #include #include #include #include "pexceptions.h" #include "tvector.h" #include "fioarr.h" /* export TACQEXE=~/Reza/TAcq/Objs ./CasA02Dec.csh > CasA02Dec.log 2>&1 ./Crab03Dec.csh > Crab03Dec.log 2>&1 ./Sun03Dec.csh > Sun03Dec.log 2>&1 ./CasA03Dec.csh > CasA03Dec.log 2>&1 */ //--------------------------- Fonctions de ce fichier ------------------- void usage(void); void usage(void) { cout<<"svv2mtx2_1012 [options] dir : lecture des fichiers acq de Pittsburgh Dec 2010"<=narg) {usage(); return -1;} string indir = arg[optind]; cout<<"thread="<ifilmin) ifilmin = ifile; } if(!foundfirst) continue; if(ifile > MVisi; TVector MeanTT(nfile); TVector Freq; TVector Npaqsum(nfile); string tudeb, tufin; double tudeb_day, tufin_day; int nfreq = 0; int lpmod = nfile/10; if(lpmod<=0) lpmod=1; int_4 ntimefill = 0, ntimebad = 0; for(int ifile=ifilmin; ifile<=ifilmax; ifile++) { // --- Lecture d'une visi elementaire (fichier acq) sprintf(str, "%s/vismtx_%d_%d.ppf",indir.c_str(),numthread,ifile); int status = stat(str,&buffer); if(status) continue; // fichier inexistant if(ifile==ifilmin || ifile==ifilmax || (ifile-ifilmin)%lpmod==0) cout< > vismtx; try { PInPersist pin(str); pin >> vismtx; } catch(...) { cout<<"ERROR: bad file "<=vismtx.NRows()) { cout<<"ERROR: requested numrow="< "<jfr2) break; Freq(i) += f; nf++; } if(nf>0) Freq(i) /= (double)nf; else {cout<<"ERROR: last freq bin with 0 freq in it"<nfreq-4) cout<<" F("<)/1.e6<<" Mo"<(0.,0.); } // Fill time-freq visibility matrix for(int i=0;ijfr2) break; MVisi(ntimefill,i) += vismtx(numrow,f); nf++; } Npaqsum(ntimefill) = nf * npaqsum; MVisi(ntimefill,i) /= double(Npaqsum(ntimefill)); if(doconj) MVisi(ntimefill,i) = conj(MVisi(ntimefill,i)); } ntimefill++; } // fin boucle sur le fichiers d'acq cout<<"ntimefill = "<0) MVisi.Info()["TTag_N"] = MeanTT(ntimefill-1); MVisi.Info()["freq0"] = freq0; MVisi.Info()["dfreq0"] = 500./8192.; MVisi.Info()["jfr1"] = jfr1; MVisi.Info()["jfr2"] = jfr2; MVisi.Info()["ngrpfreq"] = ngrpfreq; MVisi.Info()["ifilmin"] = ifilmin; MVisi.Info()["ifilmax"] = ifilmax; MVisi.Info()["ntimefill"] = ntimefill; MVisi.Info()["ntimebad"] = ntimebad; // --- writing visibility matrix to file sprintf(str,"%s",outname.c_str()); cout<<"writing visibility matrix to file "<>>> svv2mtx2_1210.cc ------- END ----------- RC="<0 ! "cpts nsta" imag visi "cdmod" imag visi "cdreal" imag visi "cdimag" imag visi "cdphas" */