Ignore:
Timestamp:
10/10/12 14:53:53 (12 years ago)
Author:
Malte Marquarding
Message:

merge from trunk into release candidate

Location:
tags/asap-4.1.0
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • tags/asap-4.1.0

  • tags/asap-4.1.0/src

  • tags/asap-4.1.0/src/STMath.cpp

    r2643 r2662  
    388388      cycColOut.put(i, uInt(0));
    389389    } 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;
    393391    }
    394392    acc.reset();
     
    12521250                                          casa::Float tau )
    12531251{
     1252  LogIO os( casa::LogOrigin( "STMath", "dosigref()"));
    12541253if ( ! ref->conformant(*sig) ) {
    12551254    throw(AipsError("'sig' and 'ref' scantables are not conformant."));
     
    12631262    smref = smooth(ref, inkernel, fsmoothref );
    12641263    ostringstream oss;
    1265     oss<<"Applied smoothing of "<<fsmoothref<<" on the reference."<<endl;
    1266     pushLog(String(oss));
     1264    os <<"Applied smoothing of "<<fsmoothref<<" on the reference."
     1265       << LogIO::POST;
    12671266  }
    12681267  else {
     
    13091308        Float elev;
    13101309        refelevCol.get(i, elev);
    1311         oss << "user specified Tsys = " << tsysv;
     1310        os << "user specified Tsys = " << tsysv;
    13121311        // do recalc elevation if EL = 0
    13131312        if ( elev == 0 ) {
     
    13201319          }
    13211320        }
    1322         oss << ", corrected (for El) tsys= "<<tsysrefscalar;
    1323         pushLog(String(oss));
     1321        os << ", corrected (for El) tsys= "<<tsysrefscalar;
    13241322      }
    13251323      else {
     
    13571355{
    13581356  setInsitu(false);
     1357  LogIO os( casa::LogOrigin( "STMath", "donod()"));
    13591358  STSelector sel;
    13601359  std::vector<int> scan1, scan2, beams, types;
     
    14441443
    14451444  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;
    14491446  // Debug for IRC CS data
    14501447  //float tcal1=7.0;
     
    14591456  // dosigref calibration
    14601457  msg=String("Processing dosigref for subset of the data");
    1461   ostringstream oss2;
    1462   oss2 << msg  << endl;
    1463   pushLog(String(oss2));
     1458  os << msg  << endl;
    14641459  calb1=dosigref(sig1,ref2,smoothref,tsysv,tau);
    14651460  calb2=dosigref(sig2,ref1,smoothref,tsysv,tau);
     
    21612156                                               const std::string& method)
    21622157{
     2158  LogIO os( LogOrigin( "STMath", "gainElevation", WHERE ) ) ;
    21632159  // Get elevation data from Scantable and convert to degrees
    21642160  CountedPtr< Scantable > out = getScantable(in, false);
     
    22032199      throw(AipsError("There is no known gain-elevation polynomial known for this instrument"));
    22042200    }
    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;
    22092203    const uInt nrow = tab.nrow();
    22102204    Vector<Float> factor(nrow);
     
    22172211  } else {
    22182212    // Read and correct
    2219     pushLog("Making correction from ascii Table");
     2213    os << "Making correction from ascii Table" << LogIO::POST;
    22202214    scaleFromAsciiTable(tab, filename, method, x, true);
    22212215  }
     
    22882282                                             float jyperk )
    22892283{
     2284  LogIO os( LogOrigin( "STMath", "convertFlux", WHERE ) ) ;
     2285
    22902286  CountedPtr< Scantable > out = getScantable(in, false);
    22912287  Table& tab = in->table();
     
    22992295
    23002296  if ( fluxUnit == JY ) {
    2301     pushLog("Converting to K");
     2297    os << "Converting to K" << LogIO::POST;
    23022298    Quantum<Double> t(1.0,fluxUnit);
    23032299    Quantum<Double> t2 = t.get(JY);
     
    23072303    out->setFluxUnit("K");
    23082304  } else if ( fluxUnit == K ) {
    2309     pushLog("Converting to Jy");
     2305    os << "Converting to Jy" << LogIO::POST;
    23102306    Quantum<Double> t(1.0,fluxUnit);
    23112307    Quantum<Double> t2 = t.get(K);
     
    23242320    factor *= jyperk;
    23252321    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;
    23292323    Vector<Float> factors(outtab.nrow(), factor);
    23302324    scaleByVector(outtab,factors, false);
     
    23382332    }
    23392333    jyperk = STAttr::findJyPerK(etaap, d);
    2340     ostringstream oss;
    2341     oss << "Jy/K = " << jyperk;
    2342     pushLog(String(oss));
     2334    os << "Jy/K = " << jyperk << LogIO::POST;
    23432335    factor *= jyperk;
    23442336    if ( tokelvin ) {
     
    23542346    // change per integration.
    23552347
    2356     pushLog("Looking up conversion factors");
     2348    os <<"Looking up conversion factors" << LogIO::POST;
    23572349    convertBrightnessUnits(out, tokelvin, cfac);
    23582350  }
     
    25472539    if ( ! (*it)->conformant(*out) ) {
    25482540      // non conformant.
    2549       //pushLog(String("Warning: Can't merge scantables as header info differs."));
    25502541      LogIO os( LogOrigin( "STMath", "merge()", WHERE ) ) ;
    25512542      os << LogIO::SEVERE << "Can't merge scantables as header informations (any one of AntennaName, Equinox, and FluxUnit) differ." << LogIO::EXCEPTION ;
     
    27462737                                const std::string & method)
    27472738{
     2739  LogIO os( casa::LogOrigin("STMath", "frequencyAlign()", WHERE));
    27482740  // clone as this is not working insitu
    27492741  bool insitu = insitu_;
     
    27842776  MVTime mvt(refEpoch.getValue());
    27852777  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;
    27902780  // set up the iterator
    27912781  Block<String> cols(4);
Note: See TracChangeset for help on using the changeset viewer.