Changeset 2662 for tags


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:
5 deleted
31 edited
1 copied

Legend:

Unmodified
Added
Removed
  • tags/asap-4.1.0

  • tags/asap-4.1.0/CHANGELOG

    r2531 r2662  
    22=========
    33
    4 Release 4.1.0 [2012-17-05]
     4Release 4.1.0 [2012-10-10]
    55
    66* reworked build system to work as 'normal' python package
     
    88* experimental merging of IFs
    99* speed ups
    10 * move to ipython>=0.11
     10* work with to ipython>=0.11
    1111* Ticket #269 fixed regression of reference scan detection for Hobart data
    12 * work under OS X 10.7 
     12* work under OS X 10.7/10.8
    1313* fixed logging control through rcParams
    1414* fix for frequency_alignment
    1515* Ticket #264 silence skydip.
    1616* Ticket #265 fix summary for multiple IF chains
     17* Ticket #280 fix SDFITS frequency frame output
    1718
    1819Release 4.0.0 [2011-10-05]
  • tags/asap-4.1.0/Makefile

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/asap-4.1.0/SConstruct

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/asap-4.1.0/apps

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/asap-4.1.0/external-alma

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/asap-4.1.0/external-alma/atnf/pks/pks_maths.cc

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/asap-4.1.0/getsvnrev.sh

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/asap-4.1.0/python

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/asap-4.1.0/python/__init__.py

    r2649 r2662  
    5959
    6060__date__ = '$Date$'.split()[1]
    61 __version__  = 'trunk'
     61__version__  = '4.1.0'
    6262__revision__ = get_revision()
    6363
  • tags/asap-4.1.0/src

  • tags/asap-4.1.0/src/FillerWrapper.h

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/asap-4.1.0/src/SConscript

    • Property svn:mergeinfo changed (with no actual effect on merging)
  • tags/asap-4.1.0/src/STAsciiWriter.cpp

    r2335 r2662  
    4444#include <casa/sstream.h>
    4545#include <casa/iomanip.h>
     46#include <casa/Logging/LogIO.h>
    4647
    4748#include <measures/Measures/MEpoch.h>
     
    176177    }
    177178    of.close();
    178     ostringstream oss;
    179     oss << "Wrote " << fName;
    180     pushLog(String(oss));
     179    LogIO os( LogOrigin( "STAsciiWriter") ) ;   
     180    os << "Wrote " << fName << LogIO::POST;
    181181    ++iter;
    182182  }
  • tags/asap-4.1.0/src/STAsciiWriter.h

    r1106 r2662  
    3737
    3838#include "Scantable.h"
    39 #include "Logger.h"
     39
    4040
    4141namespace casa {
     
    4848 * A class to export a Scnatble to ASCII file(s)
    4949 */
    50 class STAsciiWriter : public Logger {
     50class STAsciiWriter {
    5151public:
    5252// Constructor
  • tags/asap-4.1.0/src/STAttr.cpp

    r2163 r2662  
    3737#include <casa/Quanta/Quantum.h>
    3838#include <casa/Quanta/MVTime.h>
     39#include <casa/Logging/LogIO.h>
    3940
    4041#include <measures/Measures/MEpoch.h>
     
    5253}
    5354
    54 STAttr::STAttr(const STAttr& other):
    55   Logger()
     55STAttr::STAttr(const STAttr& other)
    5656{
    5757  (void) other; //suppress unused warning
     
    123123                                      const Vector<Float>& freqs) const
    124124{
    125 
    126   // Look at date where appropriate
     125   casa::LogIO os( casa::LogOrigin( "STAttr", "beamEfficiency()" ) );
     126   // Look at date where appropriate
    127127   MVTime t(dateObs.getValue());
    128128   uInt year = t.year();
     
    133133        {
    134134          if (year<2003) {
    135             pushLog("There is no beam efficiency data from before 2003"
    136                     " - using 2003 data");
     135            os << "There is no beam efficiency data from before 2003"
     136               <<" - using 2003 data" << casa::LogIO::POST;
    137137            facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2003Y_);
    138138          } else if (year==2003) {
    139             pushLog("Using beam efficiency data from 2003");
     139            os << "Using beam efficiency data from 2003" << casa::LogIO::POST;
    140140            facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2003Y_);
    141141          } else {
    142             pushLog("Using beam efficiency data from 2004");
     142            os << "Using beam efficiency data from 2004" << casa::LogIO::POST;
    143143            facs = interp(freqs/1.0e9f, MopEtaBeamX_, MopEtaBeam2004Y_);
    144144          }
     
    147147   default:
    148148     {
    149        pushLog("No beam efficiency data for this instrument - assuming unity");
     149       os << "No beam efficiency data for this instrument - assuming unity"
     150          << casa::LogIO::POST;
    150151     }
    151152   }
     
    157158                                         const Vector<Float>& freqs) const
    158159{
    159 
     160   casa::LogIO os( casa::LogOrigin( "STAttr", "apertureEfficiency()" ) );
    160161  // Look at date where appropriate
    161162  MVTime t(dateObs.getValue());
     
    167168    {
    168169      if (year<2004) {
    169         pushLog("There is no aperture efficiency data from before 2004"
    170                 " - using 2004 data");
     170        os << "There is no aperture efficiency data from before 2004"
     171           << " - using 2004 data" << casa::LogIO::POST;
    171172        facs = interp(freqs/1.0e9f, MopEtaApX_, MopEtaAp2004Y_);
    172173      } else {
    173         pushLog("Using aperture efficiency data from 2004");
     174        os << "Using aperture efficiency data from 2004" << casa::LogIO::POST;
    174175        facs = interp(freqs/1.0e9f, MopEtaApX_, MopEtaAp2004Y_);
    175176      }
     
    183184  default:
    184185    {
    185       pushLog("No aperture efficiency data for this instrument"
    186               " - assuming unity");
     186      os << "No aperture efficiency data for this instrument"
     187         <<  " - assuming unity" << casa::LogIO::POST;
    187188    }
    188189  }
  • tags/asap-4.1.0/src/STAttr.h

    r1346 r2662  
    3838#include <casa/Utilities/CountedPtr.h>
    3939
    40 #include "Logger.h"
    4140#include "STDefs.h"
    4241
     
    4746namespace asap {
    4847
    49 class STAttr : public Logger {
     48class STAttr {
    5049
    5150 public:
  • tags/asap-4.1.0/src/STFITSImageWriter.cpp

    r1823 r2662  
    3030//#---------------------------------------------------------------------------
    3131
     32
    3233#include <fitsio.h>
    33 #include <images/Images/TempImage.h>
     34#include <casa/Containers/RecordField.h>
     35#include <casa/Logging/LogIO.h>
    3436
    3537#include <lattices/Lattices/ArrayLattice.h>
     
    4143#include <tables/Tables/TableIter.h>
    4244#include <tables/Tables/TableRecord.h>
    43 #include <casa/Containers/RecordField.h>
     45
    4446#include <tables/Tables/TableRow.h>
    4547#include <tables/Tables/ScalarColumn.h>
     
    271273    }
    272274    fits_close_file(fptr, &status);
    273     ostringstream oss;
    274     oss << "Wrote " << fileName;
    275     pushLog(String(oss)); 
    276     //pushLog(String(oss));
     275   
     276    LogIO os( casa::LogOrigin("STFITSImageWriter"));
     277    os << "Wrote " << fileName << LogIO::POST;
    277278    ++iter;
    278279  }
  • tags/asap-4.1.0/src/STFITSImageWriter.h

    r1823 r2662  
    3333
    3434#include <casa/aips.h>
    35 #include <casa/BasicSL/String.h>
    36 #include <casa/ostream.h>
    3735
    3836#include <coordinates/Coordinates/DirectionCoordinate.h>
    39 #include "Scantable.h"
    40 #include "Logger.h"
     37
     38//#include "Scantable.h"
     39
     40namespace casa {
     41  class String;
     42}
    4143
    4244namespace asap {
     45
     46class Scantable;
     47
     48
    4349/**
    4450 * A class to export a Scantable to FITS file(s)
    4551 */
    46 class STFITSImageWriter : public Logger {
     52class STFITSImageWriter {
    4753public:
    4854// Constructor
  • tags/asap-4.1.0/src/STFiller.cpp

    r2289 r2662  
    3636#include <atnf/PKSIO/NROReader.h>
    3737#include <casa/Logging/LogIO.h>
     38#include <fits/FITS/FITSSpectralUtil.h>
    3839
    3940#include <time.h>
     
    137138  // Get basic parameters.
    138139  if ( anyEQ(haveXPol_, True) ) {
    139     pushLog("Cross polarization present");
    140140    for (uInt i=0; i< npols.nelements();++i) {
    141141      if (npols[i] < 3) npols[i] += 2;// Convert Complex -> 2 Floats
     
    164164    throw(AipsError("Failed to get header."));
    165165  }
     166  LogIO os( casa::LogOrigin( "STFiller") );
     167 
    166168  if ((header_->obstype).matches("*SW*")) {
    167169    // need robust way here - probably read ahead of next timestamp
    168     pushLog("Header indicates frequency switched observation.\n"
    169                "setting # of IFs = 1 ");
     170    os << "Header indicates frequency switched observation.\n"
     171       << "setting # of IFs = 1 " << LogIO::POST;
    170172    nIF_ = 1;
    171173    header_->obstype = String("fswitch");
     
    226228  Vector<Int> start(nIF_, 1);
    227229  Vector<Int> end(nIF_, 0);
    228   reader_->select(beams, ifs, start, end, ref, True, haveXPol_[0], False, getPt);
     230  reader_->select(beams, ifs, start, end, ref, True, haveXPol_[0], False,
     231                  getPt);
    229232  table_->setHeader(*header_);
    230233  //For MS, add the location of POINTING of the input MS so one get
     
    249252  //MS style (as PKSMS2reader converts the original frame
    250253  //in FITS standard style)
    251   if (freqFrame == "TOPOCENT") {
    252     freqFrame = "TOPO";
    253   } else if (freqFrame == "GEOCENER") {
    254     freqFrame = "GEO";
    255   } else if (freqFrame == "BARYCENT") {
    256     freqFrame = "BARY";
    257   } else if (freqFrame == "GALACTOC") {
    258     freqFrame = "GALACTO";
    259   } else if (freqFrame == "LOCALGRP") {
    260     freqFrame = "LGROUP";
    261   } else if (freqFrame == "CMBDIPOL") {
    262     freqFrame = "CMB";
    263   } else if (freqFrame == "SOURCE") {
    264     freqFrame = "REST";
    265   }
     254  MFrequency::Types fframe;
     255  FITSSpectralUtil::frameFromSpecsys(fframe, freqFrame);
    266256  // set both "FRAME" and "BASEFRAME"
    267   table_->frequencies().setFrame(freqFrame, false);
    268   table_->frequencies().setFrame(freqFrame,true);
     257  table_->frequencies().setFrame(fframe, false);
     258  table_->frequencies().setFrame(fframe,true);
     259 
    269260  //table_->focus().setParallactify(true);
    270261}
  • tags/asap-4.1.0/src/STFiller.h

    r1819 r2662  
    2424#include "Scantable.h"
    2525#include "STHeader.h"
    26 #include "Logger.h"
     26
    2727
    2828class PKSreader;
     
    3939@version  2.0a
    4040*/
    41 class STFiller : public Logger {
     41class STFiller {
    4242public:
    4343
  • tags/asap-4.1.0/src/STFrequencies.cpp

    r2243 r2662  
    1515#include <casa/Containers/RecordField.h>
    1616#include <casa/Arrays/IPosition.h>
     17#include <casa/Logging/LogIO.h>
    1718
    1819#include <tables/Tables/TableDesc.h>
     
    264265  if (!MFrequency::getType(mft, rf)) {
    265266    ostringstream oss;
    266     pushLog("WARNING: Frequency type unknown assuming TOPO");
     267    LogIO os( casa::LogOrigin( "STFrequencies", "getFrame") );
     268    os << LogIO::WARN << "WARNING: Frequency type unknown assuming TOPO"
     269       << LogIO::POST;
    267270    mft = MFrequency::TOPO;
    268271  }
  • 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);
  • tags/asap-4.1.0/src/STMath.h

    r2580 r2662  
    2323#include <scimath/Mathematics/InterpolateArray1D.h>
    2424
    25 #include "Logger.h"
    2625#include "Scantable.h"
    2726#include "STDefs.h"
     
    3433        * @author Malte Marquarding
    3534*/
    36 class STMath : private Logger {
     35class STMath {
    3736public:
    3837        // typedef for long method name
  • tags/asap-4.1.0/src/STSubTable.h

    r894 r2662  
    1616#include <tables/Tables/ScalarColumn.h>
    1717
    18 #include "Logger.h"
     18
    1919
    2020namespace asap {
     
    2828@version $Revision:$
    2929*/
    30 class STSubTable : public Logger {
     30class STSubTable {
    3131public:
    3232  STSubTable() {;}
  • tags/asap-4.1.0/src/STWriter.cpp

    r2652 r2662  
    3838#include <casa/Utilities/CountedPtr.h>
    3939#include <casa/Utilities/Assert.h>
     40#include <casa/Logging/LogIO.h>
    4041
    4142#include <atnf/PKSIO/PKSrecord.h>
    42 #ifndef NOPKSMS
    43 #include <atnf/PKSIO/PKSMS2writer.h>
    44 #endif
    4543#include <atnf/PKSIO/PKSSDwriter.h>
    4644#include <atnf/PKSIO/SrcType.h>
     
    5149#include <tables/Tables/ArrayColumn.h>
    5250
     51#include <fits/FITS/FITSSpectralUtil.h>
     52
    5353#include "STFITSImageWriter.h"
    5454#include "STAsciiWriter.h"
     
    6868  t.upcase();
    6969  if (t == "MS2") {
    70     #ifdef NOPKSMS
    7170    throw (AipsError("MS2 OUTPUT FORMAT IS NO LONGER SUPPORTED"));
    72     #else
    73     writer_ = new PKSMS2writer();
    74     #endif
    7571  } else if (t == "SDFITS") {
    7672    writer_ = new PKSSDwriter();
     
    9995  t.upcase();
    10096  if (t== "MS2") {
    101     #ifdef NOPKSMS
    10297    throw (AipsError("MS2 OUTPUT FORMAT IS NO LONGER SUPPORTED"));
    103     #else
    104     writer_ = new PKSMS2writer();
    105     #endif
    10698  } else if (t== "SDFITS") {
    10799    writer_ = new PKSSDwriter();
     
    121113  // in asap on-the-fly.
    122114
     115  String freqframe;
     116  FITSSpectralUtil::specsysFromFrame(freqframe,
     117                                     in->frequencies().getFrame(true));
    123118  CountedPtr<Scantable> inst = in;
    124119  if (in->frequencies().getFrame(true) != in->frequencies().getFrame(false)) {
     120    FITSSpectralUtil::specsysFromFrame(freqframe,
     121                                     in->frequencies().getFrame(false));
     122 
    125123    STMath stm(false);
    126124    inst = stm.frequencyAlign(in);
     
    151149  // before. Need to check with the Offline User Test data
    152150  STHeader hdr = inst->getHeader();
    153   //const Int nPol  = hdr.npol;
    154   //const Int nChan = hdr.nchan;
    155151  std::vector<uint> ifs = inst->getIFNos();
    156152  int nIF = inst->nif();//ifs.size();
     
    177173  // Create the output file and write static data.
    178174  Int status;
    179 //   status = writer_->create(String(filename), hdr.observer, hdr.project,
    180 //                            hdr.antennaname, hdr.antennaposition,
    181 //                            hdr.obstype, hdr.fluxunit,
    182 //                            hdr.equinox, hdr.freqref,
    183 //                            nChan, nPol, havexpol, False);
    184175  status = writer_->create(String(filename), hdr.observer, hdr.project,
    185176                           inst->getAntennaName(), hdr.antennaposition,
    186177                           hdr.obstype, hdr.fluxunit,
    187                            hdr.equinox, hdr.freqref,
     178                           hdr.equinox, freqframe,
    188179                           nChan, nPol, havexpol, False);
    189180  if ( status ) {
     
    331322    ++scanit;
    332323  }
    333   ostringstream oss;
    334   oss << "STWriter: wrote " << count << " rows to " << filename;
    335   pushLog(String(oss));
    336  
     324  LogIO os( casa::LogOrigin("STWriter"));
     325  os << "STWriter: wrote " << count << " rows to " << filename
     326     << casa::LogIO::POST;
     327
    337328  writer_->close();
    338   //if MS2 delete POINTING table exists and copy the one in the keyword
    339   if ( format_ == "MS2" ) {
    340     replacePtTab(table, filename);
    341   }
     329
    342330  return 0;
    343331}
     
    390378}
    391379
    392 // For writing MS data, if there is the reference to
    393 // original pointing table it replace it by it.
    394 void STWriter::replacePtTab (const Table& tab, const std::string& fname)
    395 {
    396   String oldPtTabName = fname;
    397   oldPtTabName.append("/POINTING");
    398   if ( tab.keywordSet().isDefined("POINTING") ) {
    399     String PointingTab = tab.keywordSet().asString("POINTING");
    400     if ( Table::isReadable(PointingTab) ) {
    401       Table newPtTab(PointingTab, Table::Old);
    402       newPtTab.copy(oldPtTabName, Table::New);
    403       ostringstream oss;
    404       oss << "STWriter: copied  " <<PointingTab  << " to " << fname;
    405       pushLog(String(oss));
    406     }
    407   }
    408 }
    409380
    410381// get obsType string from SRCTYPE value
  • tags/asap-4.1.0/src/STWriter.h

    r2163 r2662  
    3838#include <casa/BasicSL/String.h>
    3939
    40 #include "Logger.h"
    4140#include "Scantable.h"
    4241
     
    5352  * @version 2.0a
    5453*/
    55 class STWriter : public Logger {
     54class STWriter {
    5655public:
    5756  explicit STWriter(const string &format = "SDFITS");
     
    8281                      const casa::Table& tab);
    8382
    84   void replacePtTab(const casa::Table& tab, const std::string& fname);
    85 
    8683  casa::String getObsTypes( casa::Int srctype ) ;
    8784
  • tags/asap-4.1.0/src/Scantable.cpp

    r2645 r2662  
    2020#include <casa/OS/File.h>
    2121#include <casa/OS/Path.h>
     22#include <casa/Logging/LogIO.h>
    2223#include <casa/Arrays/Array.h>
    2324#include <casa/Arrays/ArrayAccessor.h>
     
    168169*/
    169170
    170 Scantable::Scantable( const Scantable& other, bool clear ):
    171   Logger()
     171Scantable::Scantable( const Scantable& other, bool clear )
    172172{
    173173  // with or without data
     
    726726
    727727void Scantable::calculateAZEL()
    728 {
     728
     729  LogIO os( LogOrigin( "Scantable", "calculateAZEL()", WHERE ) ) ;
    729730  MPosition mp = getAntennaPosition();
    730731  MEpoch::ROScalarColumn timeCol(table_, "TIME");
    731732  ostringstream oss;
    732   oss << "Computed azimuth/elevation using " << endl
    733       << mp << endl;
     733  oss << mp;
     734  os << "Computed azimuth/elevation using " << endl
     735     << String(oss) << endl;
    734736  for (Int i=0; i<nrow(); ++i) {
    735737    MEpoch me = timeCol(i);
    736738    MDirection md = getDirection(i);
    737     oss  << " Time: " << formatTime(me,False) << " Direction: " << formatDirection(md)
     739    os  << " Time: " << formatTime(me,False)
     740        << " Direction: " << formatDirection(md)
    738741         << endl << "     => ";
    739742    MeasFrame frame(mp, me);
     
    744747    azCol_.put(i,Float(azel[0]));
    745748    elCol_.put(i,Float(azel[1]));
    746     oss << "azel: " << azel[0]/C::pi*180.0 << " "
    747         << azel[1]/C::pi*180.0 << " (deg)" << endl;
    748   }
    749   pushLog(String(oss));
     749    os << "azel: " << azel[0]/C::pi*180.0 << " "
     750       << azel[1]/C::pi*180.0 << " (deg)" << LogIO::POST;
     751  }
    750752}
    751753
     
    885887                                           const std::string& poltype ) const
    886888{
     889  LogIO os( LogOrigin( "Scantable", "getSpectrum()", WHERE ) ) ;
     890
    887891  String ptype = poltype;
    888892  if (poltype == "" ) ptype = getPolType();
     
    907911  }
    908912  if ( arr.nelements() == 0 )
    909     pushLog("Not enough polarisations present to do the conversion.");
     913   
     914    os << "Not enough polarisations present to do the conversion."
     915       << LogIO::POST;
    910916  arr.tovector(out);
    911917  return out;
  • tags/asap-4.1.0/src/Scantable.h

    r2645 r2662  
    3939#include <tables/Tables/Table.h>
    4040
    41 #include "Logger.h"
     41
    4242#include "MathUtils.h"
    4343#include "STFit.h"
     
    7474  * @version
    7575*/
    76 class Scantable : private Logger
     76class Scantable
    7777{
    7878
  • tags/asap-4.1.0/src/python_asap.cpp

    r2613 r2662  
    8181  asap::python::python_MSWriter();
    8282  asap::python::python_LineCatalog();
    83   asap::python::python_Logger();
    8483  asap::python::python_LogSink();
    8584  asap::python::python_STCoordinate();
  • tags/asap-4.1.0/test/test_nrofiller.py

    r1853 r2662  
    88
    99from nose.tools import *
     10from nose.plugins.skip import SkipTest
    1011
    1112def tempdir_setup():
     
    4546        assert_equal(self.st.stats('sum')[0],2183.681396484375)
    4647
     48
    4749    def test_frequency(self):
     50        raise SkipTest("Currently disabled")
    4851        rf=self.st.get_restfreqs()
    4952        assert_equal(len(rf),2)
Note: See TracChangeset for help on using the changeset viewer.