Legend:
- Unmodified
- Added
- Removed
-
trunk/src/SDAttr.cc
r361 r362 70 70 { 71 71 Float D = 1.0; 72 if (inst==ATPKSMB || inst==ATPKSHOH) { 73 D = 64.0; 74 } else if (inst==ATMOPRA) { 75 D = 22.0; 76 } else if (inst==TIDBINBILLA) { 77 D = 70.0; 78 } else if (inst==CEDUNA) { 79 D = 30.0; 80 } else if (inst==HOBART) { 81 D = 26.0; 82 } else { 83 throw(AipsError("Unknown instrument")); 72 switch (inst) { 73 case ATMOPRA: 74 { 75 D = 22.0; 76 } 77 break; 78 case ATPKSMB: 79 case ATPKSHOH: 80 { 81 D = 64.0; 82 } 83 break; 84 case TIDBINBILLA: 85 { 86 D = 70.0; 87 } 88 break; 89 case CEDUNA: 90 { 91 D = 30.0; 92 } 93 break; 94 case HOBART: 95 { 96 D = 26.0; 97 } 98 break; 99 default: 100 { 101 throw(AipsError("Unknown instrument")); 102 } 84 103 } 85 104 // … … 93 112 94 113 Vector<Float> facs(freqs.nelements(),1.0); 95 if (inst==ATPKSMB) { 96 cerr << "No beam efficiency data for this instrument - assuming unity" << endl; 97 } else if (inst==ATPKSHOH) { 98 cerr << "No beam efficiency data for this instrument - assuming unity" << endl; 99 } else if (inst==ATMOPRA) { 100 facs = interp (freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2004Y_); 101 } else if (inst==TIDBINBILLA) { 102 cerr << "No beam efficiency data for this instrument - assuming unity" << endl; 103 } else if (inst==CEDUNA) { 104 cerr << "No beam efficiency data for this instrument - assuming unity" << endl; 105 } else if (inst==HOBART) { 106 cerr << "No beam efficiency data for this instrument - assuming unity" << endl; 107 } else { 114 switch (inst) { 115 case ATMOPRA: 116 { 117 facs = interp (freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2004Y_); 118 } 119 break; 120 default: 121 { 122 cerr << "No beam efficiency data for this instrument - assuming unity" << endl; 123 } 108 124 } 109 125 // … … 117 133 118 134 Vector<Float> facs(freqs.nelements(),1.0); 119 if (inst==ATPKSMB) { 120 cerr << "No aperture efficiency data for this instrument - assuming unity" << endl; 121 } else if (inst==ATPKSHOH) { 122 cerr << "No aperture efficiency data for this instrument - assuming unity" << endl; 123 } else if (inst==ATMOPRA) { 124 facs = interp (freqs/1.0e9f, MopEtaApX_, MopEtaAp2004Y_); 125 } else if (inst==TIDBINBILLA) { 126 cerr << "No aperture efficiency data for this instrument - assuming unity" << endl; 127 } else if (inst==CEDUNA) { 128 cerr << "No aperture efficiency data for this instrument - assuming unity" << endl; 129 } else if (inst==HOBART) { 130 cerr << "No aperture efficiency data for this instrument - assuming unity" << endl; 131 } else { 132 cerr << "No aperture efficiency data for this instrument - assuming unity" << endl; 135 switch (inst) { 136 case ATMOPRA: 137 { 138 facs = interp (freqs/1.0e9f, MopEtaApX_, MopEtaAp2004Y_); 139 } 140 break; 141 default: 142 { 143 cerr << "No aperture efficiency data for this instrument - assuming unity" << endl; 144 } 133 145 } 134 146 return facs; … … 166 178 167 179 180 Vector<Float> SDAttr::gainElevationPoly (Instrument inst) const 181 { 182 183 // Look at date where appropriate 184 185 switch (inst) { 186 case TIDBINBILLA: 187 { 188 return TidGainElPoly_.copy(); 189 } 190 break; 191 default: 192 { 193 Vector<Float> t; 194 return t.copy(); 195 } 196 } 197 } 198 199 200 168 201 169 202 // Private … … 186 219 187 220 void SDAttr::initData () 188 {189 221 // 190 222 // Mopra data from online Mopra guide. 191 223 // 224 { 225 226 // Beam efficiency 227 192 228 MopEtaBeamX_.resize(3); 193 229 MopEtaBeamX_(0) = 86.0; … … 204 240 MopEtaBeam2004Y_(1) = 0.44; 205 241 MopEtaBeam2004Y_(2) = 0.42; 206 // 242 243 // Aperture efficiency 244 207 245 MopEtaApX_.resize(2); 208 246 MopEtaApX_(0) = 86.0; … … 212 250 MopEtaAp2004Y_(0) = 0.33; 213 251 MopEtaAp2004Y_(1) = 0.24; 214 } 215 252 253 // Gain elevation correction polynomial coefficients (for elevation in degrees) 254 255 TidGainElPoly_.resize(3); 256 TidGainElPoly_(0) = 3.58788e-1; 257 TidGainElPoly_(1) = 2.87243e-2; 258 TidGainElPoly_(2) = -3.219093e-4; 259 } -
trunk/src/SDAttr.h
r361 r362 63 63 64 64 // Beam efficiency. Frequency in Hz. Returns 1 if unknown. 65 casa::Vector<casa::Float> beamEfficiency (Instrument , const casa::MEpoch& dateObs,65 casa::Vector<casa::Float> beamEfficiency (Instrument instr, const casa::MEpoch& dateObs, 66 66 const casa::Vector<casa::Float>& freqs) const; 67 67 68 68 // Aperture efficiency. Frequency in Hz. Returns 1 if unknown. 69 casa::Vector<casa::Float> apertureEfficiency (Instrument , const casa::MEpoch& dateObs,69 casa::Vector<casa::Float> apertureEfficiency (Instrument instr, const casa::MEpoch& dateObs, 70 70 const casa::Vector<casa::Float>& freqs) const; 71 71 72 72 // Find factor to convert Jy -> K for this telescope, date of observation and frequency (Hz) 73 casa::Vector<casa::Float> JyPerK (Instrument , const casa::MEpoch& dateObs,73 casa::Vector<casa::Float> JyPerK (Instrument instr, const casa::MEpoch& dateObs, 74 74 const casa::Vector<casa::Float>& freqs) const; 75 75 … … 77 77 static casa::Float findJyPerKFac (casa::Float etaAp, casa::Float D); 78 78 79 // Gain Elevation polynomial correction coefficients (elevation in degrees) 80 // Returns length 0 if not known. 81 casa::Vector<casa::Float> gainElevationPoly (Instrument instr) const; 82 79 83 private: 80 84 81 85 // Static data 82 86 83 casa::Vector<casa::Float> MopEtaBeamX_; 87 casa::Vector<casa::Float> MopEtaBeamX_; // Beam efficiency 84 88 casa::Vector<casa::Float> MopEtaBeam2003Y_; 85 89 casa::Vector<casa::Float> MopEtaBeam2004Y_; 86 casa::Vector<casa::Float> MopEtaApX_; 90 // 91 casa::Vector<casa::Float> MopEtaApX_; // Aperture efficiency 87 92 casa::Vector<casa::Float> MopEtaAp2004Y_; 93 // 94 casa::Vector<casa::Float> TidGainElPoly_; // Gain-el correction poly coeffs 88 95 89 96 // Init private data
Note:
See TracChangeset
for help on using the changeset viewer.