Changeset 2754 for trunk/external-alma/asdm2ASAP
- Timestamp:
- 01/31/13 13:14:27 (12 years ago)
- Location:
- trunk/external-alma/asdm2ASAP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/asdm2ASAP/ASDMFiller.cc
r2710 r2754 26 26 antennaId_( -1 ), 27 27 antennaName_( "" ), 28 className_("ASDMFiller") 28 className_("ASDMFiller"), 29 freqToLsr_(False) 29 30 { 30 31 reader_ = new ASDMReader() ; … … 52 53 antennaId_ = reader_->getAntennaId() ; 53 54 antennaName_ = reader_->getAntennaName() ; 55 56 if (rec.isDefined("asdm")) { 57 Record asdmrec = rec.asRecord("asdm") ; 58 if (asdmrec.isDefined("freq_tolsr")) { 59 freqToLsr_ = asdmrec.asBool("freq_tolsr"); 60 } 61 } 62 logsink_->postLocally(LogMessage("freqToLsr_ = "+String(freqToLsr_?"True":"False"), LogOrigin(className_, funcName, WHERE))); 54 63 55 64 //logsink_->postLocally( LogMessage("antennaId_ = "+String::toString(antennaId_),LogOrigin(className_,funcName,WHERE)) ) ; … … 72 81 MFrequency::Types freqFrame = MFrequency::LSRK ; 73 82 table_->frequencies().setFrame( freqFrame, false ) ; 74 table_->frequencies().setFrame( freqFrame, true ) ; 83 if ( freqToLsr_ ) { 84 table_->frequencies().setFrame( freqFrame, true ) ; 85 } 86 else { 87 string baseFrame = reader_->getFrame() ; 88 table_->frequencies().setFrame( baseFrame, true ) ; 89 } 75 90 //logsink_->postLocally( LogMessage("sFreqFrame = "+sFreqFrame,LogOrigin(className_,funcName,WHERE)) ) ; 76 91 … … 615 630 //logsink_->postLocally( LogMessage("freqref = "+freqref,LogOrigin(className_,funcName,WHERE)) ) ; 616 631 casa::Double newf = freq ; 617 if ( freq ref != "LSRK" ) {632 if ( freqToLsr_ && freqref != "LSRK" ) { 618 633 MEpoch me( Quantum<casa::Double>( utc, Unit("d") ), MEpoch::UTC ) ; 619 634 Vector< Quantum<casa::Double> > antposQ( 3 ) ; -
trunk/external-alma/asdm2ASAP/ASDMFiller.h
r2225 r2754 102 102 103 103 casa::String className_ ; 104 casa::Bool freqToLsr_ ; 104 105 105 106 } ; -
trunk/external-alma/asdm2ASAP/asdm2ASAP.cc
r2273 r2754 49 49 inp.create( "srt", "all", "spectral resolution mode: all|fr(full resolution)|ca(channel average)|bw(baseband wide)|fr+ca|fr+bw|ca+bw", "String" ) ; 50 50 inp.create( "logfile", "", "logger output", "String" ) ; 51 inp.create( "freq-tolsr", "False", "Convert frequency frame to LSRK or not: True|False", "Bool" ) ; 51 52 inp.readArguments( argc, argv ) ; 52 53 … … 60 61 string resolutionType = inp.getString( "srt" ) ; 61 62 string logfile = inp.getString( "logfile" ) ; 63 Bool freqToLsr = inp.getBool( "freq-tolsr" ) ; 62 64 63 65 int numApc = 1 ; … … 112 114 asdmRec.define( "sampling", timeSampling ) ; 113 115 asdmRec.define( "srt", resolutionType ) ; 116 asdmRec.define( "freq_tolsr", freqToLsr ) ; 114 117 if ( reg.match( antenna.c_str(), antenna.size() ) != String::npos ) { 115 118 // antenna is specifiec as id
Note:
See TracChangeset
for help on using the changeset viewer.