📣 An issue occured with the embedded container registry on October 25 2021, between 10:30 and 12:10 (UTC+2). Any persisting issues should be reported to CC-IN2P3 Support. 🐛

Commit c02aecf4 authored by perdereau's avatar perdereau
Browse files

correct logic problem in rdthermrfi : last bin was never filled.

parent 55db3f03
...@@ -110,7 +110,8 @@ int main(int narg, const char* arg[]) ...@@ -110,7 +110,8 @@ int main(int narg, const char* arg[])
if (!fgok) break; if (!fgok) break;
TMatrix< complex<r_4> > vismtx = wreader.getAverageVisMtx(cfdate); TMatrix< complex<r_4> > vismtx = wreader.getAverageVisMtx(cfdate);
if (cnt==0) { //resizing matrices for sum of auto-correlations and sum of 6 cross-correlations
if (cnt==0) { //resizing matrices for sum of auto-correlations and sum of cross-correlations
visum = vismtx; meanvismtx=vismtx; visum = vismtx; meanvismtx=vismtx;
tfmSX=wreader.getTotalNbWindows()/deltaIavg; tfmSX=wreader.getTotalNbWindows()/deltaIavg;
tfmSY=vismtx.NCols()/TFMfbin; tfmSY=vismtx.NCols()/TFMfbin;
...@@ -120,13 +121,15 @@ int main(int narg, const char* arg[]) ...@@ -120,13 +121,15 @@ int main(int narg, const char* arg[])
dateobs=cfdate; dateobs=cfdate;
// recupere le jour de depart @ 0h // recupere le jour de depart @ 0h
datestart = TimeStamp(cfdate.DaysPart(),0.); datestart = TimeStamp(cfdate.DaysPart(),0.);
cnt++; // y avait cnt++ & continue ?
continue; }// end of resizing
else{
visum += vismtx;
meanvismtx += vismtx;
} }
if (I==0) dateobs=cfdate; // start filling a new time bin if (I==0) dateobs=cfdate; // start filling a new time bin
// Accumulating // Accumulating
visum += vismtx;
meanvismtx += vismtx;
I++; // incrementing DeltaTime counter I++; // incrementing DeltaTime counter
// we check that our time index did not go beyond the allocated array size (might not be necessary) // we check that our time index did not go beyond the allocated array size (might not be necessary)
...@@ -150,7 +153,7 @@ int main(int narg, const char* arg[]) ...@@ -150,7 +153,7 @@ int main(int narg, const char* arg[])
TFMtmidx++; TFMtmidx++;
// ... done // ... done
I=0; cntnt++; I=0; cntnt++;
visum = complex<r_4>(0.,0.); visum = complex<r_4>(0.,0.); // RAZ
} }
cnt++; cnt++;
if ((cnt>0)&&(cntnt%10==0)&&(cntnt>pcntnt)) { if ((cnt>0)&&(cntnt%10==0)&&(cntnt>pcntnt)) {
...@@ -158,7 +161,7 @@ int main(int narg, const char* arg[]) ...@@ -158,7 +161,7 @@ int main(int narg, const char* arg[])
<<" /Max="<<wreader.getTotalNbWindows()<<" DateObs="<<dateobs<<endl; <<" /Max="<<wreader.getTotalNbWindows()<<" DateObs="<<dateobs<<endl;
pcntnt=cntnt; pcntnt=cntnt;
} }
} // End of redaing visibility matrices loop } // End of reading visibility matrices loop
cout<<"rdthermrfi/Info: count="<<cnt*wreader.getWindowSize()<<" Visibility Matrices read "<<endl; cout<<"rdthermrfi/Info: count="<<cnt*wreader.getWindowSize()<<" Visibility Matrices read "<<endl;
if (cnt>0) { if (cnt>0) {
...@@ -207,14 +210,11 @@ int main(int narg, const char* arg[]) ...@@ -207,14 +210,11 @@ int main(int narg, const char* arg[])
cout << " number of objs in fits "<< ext_names.size() << endl; cout << " number of objs in fits "<< ext_names.size() << endl;
cout << ext_names << endl; cout << ext_names << endl;
delete(fos); delete(fos);
} }
}// end if cnt>0
}
// resu.Update(); // resu.Update();
cout << resu; // Update est fait lors du print cout << resu; // Update est fait lors du print
} }//end try
catch (PException& exc) { catch (PException& exc) {
cerr << " rdthermrfi.cc catched PException " << exc.Msg() << endl; cerr << " rdthermrfi.cc catched PException " << exc.Msg() << endl;
rc = 77; rc = 77;
......
...@@ -267,7 +267,8 @@ int main(int narg, const char* arg[]) ...@@ -267,7 +267,8 @@ int main(int narg, const char* arg[])
// recupere le jour de depart @ 0h // recupere le jour de depart @ 0h
datestart = TimeStamp(cfdate.DaysPart(),0.); datestart = TimeStamp(cfdate.DaysPart(),0.);
} } // end if cnt==0
if (I==0) { // start filling a new time bin if (I==0) { // start filling a new time bin
dateobs=cfdate; dateobs=cfdate;
if (prtlev>0) if (prtlev>0)
......
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