Changeset 1779 for branches/mergetest/src/STMath.h
- Timestamp:
- 07/29/10 19:13:46 (14 years ago)
- Location:
- branches/mergetest
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
branches/mergetest
- Property svn:mergeinfo changed
-
branches/mergetest/src/STMath.h
r1689 r1779 119 119 const std::string& mode, bool tsys=false ); 120 120 121 // array operation 122 casa::CountedPtr<Scantable> 123 arrayOperate( const casa::CountedPtr<Scantable>& in, 124 const std::vector<float> val, 125 const std::string& mode, 126 const std::string& opmode="channel", 127 bool tsys=false ); 128 129 // channel operation 130 casa::CountedPtr<Scantable> 131 arrayOperateChannel( const casa::CountedPtr<Scantable>& in, 132 const std::vector<float> val, 133 const std::string& mode, bool tsys=false ); 134 135 // row operation 136 casa::CountedPtr<Scantable> 137 arrayOperateRow( const casa::CountedPtr<Scantable>& in, 138 const std::vector<float> val, 139 const std::string& mode, bool tsys=false ); 140 141 // 2d array operation 142 casa::CountedPtr<Scantable> 143 array2dOperate( const casa::CountedPtr<Scantable>& in, 144 const std::vector< std::vector<float> > val, 145 const std::string& mode, bool tsys=false ); 146 121 147 casa::CountedPtr<Scantable> 122 148 binaryOperate( const casa::CountedPtr<Scantable>& left, … … 134 160 /** 135 161 * Calibrate total power scans (translated from GBTIDL) 136 * @param calon uncalibrated Scantable with CAL noise signal 162 * @param calon uncalibrated Scantable with CAL noise signal 137 163 * @param caloff uncalibrated Scantable with no CAL signal 138 164 * @param tcal optional scalar Tcal, CAL temperature (K) 139 * @return casa::CountedPtr<Scantable> which holds a calibrated Scantable 165 * @return casa::CountedPtr<Scantable> which holds a calibrated Scantable 140 166 * (spectrum - average of the two CAL on and off spectra; 141 167 * tsys - mean Tsys = <caloff>*Tcal/<calon-caloff> + Tcal/2) 142 */ 168 */ 143 169 casa::CountedPtr<Scantable> dototalpower( const casa::CountedPtr<Scantable>& calon, 144 170 const casa::CountedPtr<Scantable>& caloff, … … 151 177 * @param smoothref optional Boxcar smooth width of the reference scans 152 178 * default: no smoothing (=1) 153 * @param tsysv optional scalar Tsys value at the zenith, required to 154 * set tau, as well 179 * @param tsysv optional scalar Tsys value at the zenith, required to 180 * set tau, as well 155 181 * @param tau optional scalar Tau value 156 182 * @return casa::CountedPtr<Scantable> which holds combined scans … … 163 189 casa::Float tau=0.0 ); 164 190 165 /**191 /** 166 192 * Calibrate GBT Nod scan pairs (translated from GBTIDL) 167 193 * @param s Scantable which contains Nod scans … … 170 196 * @param tsysv optional scalar Tsys value at the zenith, required to 171 197 * set tau, as well 172 * @param tau optional scalar Tau value 198 * @param tau optional scalar Tau value 173 199 * @param tcal optional scalar Tcal, CAL temperature (K) 174 200 * @return casa::CountedPtr<Scantable> which holds calibrated scans … … 199 225 casa::Float tcal=0.0 ); 200 226 227 /** 228 * Calibrate data with Chopper-Wheel like calibration method 229 * which adopts position switching by antenna motion, 230 * wobbler (nutator) switching and On-The-Fly observation. 231 * 232 * The method is applicable to APEX, and other telescopes other than GBT. 233 * 234 * @param a Scantable which contains ON and OFF scans 235 * @param a string that indicates calibration mode 236 * @param a string that indicates antenna name 237 **/ 238 casa::CountedPtr<Scantable> cwcal( const casa::CountedPtr<Scantable>& s, 239 const casa::String calmode, 240 const casa::String antname ); 241 242 /** 243 * Calibrate frequency switched scans with Chopper-Wheel like 244 * calibration method. 245 * 246 * The method is applicable to APEX, and other telescopes other than GBT. 247 * 248 * @param a Scantable which contains ON and OFF scans 249 * @param a string that indicates antenna name 250 **/ 251 casa::CountedPtr<Scantable> cwcalfs( const casa::CountedPtr<Scantable>& s, 252 const casa::String antname ); 253 254 255 /** 256 * Folding frequency-switch data 257 * @param sig 258 * @param ref 259 * @param choffset 260 **/ 261 casa::CountedPtr<Scantable> dofold( const casa::CountedPtr<Scantable> &sig, 262 const casa::CountedPtr<Scantable> &ref, 263 casa::Double choffset, 264 casa::Double choffset = 0.0 ); 265 266 /** 267 * ALMA calibration 268 **/ 269 casa::CountedPtr<Scantable> almacal( const casa::CountedPtr<Scantable>& s, 270 const casa::String calmode ) ; 271 casa::CountedPtr<Scantable> almacalfs( const casa::CountedPtr<Scantable>& s ) ; 201 272 202 273 casa::CountedPtr<Scantable> … … 206 277 const std::vector<bool>& mask, 207 278 const std::string& which); 279 280 std::vector< int > minMaxChan(const casa::CountedPtr<Scantable>& in, 281 const std::vector<bool>& mask, 282 const std::string& which); 208 283 209 284 casa::CountedPtr<Scantable> bin( const casa::CountedPtr<Scantable>& in, … … 266 341 double end, const std::string& mode="frequency"); 267 342 343 // test for average spectra with different channel/resolution 344 casa::CountedPtr<Scantable> 345 new_average( const std::vector<casa::CountedPtr<Scantable> >& in, 346 const bool& compel, 347 const std::vector<bool>& mask = std::vector<bool>(), 348 const std::string& weight = "NONE", 349 const std::string& avmode = "SCAN" ) 350 throw (casa::AipsError) ; 351 268 352 private: 269 353 casa::CountedPtr<Scantable> applyToPol( const casa::CountedPtr<Scantable>& in, … … 301 385 maskedArray( const casa::Vector<casa::Float>& s, 302 386 const casa::Vector<casa::uChar>& f ); 387 casa::MaskedArray<casa::Double> 388 maskedArray( const casa::Vector<casa::Double>& s, 389 const casa::Vector<casa::uChar>& f ); 303 390 casa::Vector<casa::uChar> 304 391 flagsFromMA(const casa::MaskedArray<casa::Float>& ma); 305 392 393 vector<float> getSpectrumFromTime( string reftime, casa::CountedPtr<Scantable>& s, string mode = "before" ) ; 394 vector<float> getTcalFromTime( string reftime, casa::CountedPtr<Scantable>& s, string mode="before" ) ; 395 vector<float> getTsysFromTime( string reftime, casa::CountedPtr<Scantable>& s, string mode="before" ) ; 396 vector<int> getRowIdFromTime( string reftime, casa::CountedPtr<Scantable>& s ) ; 397 398 // Chopper-Wheel type calibration 399 vector<float> getCalibratedSpectra( casa::CountedPtr<Scantable>& on, 400 casa::CountedPtr<Scantable>& off, 401 casa::CountedPtr<Scantable>& sky, 402 casa::CountedPtr<Scantable>& hot, 403 casa::CountedPtr<Scantable>& cold, 404 int index, 405 string antname ) ; 406 // Tsys * (ON-OFF)/OFF 407 vector<float> getCalibratedSpectra( casa::CountedPtr<Scantable>& on, 408 casa::CountedPtr<Scantable>& off, 409 int index ) ; 410 vector<float> getFSCalibratedSpectra( casa::CountedPtr<Scantable>& sig, 411 casa::CountedPtr<Scantable>& ref, 412 casa::CountedPtr<Scantable>& sky, 413 casa::CountedPtr<Scantable>& hot, 414 casa::CountedPtr<Scantable>& cold, 415 int index ) ; 416 vector<float> getFSCalibratedSpectra( casa::CountedPtr<Scantable>& sig, 417 casa::CountedPtr<Scantable>& ref, 418 vector< casa::CountedPtr<Scantable> >& sky, 419 vector< casa::CountedPtr<Scantable> >& hot, 420 vector< casa::CountedPtr<Scantable> >& cold, 421 int index ) ; 422 double getMJD( string strtime ) ; 423 306 424 bool insitu_; 307 425 };
Note: See TracChangeset
for help on using the changeset viewer.