// 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" //--------------------------- 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 = "<>>> svv2mtx2_1210.cc ------- END ----------- RC="<0 ! "cpts nsta" imag visi "cdmod" imag visi "cdreal" imag visi "cdimag" imag visi "cdphas" */