- Timestamp:
- 08/27/13 14:52:29 (11 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/python/scantable.py
r2840 r2844 341 341 The default (True) is to import direction 342 342 from MS/POINTING. 343 344 freq_tolsr: Whether to convert frequency frame information345 to LSRK or not.346 This is effective only when filename is MS.347 The default (False) is to import frequency348 as is.349 350 343 """ 351 344 if average is None: … … 376 369 # Measurement Set 377 370 opts={'ms': {}} 378 mskeys=['getpt','antenna' ,'freq_tolsr']371 mskeys=['getpt','antenna'] 379 372 for key in mskeys: 380 373 if key in args.keys(): -
trunk/src/MSFiller.cpp
r2815 r2844 257 257 MSFillerVisitor(const Table &from, Scantable &to) 258 258 : BaseMSFillerVisitor(from), 259 scantable(to), 260 freqToLsr_(False) 259 scantable(to) 261 260 { 262 261 antennaId = 0 ; … … 715 714 sysCalTsysCol.attach( sctab, tsysCol ) ; 716 715 } 717 void setFreqToLsr(Bool b) { freqToLsr_ = b; }718 716 STHeader getHeader() { return header ; } 719 717 uInt getNumBeam() { return nbeam ; } … … 847 845 if ( even ) 848 846 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 }855 847 856 848 // add new row to FREQUENCIES … … 1321 1313 //String tsysCol; 1322 1314 //String tcalCol; 1323 Bool freqToLsr_;1324 1315 1325 1316 // MS subtables … … 1593 1584 antennaStr_(""), 1594 1585 getPt_( True ), 1595 freqToLsr_( False ),1596 1586 isFloatData_( False ), 1597 1587 isData_( False ), … … 1640 1630 antenna_ = 0 ; 1641 1631 } 1642 if ( msrec.isDefined( "freq_tolsr" ) ) {1643 freqToLsr_ = msrec.asBool( "freq_tolsr" ) ;1644 }1645 1632 } 1646 1633 … … 1663 1650 os_ << " getPt = " << (getPt_ ? "True" : "False") << endl ; 1664 1651 os_ << " antenna = " << antenna_ << endl ; 1665 os_ << " antennaStr = " << antennaStr_ << endl ; 1666 os_ << " freqToLsr = " << (freqToLsr_ ? "True" : "False") << LogIO::POST; 1652 os_ << " antennaStr = " << antennaStr_ << LogIO::POST; 1667 1653 1668 1654 mstable_ = MeasurementSet( (*tmpMS)( tmpMS->col("ANTENNA1") == antenna_ … … 1756 1742 // SUBTABLES: FREQUENCIES 1757 1743 //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 ) ; 1768 1747 1769 1748 // SUBTABLES: WEATHER … … 1811 1790 if ( isSysCal_ ) 1812 1791 myVisitor.setSysCalRecord( tcalrec_ ) ; 1813 myVisitor.setFreqToLsr( freqToLsr_ ) ;1814 1792 1815 1793 //double t2 = mathutil::gettimeofday_sec() ;
Note:
See TracChangeset
for help on using the changeset viewer.