Changes in trunk/src/PKSFiller.cpp [1916:1832]
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/PKSFiller.cpp
r1916 r1832 20 20 #include <casa/Arrays/ArrayLogical.h> 21 21 #include <casa/Utilities/Regex.h> 22 #include <casa/Utilities/DataType.h>23 22 #include <casa/Logging/LogIO.h> 24 23 25 #include <casa/Containers/Record.h>26 24 #include <measures/Measures/MDirection.h> 27 25 #include <measures/Measures/MeasConvert.h> … … 36 34 37 35 #include <time.h> 38 #include <sstream>39 36 40 37 #include "STDefs.h" … … 61 58 } 62 59 63 bool PKSFiller::open( const std::string& filename , const Record& rec)60 bool PKSFiller::open( const std::string& filename) 64 61 { 65 62 Bool haveBase, haveSpectra; … … 77 74 Vector<uInt> nchans,npols; 78 75 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"); 101 77 102 78 reader_ = getPKSreader(inName, antenna, 0, 0, format, beams, ifs, … … 170 146 Vector<Int> start(nIF_, 1); 171 147 Vector<Int> end(nIF_, 0); 148 Bool getPt = False; 172 149 reader_->select(beams, ifs, start, end, ref, True, haveXPol_[0], False, getPt); 173 150 setHeader(header); … … 286 263 Int match = pksrec.srcName.matches(rx); 287 264 std::string srcname; 288 Int srctype = Int(SrcType::NOTYPE);289 265 if (match) { 290 266 srcname = pksrec.srcName; 291 srctype = Int(SrcType::PSOFF);292 267 } else { 293 268 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 ) { 297 272 srctype = pksrec.srcType ; 298 273 }
Note:
See TracChangeset
for help on using the changeset viewer.