Changeset 16 for trunk/src/SDReader.cc
- Timestamp:
- 06/30/04 11:00:23 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDReader.cc
r14 r16 30 30 //#--------------------------------------------------------------------------- 31 31 #include <atnf/PKSIO/PKSreader.h> 32 32 #include <aips/Quanta/MVTime.h> 33 33 #include "SDContainer.h" 34 34 #include "SDReader.h" 35 35 36 36 using namespace atnf_sd; 37 38 void SDHeader::print() const { 39 MVTime mvt(this->utc); 40 41 cout << "Observer: " << this->observer << endl 42 << "Project: " << this->project << endl 43 << "Obstype: " << this->obstype << endl 44 << "Antenna: " << this->antennaname << endl 45 << "Ant. Position: " << this->antennaposition << endl 46 << "Equinox: " << this->equinox << endl 47 << "Freq. ref.: " << this->freqref << endl 48 << "Ref. frequency: " << this->reffreq << endl 49 << "Bandwidth: " << this->bandwidth << endl 50 << "Time (utc): " 51 << mvt.string() 52 << endl; 53 //setprecision(10) << this->utc << endl; 54 } 55 37 56 38 57 SDReader::SDReader() : … … 85 104 86 105 // Get basic parameters. 87 Double bandwidth, refFreq;88 106 header_ = SDHeader(); 89 107 header_.nchan = nChan_; … … 152 170 while ( (cursor_ <= seq[n-1]) || getAll) { 153 171 // only needs to be create if in seq 154 SDContainer sc(header_.nbeam,header_.nif,header_.n chan,header_.npol);172 SDContainer sc(header_.nbeam,header_.nif,header_.npol,header_.nchan); 155 173 156 174 // iterate over one correlator integration cycle = nBeam*nIF 157 175 for (uInt row=0; row < stepsize; row++) { 158 159 //cerr << "SDReader starting reading process row = " << row << endl;160 161 176 // add scanid from GROUP field -- this will remove the need for 162 177 // stepsize as well … … 171 186 tsys, sigma, calFctr, baseLin, baseSub, 172 187 spectra, flagtra, xCalFctr, xPol); 173 174 // cerr << "SDReader row read"<< endl;175 176 188 if (status) { 177 189 if (status == -1) { … … 183 195 } 184 196 // if in the given list 185 if ( cursor_ == seq[seqi]) { 186 187 //cerr << "SDReader cursor == seq[i]" << endl; 188 197 if (cursor_ == seq[seqi]) { 189 198 // add integration cycle 190 199 if (row==0) { … … 193 202 //focusRot, temperature, pressure, humidity, windSpeed, 194 203 //windAz srcDir, srcPM, srcVel 204 sc.timestamp = mjd; 205 sc.interval = interval; 206 sc.sourcename = srcName; 195 207 } 196 197 // cerr << "SDReader::read - before SDContainer" << endl;198 199 208 // add specific info 200 209 // IFno beamNo are 1-relative 201 // refPix = nChan/2+1 in Integer arith.! 202 203 uInt refPix = header_.nchan/2+1; 210 // refPix = nChan/2+1 in Integer arith.! 211 //uInt refPix = header_.nchan/2+1; 204 212 //uInt frqslot = sdft.addFrequency(refPix, refFreq, freqInc); 205 213 … … 208 216 prevName = srcName;//temp 209 217 }//temp 210 211 sc.sourcename = srcName;212 sc.timestamp = mjd;213 sc.interval = interval;214 218 sc.scanid = scanid; 215 219 //sc.setFrequencyMap(frqslot,IFno-1); … … 218 222 sc.setTsys(tsys, beamNo-1, IFno-1); 219 223 //sc.addPointing(direction, beamNo-1); 220 221 // cerr << "SDReader::read - after SDContainer" << endl;222 223 224 } 224 225 } … … 226 227 // insert container into table/list 227 228 table_->putSDContainer(sc); 228 //cout << "Reading integration " << seqi << endl;229 229 seqi++;// next in list 230 230 } 231 cursor_++; 231 cursor_++;// increment position in file 232 232 } 233 233 return status;
Note: See TracChangeset
for help on using the changeset viewer.