Changeset 1188
- Timestamp:
- 08/28/06 12:20:39 (18 years ago)
- Location:
- trunk/src
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STAttr.cpp
r878 r1188 57 57 } 58 58 59 STAttr& STAttr::operator=(const STAttr& other) 59 STAttr& STAttr::operator=(const STAttr& other) 60 60 { 61 61 if (this != &other) { … … 107 107 } 108 108 109 Vector<Float> STAttr::beamEfficiency(Instrument inst, const MEpoch& dateObs, 109 Vector<Float> STAttr::beamEfficiency(Instrument inst, const MEpoch& dateObs, 110 110 const Vector<Float>& freqs) const 111 111 { … … 122 122 pushLog("There is no beam efficiency data from before 2003" 123 123 " - using 2003 data"); 124 facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2003Y_); 124 facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2003Y_); 125 125 } else if (year==2003) { 126 126 pushLog("Using beam efficiency data from 2003"); 127 facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2003Y_); 127 facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2003Y_); 128 128 } else { 129 129 pushLog("Using beam efficiency data from 2004"); 130 facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2004Y_); 130 facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2004Y_); 131 131 } 132 132 } … … 140 140 } 141 141 142 Vector<Float> STAttr::apertureEfficiency(Instrument inst, 143 const MEpoch& dateObs, 142 Vector<Float> STAttr::apertureEfficiency(Instrument inst, 143 const MEpoch& dateObs, 144 144 const Vector<Float>& freqs) const 145 145 { 146 146 147 147 // Look at date where appropriate 148 148 MVTime t(dateObs.getValue()); 149 149 uInt year = t.year(); 150 150 151 151 Vector<Float> facs(freqs.nelements(),1.0); 152 152 switch (inst) { … … 180 180 const Vector<Float>& freqs) const 181 181 { 182 182 183 183 // Find what we need 184 184 Vector<Float> etaAp = apertureEfficiency(inst, dateObs, freqs); … … 223 223 } 224 224 225 FeedPolTypeSTAttr::feedPolType(Instrument inst) const226 { 227 FeedPolType type = UNKNOWNFEED;225 std::string STAttr::feedPolType(Instrument inst) const 226 { 227 std::string type; 228 228 switch (inst) { 229 229 case ATMOPRA: … … 231 231 case ATPKSHOH: 232 232 { 233 type = LINEAR;233 type = "linear"; 234 234 } 235 235 break; 236 236 case TIDBINBILLA: 237 237 { 238 type = CIRCULAR;238 type = "circular"; 239 239 } 240 240 break; 241 241 default: 242 242 { 243 type = UNKNOWNFEED;243 type = "linear"; 244 244 } 245 245 } … … 250 250 // Private 251 251 Vector<Float> STAttr::interp(const Vector<Float>& xOut, 252 const Vector<Float>& xIn, 252 const Vector<Float>& xIn, 253 253 const Vector<Float>& yIn) const 254 254 { … … 258 258 259 259 Vector<Bool> mIn(xIn.nelements(),True); 260 260 261 261 InterpolateArray1D<Float,Float>::interpolate(yOut, mOut, xOut, 262 262 xIn, yIn, mIn, 263 263 method, True, True); 264 264 265 265 return yOut; 266 266 } 267 267 268 void STAttr::initData() 268 void STAttr::initData() 269 269 // 270 270 // Mopra data from Mopra web page … … 284 284 MopEtaBeam2003Y_(1) = 0.37; 285 285 MopEtaBeam2003Y_(2) = 0.37; // replicated from (1) 286 286 287 287 MopEtaBeam2004Y_.resize(3); 288 288 MopEtaBeam2004Y_(0) = 0.49; … … 321 321 String t(instrument); 322 322 t.upcase(); 323 323 324 324 // The strings are what STReader returns, after cunning 325 325 // interrogation of station names... :-( -
trunk/src/STAttr.h
r1030 r1188 31 31 #ifndef STATTR_H 32 32 #define STATTR_H 33 34 #include <string> 33 35 34 36 #include <casa/aips.h> … … 88 90 // Find feed polarization type of feeds. In future this needs to come 89 91 // from the data themselves 90 FeedPolTypefeedPolType(Instrument) const;92 std::string feedPolType(Instrument) const; 91 93 92 94 // Helper function to check instrument (antenna) name and give enum -
trunk/src/STFiller.cpp
r1142 r1188 112 112 header_->nbeam = nBeam_; 113 113 114 // not the right thing to do?!115 //if ( nPol_ == 1 ) header_->poltype = "stokes";116 //else header_->poltype = "linear";117 header_->poltype = "linear";118 114 Int status = reader_->getHeader(header_->observer, header_->project, 119 115 header_->antennaname, header_->antennaposition, … … 145 141 header_->fluxunit = "K"; 146 142 } 147 143 STAttr stattr; 144 header_->poltype = stattr.feedPolType(inst); 148 145 header_->nif = nIF_; 149 146 header_->epoch = "UTC";
Note:
See TracChangeset
for help on using the changeset viewer.