Changeset 2844 for trunk


Ignore:
Timestamp:
08/27/13 14:52:29 (11 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-5535

Ready for Test: Yes

Interface Changes: Yes

What Interface Changed: Removed freq_tolsr option from scantable constructor

Test Programs: sdsave unit test

Put in Release Notes: No

Module(s): sd

Description: Describe your changes here...

The parameter freq_tolsr is removed from scantable constructor.
It is removed from python layer as well as C++ layer.
Now the code always behaves like 'freq_tolsr=False'.

Location:
trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/python/scantable.py

    r2840 r2844  
    341341                          The default (True) is to import direction
    342342                          from MS/POINTING.
    343 
    344             freq_tolsr:   Whether to convert frequency frame information
    345                           to LSRK or not.
    346                           This is effective only when filename is MS.
    347                           The default (False) is to import frequency
    348                           as is.
    349                          
    350343        """
    351344        if average is None:
     
    376369                    # Measurement Set
    377370                    opts={'ms': {}}
    378                     mskeys=['getpt','antenna','freq_tolsr']
     371                    mskeys=['getpt','antenna']
    379372                    for key in mskeys:
    380373                        if key in args.keys():
  • trunk/src/MSFiller.cpp

    r2815 r2844  
    257257  MSFillerVisitor(const Table &from, Scantable &to)
    258258    : BaseMSFillerVisitor(from),
    259       scantable(to),
    260       freqToLsr_(False)
     259      scantable(to)
    261260  {
    262261    antennaId = 0 ;
     
    715714    sysCalTsysCol.attach( sctab, tsysCol ) ;
    716715  }
    717   void setFreqToLsr(Bool b) { freqToLsr_ = b; }
    718716  STHeader getHeader() { return header ; }
    719717  uInt getNumBeam() { return nbeam ; }
     
    847845    if ( even )
    848846      refval = 0.5 * ( refval + qa[refchan+1].getValue( "Hz" ) ) ;
    849     if ( freqToLsr_ && freqRef != MFrequency::LSRK ) {
    850       //cout << "do conversion to LSRK" << endl;
    851       MeasFrame mframe( me, mp, md ) ;
    852       MFrequency::Convert tolsr( freqRef, MFrequency::Ref( MFrequency::LSRK, mframe ) ) ;
    853       refval = tolsr( Quantum<Double>( refval, "Hz" ) ).get( "Hz" ).getValue() ;
    854     }
    855847   
    856848    // add new row to FREQUENCIES
     
    13211313  //String tsysCol;
    13221314  //String tcalCol;
    1323   Bool freqToLsr_;
    13241315
    13251316  // MS subtables
     
    15931584    antennaStr_(""),
    15941585    getPt_( True ),
    1595     freqToLsr_( False ),
    15961586    isFloatData_( False ),
    15971587    isData_( False ),
     
    16401630      antenna_ = 0 ;
    16411631    }
    1642     if ( msrec.isDefined( "freq_tolsr" ) ) {
    1643       freqToLsr_ = msrec.asBool( "freq_tolsr" ) ;
    1644     }
    16451632  }
    16461633
     
    16631650  os_ << "   getPt = " << (getPt_ ? "True" : "False") << endl ;
    16641651  os_ << "   antenna = " << antenna_ << endl ;
    1665   os_ << "   antennaStr = " << antennaStr_ << endl ;
    1666   os_ << "   freqToLsr = " << (freqToLsr_  ? "True" : "False") << LogIO::POST;
     1652  os_ << "   antennaStr = " << antennaStr_ << LogIO::POST;
    16671653
    16681654  mstable_ = MeasurementSet( (*tmpMS)( tmpMS->col("ANTENNA1") == antenna_
     
    17561742  // SUBTABLES: FREQUENCIES
    17571743  //string freqFrame = getFrame() ;
    1758   if ( freqToLsr_ ) {
    1759     string freqFrame = "LSRK" ;
    1760     table_->frequencies().setFrame( freqFrame ) ;
    1761     table_->frequencies().setFrame( freqFrame, True ) ;
    1762   }
    1763   else {
    1764     string baseFrame = frameFromSpwTable() ;
    1765     table_->frequencies().setFrame( baseFrame ) ;
    1766     table_->frequencies().setFrame( baseFrame, True ) ;
    1767   }
     1744  string baseFrame = frameFromSpwTable() ;
     1745  table_->frequencies().setFrame( baseFrame ) ;
     1746  table_->frequencies().setFrame( baseFrame, True ) ;
    17681747
    17691748  // SUBTABLES: WEATHER
     
    18111790    if ( isSysCal_ )
    18121791      myVisitor.setSysCalRecord( tcalrec_ ) ;
    1813     myVisitor.setFreqToLsr( freqToLsr_ ) ;
    18141792   
    18151793    //double t2 = mathutil::gettimeofday_sec() ;
Note: See TracChangeset for help on using the changeset viewer.