Changeset 14
- Timestamp:
- 06/24/04 16:05:19 (21 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDContainer.cc
r7 r14 71 71 aa1.reset(aa1.begin(whichIF)); 72 72 73 uInt nChan = spec.nrow(); 74 uInt nPol = spec.ncolumn(); 75 Vector<Float> pols(nPol); 76 uInt chani = 0; 77 uInt poli = 0; 73 //Vector<Float> pols(nPol); 74 ArrayAccessor<Float, Axis<0> > j(spec); 75 IPosition shp0 = spectrum_.shape(); 76 IPosition shp1 = spec.shape(); 77 if ( (shp0(2) != shp1(0)) || (shp0(3) != shp1(1)) ) { 78 cerr << "Arrays not conformant" << endl; 79 return False; 80 } 81 //uInt chani = 0; 82 //uInt poli = 0; 78 83 // assert dimensions are the same.... 79 84 for (ArrayAccessor<Float, Axis<2> > i(aa1);i != i.end(); ++i) { 80 pols = spec.row(chani); 85 //pols = spec.row(chani); 86 ArrayAccessor<Float, Axis<1> > jj(j); 81 87 for (ArrayAccessor<Float, Axis<3> > ii(i);ii != ii.end(); ++ii) { 82 (*ii) = pols[poli]; 83 poli++; 88 //(*ii) = pols[poli]; 89 (*ii) = (*jj); 90 //poli++; 91 jj++; 84 92 } 85 poli = 0; 86 chani++; 93 //poli = 0; 94 //chani++; 95 j++; 87 96 } 88 97 // unset flags for this spectrum, they might be set again by the 89 98 // setFlags method 99 90 100 IPosition shp = flags_.shape(); 91 101 IPosition start(4,whichBeam,whichIF,0,0); … … 103 113 aa1.reset(aa1.begin(whichIF)); 104 114 105 uInt nChan = flag.nrow(); 106 uInt nPol = flag.ncolumn(); 107 Vector<uChar> pols(nPol); 108 uInt chani = 0; 109 uInt poli = 0; 115 ArrayAccessor<uChar, Axis<0> > j(flag); 116 IPosition shp0 = flags_.shape(); 117 IPosition shp1 = flag.shape(); 118 if ( (shp0(2) != shp1(0)) || (shp0(3) != shp1(1)) ) { 119 cerr << "Arrays not conformant" << endl; 120 return False; 121 } 122 110 123 // assert dimensions are the same.... 111 124 for (ArrayAccessor<uChar, Axis<2> > i(aa1);i != i.end(); ++i) { 112 pols = flag.row(chani);125 ArrayAccessor<uChar, Axis<1> > jj(j); 113 126 for (ArrayAccessor<uChar, Axis<3> > ii(i);ii != ii.end(); ++ii) { 114 (*ii) = uChar(pols[poli]);115 poli++;127 (*ii) = (*jj); 128 jj++; 116 129 } 117 poli = 0; 118 chani++; 130 j++; 119 131 } 120 132 } … … 128 140 // assert dimensions are the same.... 129 141 uInt idx = 0; 130 142 143 131 144 for (ArrayAccessor<Float, Axis<2> > i(aa1);i != i.end(); ++i) { 132 145 idx = 0; 146 ArrayAccessor<Float, Axis<0> > j(tsys); 133 147 for (ArrayAccessor<Float, Axis<3> > ii(i);ii != ii.end(); ++ii) { 134 (*ii) = tsys[idx];135 idx++;148 (*ii) = (*j); 149 j++; 136 150 } 137 151 } -
trunk/src/SDReader.cc
r2 r14 200 200 // IFno beamNo are 1-relative 201 201 // refPix = nChan/2+1 in Integer arith.! 202 202 203 uInt refPix = header_.nchan/2+1; 203 204 //uInt frqslot = sdft.addFrequency(refPix, refFreq, freqInc); … … 219 220 220 221 // cerr << "SDReader::read - after SDContainer" << endl; 221 222 222 223 } 223 224 } … … 225 226 // insert container into table/list 226 227 table_->putSDContainer(sc); 227 cout << "Reading integration " << seqi << endl;228 //cout << "Reading integration " << seqi << endl; 228 229 seqi++;// next in list 229 230 }
Note:
See TracChangeset
for help on using the changeset viewer.