Changeset 2761 for trunk/src


Ignore:
Timestamp:
02/06/13 13:13:20 (12 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: No

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Added new option, freqref, to NRO filler. Posible values are:
1) 'rest' to import frequency in REST frame, which results in an exactly
same frequency label as NEWSTAR, and 2) 'vref' to import frequency
in the frame that source velocity refers, which results in the same
velocity label as NEWSTAR. The option must be given to scantable
constructor.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/NROFiller.cpp

    r2289 r2761  
    2323#include <casa/Quanta/MVTime.h>
    2424#include <atnf/PKSIO/SrcType.h>
     25#include <casa/Logging/LogIO.h>
    2526
    2627using namespace casa;
     
    3839}
    3940
    40   bool NROFiller::open(const std::string& filename, const Record& rec)
     41bool NROFiller::open(const std::string& filename, const Record& rec)
    4142{
    4243  bool status = true ;
     44
     45  // Parse options
     46  String freqref = "DEFAULT (REST)" ;
     47  if ( rec.isDefined( "nro" ) ) {
     48    Record nrorec = rec.asRecord( "nro" ) ;
     49    if ( nrorec.isDefined( "freqref" ) ) {
     50      freqref = nrorec.asString( "freqref" ) ;
     51      freqref.upcase() ;
     52    }
     53    LogIO os( LogOrigin( "NROFiller", "open", WHERE ) ) ;
     54    os << "Parsing NRO options" << endl ;
     55    os << "   freqref = " << freqref << LogIO::POST ;
     56  }
    4357
    4458  // get appropriate reader object
     
    4963    return status ;
    5064  } 
     65
     66  // Apply options
     67  if ( freqref == "REST" ) {
     68    reader_->setFreqRefFromVREF( false ) ;
     69  }
     70  else if ( freqref == "VREF" ) {
     71    reader_->setFreqRefFromVREF( true ) ;
     72  }
    5173
    5274  // get header information
Note: See TracChangeset for help on using the changeset viewer.