// 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 #include "pexceptions.h" #include "tvector.h" #include "fioarr.h" #include "timing.h" /* export TACQEXE=~/Reza/TAcq/Objs ./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"<"<, le but est d'avoir toujours "<=narg) {usage(); return -1;} string indir = arg[optind]; cout<<"v1="<ifilmin) ifilmin = ifile; } if(!foundfirst) continue; if(ifilenmiss_stop) break; nmiss++; continue; } nfile++; ifilmax = ifile; nmiss = 0; flistw << string(str) < > MVisi; TVector MeanTT(nfile); TVector Npaqsum(nfile); TVector Freq; string tudeb, tufin; double tudeb_day, tufin_day; int nfreq = 0; int lpmod = nfile/25; if(lpmod<=0) lpmod=1; int_4 ntimefill = 0, ntimebad = 0; bool foundfirst = true; while(!flistr.eof()) { // --- Lecture d'une visi elementaire (fichier acq) string fname; getline(flistr,fname); if(fname.size()==0) continue; if(ntimefill%lpmod==0) cout< > vismtx; try { PInPersist pin(fname); pin >> vismtx; } catch(...) { cout<<"ERROR: bad file "<=vismtx.NRows()) { cout<<"ERROR: requested numrow="< "<)/1.e6<<" Mo"<(0.,0.); } // Fill time-freq visibility matrix for(int c=0;c(npaqsum); if(doconj) MVisi(ntimefill,c) = conj(MVisi(ntimefill,c)); } ntimefill++; } // fin boucle sur le fichiers d'acq cout<<"ntimefill = "<0) dvl["TTag_N"] = MeanTT(ntimefill-1); dvl["freq0"] = freq0; dvl["dfreq0"] = 500./8192.; dvl["jfr1"] = 0; dvl["jfr2"] = nfreq-1; dvl["nfreq"] = nfreq; dvl["ngrpfreq"] = 1; dvl["ifilmin"] = ifilmin; dvl["ifilmax"] = ifilmax; dvl["ntimefill"] = ntimefill; dvl["ntimebad"] = ntimebad; // --- writing visibility matrix to file cout<<"writing visibility matrix to file "<0) { TVector dum1(MeanTT(Range(0,ntimefill-1))); pos.PutObject(dum1,"meantt"); TVector dum2(Npaqsum(Range(0,ntimefill-1))); pos.PutObject(dum2,"npaqsum"); TMatrix< complex > dum3(MVisi(Range(0,ntimefill-1),Range(0,MVisi.NCols()-1))); dum3.Info() = dvl; pos.PutObject(dum3,"visi"); pos.PutObject(Freq,"ifreq"); } } //-------------------------------------------------------------------- catch(PException& exc) { cerr<<" svv2mtx2_1210.cc catched PException "<>>> svv2mtx2_1210.cc ------- END ----------- RC="<