Ignore:
Timestamp:
07/14/11 16:04:17 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-1913

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 is stored as LSRK value although original frequency is
in an arbitrary frequency frame (e.g. TOPO). Conversion is done
in filler if necessary.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/asdm2ASAP/ASDMFiller.cc

    r2225 r2227  
    6868  // set Frame for FREQUENCIES table
    6969  string sFreqFrame = reader_->getFrame() ;
    70   MFrequency::Types freqFrame = toFrameType( sFreqFrame ) ;
     70  //MFrequency::Types freqFrame = toFrameType( sFreqFrame ) ;
     71  MFrequency::Types freqFrame = MFrequency::LSRK ;
    7172  table_->frequencies().setFrame( freqFrame, false ) ;
    7273  table_->frequencies().setFrame( freqFrame, true ) ;
     
    143144        double refval = 0.0 ;
    144145        double incr = 0.0 ;
     146        string freqref = "" ;
    145147
    146148        for ( unsigned int idata = 0 ; idata < numData ; idata++ ) {
     
    151153          // IFNO
    152154          uInt ifno = reader_->getIFNo( idata ) ;
    153 
    154 
    155           // REFPIX, REFVAL, INCREMENT
    156           String ifkey = getIFKey( ifno ) ;
    157           if ( ifrec_.isDefined( ifkey ) ) {
    158             getFrequencyRec( ifkey, refpix, refval, incr ) ;
    159           }
    160           else {
    161             reader_->getFrequency( idata, refpix, refval, incr ) ;
    162             setFrequencyRec( ifkey, refpix, refval, incr ) ;
    163           }
    164 
    165           // fill FREQ_ID and add FREQUENCIES row if necessary
    166           setFrequency( (casa::Double)refpix, (casa::Double)refval, (casa::Double)incr ) ;
    167 
    168155
    169156          // rest frequency
     
    176163          setMolecule( restFreqs ) ;
    177164         
    178 
    179165          // time and interval
    180166          casa::Double mjd = (casa::Double)(reader_->getTime( idata )) ;
     
    254240          setDirection( direction, (casa::Float)az, (casa::Float)el ) ;
    255241
     242           // REFPIX, REFVAL, INCREMENT
     243          String ifkey = getIFKey( ifno ) ;
     244          if ( ifrec_.isDefined( ifkey ) ) {
     245            getFrequencyRec( ifkey, refpix, refval, incr ) ;
     246          }
     247          else {
     248            reader_->getFrequency( idata, refpix, refval, incr, freqref ) ;
     249            refval = (double)toLSRK( casa::Double(refval),
     250                                     String(freqref),
     251                                     mjd,
     252                                     antpos,
     253                                     //direction,
     254                                     srcDir,
     255                                     "J2000" ) ;
     256            setFrequencyRec( ifkey, refpix, refval, incr ) ;
     257          }
     258
     259          // fill FREQ_ID and add FREQUENCIES row if necessary
     260          setFrequency( (casa::Double)refpix, (casa::Double)refval, (casa::Double)incr ) ;
     261
    256262          // loop on polarization
    257263          vector<unsigned int> dataShape = reader_->getDataShape( idata ) ;
Note: See TracChangeset for help on using the changeset viewer.