Commit 3680b652 authored by Jean-Eric Campagne's avatar Jean-Eric Campagne
Browse files

(JEC) 5/7/16 bug fix in VisiP4Reader::ReorderFreqs (chanpairs are 1-indexed)

parent a143e301
......@@ -162,15 +162,16 @@ TMatrix< complex<r_4> > VisiP4Reader::SubtractOffset(TMatrix< complex<r_4> > &
{
r_4 npaqV = vismtx.Info()["NPAQSUM"];
r_4 npaqM = meanmtx.Info()["NPAQSUM"];
r_4 npaqM2 = npaqM*npaqM;
TMatrix< complex<r_4> > resmtx(vismtx.NRows(), vismtx.NCols());
for(sa_size_t ir=0; ir<resmtx.NRows(); ir++){
sa_size_t iCh = chanpairs(ir,0);
sa_size_t jCh = chanpairs(ir,1);
sa_size_t iCh = chanpairs(ir,0)-1; //chanpairs are 1-indexes (JEC 5/7/16)
sa_size_t jCh = chanpairs(ir,1)-1;
for(sa_size_t ic=0; ic<resmtx.NCols(); ic++){
resmtx(ir,ic) = vismtx(ir,ic)/complex<r_4>(npaqV,0.)
......@@ -179,6 +180,7 @@ TMatrix< complex<r_4> > VisiP4Reader::SubtractOffset(TMatrix< complex<r_4> > &
}//loop cols : freq
}//loop rows : visi
return resmtx;
}
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