Changeset 2217


Ignore:
Timestamp:
07/13/11 15:15:14 (13 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...

Frequency reference frame is retrieved from MS/SPECTRAL_WINDOW table.


Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MSFiller.cpp

    r2207 r2217  
    249249
    250250  // SUBTABLES: FREQUENCIES
    251   table_->frequencies().setFrame( "LSRK" ) ;
    252   table_->frequencies().setFrame( "LSRK", True ) ;
     251  string freqFrame = getFrame() ;
     252  table_->frequencies().setFrame( freqFrame ) ;
     253  table_->frequencies().setFrame( freqFrame, True ) ;
    253254
    254255  // SUBTABLES: WEATHER
     
    17371738}
    17381739
     1740string MSFiller::getFrame()
     1741{
     1742  MFrequency::Types frame = MFrequency::DEFAULT ;
     1743  ROTableColumn numChanCol( mstable_.spectralWindow(), "NUM_CHAN" ) ;
     1744  ROTableColumn measFreqRefCol( mstable_.spectralWindow(), "MEAS_FREQ_REF" ) ;
     1745  uInt nrow = numChanCol.nrow() ;
     1746  Vector<Int> measFreqRef( nrow, MFrequency::DEFAULT ) ;
     1747  uInt nref = 0 ;
     1748  for ( uInt irow = 0 ; irow < nrow ; irow++ ) {
     1749    if ( numChanCol.asInt( irow ) != 4 ) { // exclude WVR
     1750      measFreqRef[nref] = measFreqRefCol.asInt( irow ) ;
     1751      nref++ ;
     1752    }
     1753  }
     1754  if ( nref > 0 )
     1755    frame = (MFrequency::Types)measFreqRef[0] ;
     1756
     1757  return MFrequency::showType( frame ) ;
     1758}
    17391759} ;
    17401760
  • trunk/src/MSFiller.h

    r2021 r2217  
    100100  // tool for HPC
    101101  double gettimeofday_sec() ;
     102
     103  // get frequency frame
     104  std::string getFrame() ;
    102105 
    103106  casa::CountedPtr<Scantable> table_ ;
Note: See TracChangeset for help on using the changeset viewer.