Changeset 2218
- Timestamp:
- 07/13/11 15:23:29 (13 years ago)
- Location:
- trunk/external-alma/asdm2ASAP
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/asdm2ASAP/ASDMFiller.cc
r2208 r2218 63 63 // header 64 64 fillHeader() ; 65 66 // set Frame for FREQUENCIES table 67 string sFreqFrame = reader_->getFrame() ; 68 MFrequency::Types freqFrame = toFrameType( sFreqFrame ) ; 69 table_->frequencies().setFrame( freqFrame, false ) ; 70 table_->frequencies().setFrame( freqFrame, true ) ; 65 71 66 72 Vector<casa::Double> antpos = table_->getHeader().antennaposition ; … … 506 512 } 507 513 514 MFrequency::Types ASDMFiller::toFrameType( string &s ) 515 { 516 MFrequency::Types ftype = MFrequency::DEFAULT ; 517 if ( s == "LABREST" ) 518 ftype = MFrequency::REST ; 519 else { 520 Bool b = MFrequency::getType( ftype, String(s) ) ; 521 if (!b) 522 ftype = MFrequency::DEFAULT ; 523 } 524 return ftype ; 525 } -
trunk/external-alma/asdm2ASAP/ASDMFiller.h
r2208 r2218 74 74 casa::Vector<casa::Double> antpos ) ; 75 75 76 // get frequency frame enum value from string 77 casa::MFrequency::Types toFrameType( std::string &s ) ; 78 76 79 casa::CountedPtr<ASDMReader> reader_ ; 77 80 casa::Int antennaId_ ; -
trunk/external-alma/asdm2ASAP/ASDMReader.cc
r2216 r2218 1649 1649 logsink_ = logsink ; 1650 1650 } 1651 1652 string ASDMReader::getFrame() 1653 { 1654 String funcName = "getFrame" ; 1655 1656 // default is TOPO 1657 string frame = "TOPO" ; 1658 1659 SpectralWindowTable &spwtab = asdm_->getSpectralWindow() ; 1660 vector<SpectralWindowRow *> rows = spwtab.get() ; 1661 vector<FrequencyReferenceCode> measFreqRef( rows.size() ) ; 1662 int nref = 0 ; 1663 for ( unsigned int irow = 0 ; irow < rows.size() ; irow++ ) { 1664 int nchan = rows[irow]->getNumChan() ; 1665 if ( nchan != 4 ) { 1666 if ( rows[irow]->isMeasFreqRefExists() ) { 1667 measFreqRef[nref] = rows[irow]->getMeasFreqRef() ; 1668 nref++ ; 1669 } 1670 } 1671 } 1672 if ( nref != 0 ) { 1673 frame = CFrequencyReferenceCode::toString( measFreqRef[0] ) ; 1674 } 1675 1676 logsink_->postLocally( LogMessage("frame = "+String::toString(frame),LogOrigin(className_,funcName,WHERE)) ) ; 1677 1678 return frame ; 1679 } -
trunk/external-alma/asdm2ASAP/ASDMReader.h
r2215 r2218 392 392 **/ 393 393 unsigned int getNumData() { return numData_ ; } ; 394 395 /** 396 * get frequency frame 397 * 398 * @return string representating frequency frame 399 **/ 400 std::string getFrame() ; 394 401 395 402 /**
Note:
See TracChangeset
for help on using the changeset viewer.