Changeset 3926 in Sophya
- Timestamp:
- Dec 13, 2010, 5:57:43 PM (15 years ago)
- Location:
- trunk/AddOn/TAcq
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/chanum_1210.cc
r3925 r3926 97 97 for(uint_4 i=0;i<vcode.size();i++) { 98 98 char str[128]; 99 sprintf(str,"svv2mtx2_1210 -T 0,99999 9-F 0,9999,1 -f %.7f",freq0);99 sprintf(str,"svv2mtx2_1210 -T 0,99999 -F 0,9999,1 -f %.7f",freq0); 100 100 string argu = str; 101 101 uint_4 ip = IVcode(i); -
trunk/AddOn/TAcq/svv2mtx2_1210.cc
r3925 r3926 41 41 bool dupli = false; 42 42 double freq0 = 0.; 43 int ifilmin=0, ifilmax=99999 9;43 int ifilmin=0, ifilmax=99999; 44 44 int jfr1=0, jfr2=-1, ngrpfreq=1; 45 45 char str[2048]; … … 89 89 90 90 // --- recherche et comptage des fichiers de visibilites 91 // ATTENTION: il peut manquer des fichiers au debut ou dans la sequence 92 struct stat buffer; 91 93 int nfile = 0; 92 94 { 93 struct stat buffer; 94 int i2 = ifilmax; ifilmax = 0; 95 int ifmin2 = ifilmin, ifmax2 = ifilmax; ifilmax = -1; 95 96 bool foundfirst = false; 96 for(int ifile= 0; ifile<=i2; ifile++) {97 for(int ifile=ifmin2; ifile<=ifmax2; ifile++) { 97 98 sprintf(str, "%s/vismtx_%d_%d.ppf",indir.c_str(),numthread,ifile); 98 99 int status = stat(str,&buffer); … … 104 105 if(!foundfirst) continue; 105 106 if(ifile<ifilmin) continue; 106 if(foundfirst && status ) break;107 if(foundfirst && status!=0) continue; 107 108 nfile++; 108 109 ifilmax = ifile; … … 127 128 int lpmod = nfile/10; if(lpmod<=0) lpmod=1; 128 129 129 int ntimefill = 0 ;130 int ntimefill = 0, ntimebad = 0; 130 131 for(int ifile=ifilmin; ifile<=ifilmax; ifile++) { 131 132 132 133 // --- Lecture d'une visi elementaire (fichier acq) 133 134 sprintf(str, "%s/vismtx_%d_%d.ppf",indir.c_str(),numthread,ifile); 135 int status = stat(str,&buffer); 136 if(status) continue; // fichier inexistant 134 137 if(ifile==ifilmin || ifile==ifilmax || (ifile-ifilmin)%lpmod==0) 135 cout<<ifile<<" opening: "<<str<<endl; 136 PInPersist pin(str); 138 cout<<ntimefill<<" "<<ifile<<" opening: "<<str<<endl; 137 139 TMatrix< complex<r_4> > vismtx; 138 pin >> vismtx; 140 try { 141 PInPersist pin(str); 142 pin >> vismtx; 143 } catch(...) { 144 cout<<"ERROR: bad file "<<str<<endl; 145 ntimebad++; 146 continue; 147 } 139 148 tufin = (string)vismtx.Info()["DATEOBS"]; 140 149 141 150 // --- Time keeping and number of summed elementary visibilities 142 MeanTT( ifile-ifilmin) = (double)vismtx.Info()["MeanTT"]/125.e6;151 MeanTT(ntimefill) = (double)vismtx.Info()["MeanTT"]/125.e6; 143 152 uint_4 npaqsum = vismtx.Info()["NPAQSUM"]; 144 153 … … 189 198 int f = jfr1 + i*ngrpfreq + j; 190 199 if(f>jfr2) break; 191 MVisi( ifile-ifilmin,i) += vismtx(numrow,f);200 MVisi(ntimefill,i) += vismtx(numrow,f); 192 201 nf++; 193 202 } 194 Npaqsum( ifile-ifilmin) = nf * npaqsum;195 MVisi( ifile-ifilmin,i) /= double(Npaqsum(ifile-ifilmin));203 Npaqsum(ntimefill) = nf * npaqsum; 204 MVisi(ntimefill,i) /= double(Npaqsum(ntimefill)); 196 205 } 197 206 ntimefill++; 198 207 199 208 } // fin boucle sur le fichiers d'acq 200 cout<<"ntimefill = "<<ntimefill<<" / "<<nfile<< endl;209 cout<<"ntimefill = "<<ntimefill<<" / "<<nfile<<" , ntimebad="<<ntimebad<<" bad files"<<endl; 201 210 202 211 // --- keeping info with visi
Note:
See TracChangeset
for help on using the changeset viewer.