Changeset 2658 for trunk/src/STMath.cpp
- Timestamp:
- 10/10/12 14:29:17 (12 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/STMath.cpp
r2643 r2658 388 388 cycColOut.put(i, uInt(0)); 389 389 } else { 390 ostringstream oss; 391 oss << "For output row="<<i<<", all input rows of data are flagged. no averaging" << endl; 392 pushLog(String(oss)); 390 os << "For output row="<<i<<", all input rows of data are flagged. no averaging" << LogIO::POST; 393 391 } 394 392 acc.reset(); … … 1252 1250 casa::Float tau ) 1253 1251 { 1252 LogIO os( casa::LogOrigin( "STMath", "dosigref()")); 1254 1253 if ( ! ref->conformant(*sig) ) { 1255 1254 throw(AipsError("'sig' and 'ref' scantables are not conformant.")); … … 1263 1262 smref = smooth(ref, inkernel, fsmoothref ); 1264 1263 ostringstream oss; 1265 os s<<"Applied smoothing of "<<fsmoothref<<" on the reference."<<endl;1266 pushLog(String(oss));1264 os <<"Applied smoothing of "<<fsmoothref<<" on the reference." 1265 << LogIO::POST; 1267 1266 } 1268 1267 else { … … 1309 1308 Float elev; 1310 1309 refelevCol.get(i, elev); 1311 os s<< "user specified Tsys = " << tsysv;1310 os << "user specified Tsys = " << tsysv; 1312 1311 // do recalc elevation if EL = 0 1313 1312 if ( elev == 0 ) { … … 1320 1319 } 1321 1320 } 1322 oss << ", corrected (for El) tsys= "<<tsysrefscalar; 1323 pushLog(String(oss)); 1321 os << ", corrected (for El) tsys= "<<tsysrefscalar; 1324 1322 } 1325 1323 else { … … 1357 1355 { 1358 1356 setInsitu(false); 1357 LogIO os( casa::LogOrigin( "STMath", "donod()")); 1359 1358 STSelector sel; 1360 1359 std::vector<int> scan1, scan2, beams, types; … … 1444 1443 1445 1444 msg=String("Processing dototalpower for subset of the data"); 1446 ostringstream oss1; 1447 oss1 << msg << endl; 1448 pushLog(String(oss1)); 1445 os << msg << LogIO::POST; 1449 1446 // Debug for IRC CS data 1450 1447 //float tcal1=7.0; … … 1459 1456 // dosigref calibration 1460 1457 msg=String("Processing dosigref for subset of the data"); 1461 ostringstream oss2; 1462 oss2 << msg << endl; 1463 pushLog(String(oss2)); 1458 os << msg << endl; 1464 1459 calb1=dosigref(sig1,ref2,smoothref,tsysv,tau); 1465 1460 calb2=dosigref(sig2,ref1,smoothref,tsysv,tau); … … 2161 2156 const std::string& method) 2162 2157 { 2158 LogIO os( LogOrigin( "STMath", "gainElevation", WHERE ) ) ; 2163 2159 // Get elevation data from Scantable and convert to degrees 2164 2160 CountedPtr< Scantable > out = getScantable(in, false); … … 2203 2199 throw(AipsError("There is no known gain-elevation polynomial known for this instrument")); 2204 2200 } 2205 ostringstream oss; 2206 oss << "Making polynomial correction with " << msg << " coefficients:" << endl; 2207 oss << " " << coeff; 2208 pushLog(String(oss)); 2201 os << "Making polynomial correction with " << msg << " coefficients:" << endl; 2202 os << " " << coeff << LogIO::POST; 2209 2203 const uInt nrow = tab.nrow(); 2210 2204 Vector<Float> factor(nrow); … … 2217 2211 } else { 2218 2212 // Read and correct 2219 pushLog("Making correction from ascii Table");2213 os << "Making correction from ascii Table" << LogIO::POST; 2220 2214 scaleFromAsciiTable(tab, filename, method, x, true); 2221 2215 } … … 2288 2282 float jyperk ) 2289 2283 { 2284 LogIO os( LogOrigin( "STMath", "convertFlux", WHERE ) ) ; 2285 2290 2286 CountedPtr< Scantable > out = getScantable(in, false); 2291 2287 Table& tab = in->table(); … … 2299 2295 2300 2296 if ( fluxUnit == JY ) { 2301 pushLog("Converting to K");2297 os << "Converting to K" << LogIO::POST; 2302 2298 Quantum<Double> t(1.0,fluxUnit); 2303 2299 Quantum<Double> t2 = t.get(JY); … … 2307 2303 out->setFluxUnit("K"); 2308 2304 } else if ( fluxUnit == K ) { 2309 pushLog("Converting to Jy");2305 os << "Converting to Jy" << LogIO::POST; 2310 2306 Quantum<Double> t(1.0,fluxUnit); 2311 2307 Quantum<Double> t2 = t.get(K); … … 2324 2320 factor *= jyperk; 2325 2321 if ( tokelvin ) factor = 1.0 / jyperk; 2326 ostringstream oss; 2327 oss << "Jy/K = " << jyperk; 2328 pushLog(String(oss)); 2322 os << "Jy/K = " << jyperk << LogIO::POST; 2329 2323 Vector<Float> factors(outtab.nrow(), factor); 2330 2324 scaleByVector(outtab,factors, false); … … 2338 2332 } 2339 2333 jyperk = STAttr::findJyPerK(etaap, d); 2340 ostringstream oss; 2341 oss << "Jy/K = " << jyperk; 2342 pushLog(String(oss)); 2334 os << "Jy/K = " << jyperk << LogIO::POST; 2343 2335 factor *= jyperk; 2344 2336 if ( tokelvin ) { … … 2354 2346 // change per integration. 2355 2347 2356 pushLog("Looking up conversion factors");2348 os <<"Looking up conversion factors" << LogIO::POST; 2357 2349 convertBrightnessUnits(out, tokelvin, cfac); 2358 2350 } … … 2547 2539 if ( ! (*it)->conformant(*out) ) { 2548 2540 // non conformant. 2549 //pushLog(String("Warning: Can't merge scantables as header info differs."));2550 2541 LogIO os( LogOrigin( "STMath", "merge()", WHERE ) ) ; 2551 2542 os << LogIO::SEVERE << "Can't merge scantables as header informations (any one of AntennaName, Equinox, and FluxUnit) differ." << LogIO::EXCEPTION ; … … 2746 2737 const std::string & method) 2747 2738 { 2739 LogIO os( casa::LogOrigin("STMath", "frequencyAlign()", WHERE)); 2748 2740 // clone as this is not working insitu 2749 2741 bool insitu = insitu_; … … 2784 2776 MVTime mvt(refEpoch.getValue()); 2785 2777 String epochout = mvt.string(MVTime::YMD) + String(" (") + refEpoch.getRefString() + String(")"); 2786 ostringstream oss; 2787 oss << "Aligned at reference Epoch " << epochout 2788 << " in frame " << MFrequency::showType(system); 2789 pushLog(String(oss)); 2778 os << "Aligned at reference Epoch " << epochout 2779 << " in frame " << MFrequency::showType(system) << LogIO::POST; 2790 2780 // set up the iterator 2791 2781 Block<String> cols(4);
Note: See TracChangeset
for help on using the changeset viewer.