Changeset 1188 for trunk/src/STAttr.cpp
- Timestamp:
- 08/28/06 12:20:39 (18 years ago)
- File:
-
- 1 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... :-(
Note: See TracChangeset
for help on using the changeset viewer.