Changeset 420
- Timestamp:
- 02/14/05 12:36:38 (20 years ago)
- Location:
- trunk/src
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDReader.cc
r414 r420 48 48 header_(0), 49 49 frequencies_(0), 50 table_(new SDMemTable()) { 50 table_(new SDMemTable()), 51 haveXPol_(False) 52 { 51 53 cursor_ = 0; 52 54 } … … 56 58 header_(0), 57 59 frequencies_(0), 58 table_(new SDMemTable()) { 60 table_(new SDMemTable()), 61 haveXPol_(False) 62 { 59 63 cursor_ = 0; 60 64 open(filename, whichIF, whichBeam); … … 64 68 reader_(0), 65 69 header_(0), 66 table_(tbl) { 70 table_(tbl), 71 haveXPol_(False) 72 { 67 73 cursor_ = 0; 68 74 } … … 88 94 int whichIF, int whichBeam) { 89 95 if (reader_) delete reader_; reader_ = 0; 90 Bool haveBase, haveSpectra , haveXPol;96 Bool haveBase, haveSpectra; 91 97 92 98 String inName(filename); … … 105 111 if ((reader_ = getPKSreader(inName, 0, False, format, beams, nIF_, 106 112 nChan_, nPol_, haveBase, haveSpectra, 107 haveXPol )) == 0) {113 haveXPol_)) == 0) { 108 114 throw(AipsError("Creation of PKSreader failed")); 109 115 } … … 117 123 nBeam_ = beams.nelements(); 118 124 // Get basic parameters. 119 if (haveXPol) { 120 cout << "Warning. Ignoring cross polarisation." << endl; 121 nPol_--; 122 } 125 if (haveXPol_) { 126 cout << "Cross polarization present" << endl; 127 nPol_ += 2; // Convert Complex -> 2 Floats 128 } 129 123 130 if (header_) delete header_; 124 131 header_ = new SDHeader(); … … 193 200 Vector<Int> start(nIF_, 1); 194 201 Vector<Int> end(nIF_, 0); 195 reader_->select(beamSel, IFsel, start, end, ref, True, haveXPol );202 reader_->select(beamSel, IFsel, start, end, ref, True, haveXPol_); 196 203 table_->putSDHeader(*header_); 197 204 … … 288 295 sc.refbeam = refBeam-1;//make it 0-based; -1 if nbeams == 1 289 296 sc.scanid = scanNo-1;//make it 0-based 290 sc.setSpectrum(spectra, beamNo, IFno); 291 sc.setFlags(flagtra, beamNo, IFno); 292 sc.setTsys(tsys, beamNo, IFno); 297 if (haveXPol_) { 298 sc.setSpectrum(spectra, xPol, beamNo, IFno); 299 sc.setFlags(flagtra, beamNo, IFno, True); 300 } else { 301 sc.setSpectrum(spectra, beamNo, IFno); 302 sc.setFlags(flagtra, beamNo, IFno, False); 303 } 304 sc.setTsys(tsys, beamNo, IFno, haveXPol_); 293 305 sc.setDirection(direction, beamNo); 294 306 } -
trunk/src/SDReader.h
r405 r420 85 85 casa::Double timestamp_; 86 86 casa::uInt beamOffset_, ifOffset_; 87 casa::Bool haveXPol_; 87 88 }; 88 89
Note:
See TracChangeset
for help on using the changeset viewer.