Changeset 1060 for trunk/src/STFiller.cpp
- Timestamp:
- 06/07/06 16:24:27 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STFiller.cpp
r999 r1060 18 18 #include <casa/Quanta/Unit.h> 19 19 #include <casa/Arrays/ArrayMath.h> 20 #include <casa/Arrays/ArrayLogical.h> 20 21 #include <casa/Utilities/Regex.h> 21 22 … … 83 84 // Create reader and fill in values for arguments 84 85 String format; 85 Vector<Bool> beams; 86 if ( (reader_ = getPKSreader(inName, 0, 0, format, beams, nIF_, 87 nChan_, nPol_, haveBase, haveSpectra, 88 haveXPol_)) == 0 ) { 86 Vector<Bool> beams, ifs; 87 Vector<uInt> nchans,npols; 88 if ( (reader_ = getPKSreader(inName, 0, 0, format, beams, ifs, 89 nchans, npols, haveXPol_,haveBase, haveSpectra 90 )) == 0 ) { 89 91 throw(AipsError("Creation of PKSreader failed")); 90 92 } … … 95 97 return; 96 98 } 97 98 99 nBeam_ = beams.nelements(); 100 nIF_ = ifs.nelements(); 99 101 // Get basic parameters. 100 if ( haveXPol_) {102 if ( anyEQ(haveXPol_, True) ) { 101 103 pushLog("Cross polarization present"); 102 nPol_ += 2; // Convert Complex -> 2 Floats 104 for (uInt i=0; i< npols.nelements();++i) { 105 if (npols[i] < 3) npols[i] += 2;// Convert Complex -> 2 Floats 106 } 103 107 } 104 108 if (header_) delete header_; 105 109 header_ = new STHeader(); 106 header_->nchan = nChan_;107 header_->npol = nPol_;110 header_->nchan = max(nchans); 111 header_->npol = max(npols); 108 112 header_->nbeam = nBeam_; 109 113 … … 133 137 header_->obstype = String("fswitch"); 134 138 } 135 136 139 // Determine Telescope and set brightness unit 137 140 … … 147 150 // *** header_->frequnit = "Hz" 148 151 // Apply selection criteria. 149 150 152 Vector<Int> ref; 151 Vector<Bool> beamSel(nBeam_,True);152 Vector<Bool> IFsel(nIF_,True);153 154 153 ifOffset_ = 0; 155 154 if (whichIF>=0) { 156 155 if (whichIF>=0 && whichIF<nIF_) { 157 IFsel= False;158 IFsel(whichIF) = True;156 ifs = False; 157 ifs(whichIF) = True; 159 158 header_->nif = 1; 160 159 nIF_ = 1; … … 172 171 if (whichBeam>=0) { 173 172 if (whichBeam>=0 && whichBeam<nBeam_) { 174 beam Sel= False;175 beam Sel(whichBeam) = True;173 beams = False; 174 beams(whichBeam) = True; 176 175 header_->nbeam = 1; 177 176 nBeam_ = 1; … … 187 186 Vector<Int> start(nIF_, 1); 188 187 Vector<Int> end(nIF_, 0); 189 reader_->select(beam Sel, IFsel, start, end, ref, True, haveXPol_);188 reader_->select(beams, ifs, start, end, ref, True, haveXPol_[0], False); 190 189 table_->setHeader(*header_); 191 190 } … … 319 318 row.put(table_->table().nrow()-1, rec); 320 319 } 321 if ( haveXPol_ ) {320 if ( haveXPol_[0] ) { 322 321 // no tsys given for xpol, so emulate it 323 322 tsysvec = sqrt(tsys[0]*tsys[1]);
Note: See TracChangeset
for help on using the changeset viewer.