Ignore:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/PKSFiller.cpp

    r1916 r1832  
    2020#include <casa/Arrays/ArrayLogical.h>
    2121#include <casa/Utilities/Regex.h>
    22 #include <casa/Utilities/DataType.h>
    2322#include <casa/Logging/LogIO.h>
    2423
    25 #include <casa/Containers/Record.h>
    2624#include <measures/Measures/MDirection.h>
    2725#include <measures/Measures/MeasConvert.h>
     
    3634
    3735#include <time.h>
    38 #include <sstream>
    3936
    4037#include "STDefs.h"
     
    6158}
    6259
    63 bool PKSFiller::open( const std::string& filename, const Record& rec)
     60bool PKSFiller::open( const std::string& filename)
    6461{
    6562  Bool haveBase, haveSpectra;
     
    7774  Vector<uInt> nchans,npols;
    7875
    79   String antenna("");
    80   Bool getPt = False;
    81 
    82   // parsing MS options
    83   if ( rec.isDefined( "ms" ) ) {
    84     Record msrec = rec.asRecord( "ms" ) ;
    85     //msrec.print( cout ) ;
    86     if ( msrec.isDefined( "getpt" ) ) {
    87       getPt = msrec.asBool( "getpt" ) ;
    88     }
    89     if ( msrec.isDefined( "antenna" ) ) {
    90       if ( msrec.type( msrec.fieldNumber( "antenna" ) ) == TpInt ) {
    91         Int antInt = msrec.asInt( "antenna" ) ;
    92         ostringstream oss ;
    93         oss << antInt ;
    94         antenna = String( oss ) ;
    95       }
    96       else {
    97         antenna = msrec.asString( "antenna" ) ;
    98       }
    99     }
    100   }
     76  String antenna("0");
    10177
    10278  reader_ = getPKSreader(inName, antenna, 0, 0, format, beams, ifs,
     
    170146  Vector<Int> start(nIF_, 1);
    171147  Vector<Int> end(nIF_, 0);
     148  Bool getPt = False;
    172149  reader_->select(beams, ifs, start, end, ref, True, haveXPol_[0], False, getPt);
    173150  setHeader(header);
     
    286263    Int match = pksrec.srcName.matches(rx);
    287264    std::string srcname;
    288     Int srctype = Int(SrcType::NOTYPE);
    289265    if (match) {
    290266      srcname = pksrec.srcName;
    291       srctype =  Int(SrcType::PSOFF);
    292267    } else {
    293268      srcname = pksrec.srcName.before(rx2);
    294       srctype =  Int(SrcType::PSON);
    295     }
    296     if ( pksrec.srcType != Int(SrcType::NOTYPE)) {
     269    }
     270    Int srctype = match;
     271    if ( pksrec.srcType != -1 ) {
    297272      srctype = pksrec.srcType ;
    298273    }
Note: See TracChangeset for help on using the changeset viewer.