Changeset 4009 in Sophya for trunk/AddOn
- Timestamp:
- Jun 23, 2011, 11:18:28 PM (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/AddOn/TAcq/corrcrtadc.cc
r4007 r4009 294 294 } 295 295 296 /* --Fonction-- */ 296 297 int CombineIQPairs(TMatrix< complex<r_4> >& cfour) 297 298 { 298 // to be coded ... 299 // We assume the following channel numbering for the I-Q pairs 300 // Row pairs : (0,4) (1,5) (2,6) (3,7) (8,12) (9,13) (10,14) (11,15) ... are assumed to be 301 // IQ pairs in the matrix cfour 302 // We compute the I rows by the left side band, and the Q rows by the right side band 303 304 // Left = a I + b Q 305 // Right = c I + d Q 306 complex<r_4> za(1.,0.); 307 complex<r_4> zb(0.,1.); 308 complex<r_4> zc(1.,0.); 309 complex<r_4> zd(0.,-1.); 310 311 int nboards = cfour.NRows()/4; 312 for(int jb=0; jb<nboards-1; jb++) { 313 for(int c=0; c<4; c++) { 314 sa_size_t ii = jb*4+c; // sa_size_t are long integers 315 sa_size_t iq = ii+4; 316 // Combine the two I,Q fourier coefficient vectors to form the left and right sid bands 317 TVector< complex<r_4> > leftband = za*cfour.Row(ii)+zb*cfour.Row(iq); 318 TVector< complex<r_4> > rightband = zc*cfour.Row(ii)+zd*cfour.Row(iq); 319 // replace the two I,Q vectors by left and right computed side bands 320 cfour.Row(ii)=leftband; 321 cfour.Row(iq)=rightband; 322 } 323 } 299 324 return 0; 300 325 }
Note:
See TracChangeset
for help on using the changeset viewer.