Changeset 2215
- Timestamp:
- 07/12/11 15:22:48 (13 years ago)
- Location:
- trunk/external-alma/asdm2ASAP
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/asdm2ASAP/ASDMReader.cc
r2208 r2215 56 56 timeSampling_.reset() ; 57 57 corrMode_.reset() ; 58 resolutionType_.reset() ; 58 59 apc_ = AP_CORRECTED ; 59 60 … … 104 105 } 105 106 107 // spectral resolution type 108 String resolutionType = "all" ; 109 if ( asdmrec.isDefined( "srt" ) ) { 110 resolutionType = asdmrec.asString( "srt" ) ; 111 } 112 if ( resolutionType == "all" ) { 113 resolutionType_.set( FULL_RESOLUTION ) ; 114 resolutionType_.set( BASEBAND_WIDE ) ; 115 resolutionType_.set( CHANNEL_AVERAGE ) ; 116 } 117 else if ( resolutionType == "fr" ) { 118 resolutionType_.set( FULL_RESOLUTION ) ; 119 } 120 else if ( resolutionType == "bw" ) { 121 resolutionType_.set( BASEBAND_WIDE ) ; 122 } 123 else if ( resolutionType == "ca" ) { 124 resolutionType_.set( CHANNEL_AVERAGE ) ; 125 } 126 else { 127 logsink_->postLocally( LogMessage( "Unrecognized option for spectral resolution type: "+String::toString(resolutionType), LogOrigin(className_,funcName,WHERE), LogMessage::WARN ) ) ; 128 status = false ; 129 } 130 106 131 // input correlation mode 107 132 if ( asdmrec.isDefined( "corr" ) ) { … … 456 481 // selection by input CorrelationMode 457 482 EnumSet<CorrelationMode> esCorrs ; 458 // esCorrs.set( CROSS_AND_AUTO ) ;459 // esCorrs.set( AUTO_ONLY ) ;460 // esCorrs.set( corrMode_ ) ;461 // sdmBin_->select( esCorrs ) ;462 483 sdmBin_->select( corrMode_ ) ; 463 484 464 485 // selection by TimeSampling 465 486 sdmBin_->select( timeSampling_ ) ; 487 488 // selection by SpectralResolutionType 489 sdmBin_->select( resolutionType_ ) ; 466 490 467 491 // selection by AtmPhaseCorrection and output CorrelationMode -
trunk/external-alma/asdm2ASAP/ASDMReader.h
r2208 r2215 535 535 EnumSet<CorrelationModeMod::CorrelationMode> corrMode_ ; // input correlation mode 536 536 EnumSet<TimeSamplingMod::TimeSampling> timeSampling_ ; // time sampling 537 EnumSet<SpectralResolutionTypeMod::SpectralResolutionType> resolutionType_ ; // spectral resolution type 537 538 casa::CountedPtr<casa::LogSinkInterface> logsink_ ; // Logger 538 539 casa::String className_ ; -
trunk/external-alma/asdm2ASAP/asdm2ASAP.cc
r2214 r2215 23 23 Input inp ; 24 24 String indent = " " ; 25 String versionInfo = "$Id$\nConverts an ASDM dataset into Scantable.\nUsage:\n"+indent+argv[0]+" -antenna <antenna name or id> -asdm <ASDM directory> -asap <Scantable name> [-apc both|yes|no] [-corr-mode ca|ao|ca+ao] [-ocorr-mode ao] [-time-sampling all|integration|subintegration] " ;25 String versionInfo = "$Id$\nConverts an ASDM dataset into Scantable.\nUsage:\n"+indent+argv[0]+" -antenna <antenna name or id> -asdm <ASDM directory> -asap <Scantable name> [-apc both|yes|no] [-corr-mode ca|ao|ca+ao] [-ocorr-mode ao] [-time-sampling all|integration|subintegration] [-srt fr|bw|ca|all]" ; 26 26 Bool helpMode = False ; 27 27 for ( int i = 1 ; i < argc ; i++ ) { … … 47 47 inp.create( "ocorr-mode", "ao", "Output correlator mode: ao", "String" ) ; 48 48 inp.create( "time-sampling", "all", "time sampling mode: all|integration|subintegration", "String" ) ; 49 inp.create( "srt", "all", "spectral resolution mode: all|fr(full resolution)|ca(channel average)|bw(baseband wide)", "String" ) ; 49 50 inp.create( "logfile", "", "logger output", "String" ) ; 50 51 inp.readArguments( argc, argv ) ; … … 57 58 string corrMode = inp.getString( "corr-mode" ) ; 58 59 string timeSampling = inp.getString( "time-sampling" ) ; 60 string resolutionType = inp.getString( "srt" ) ; 59 61 string logfile = inp.getString( "logfile" ) ; 60 62 … … 109 111 asdmRec.define( "corr", corrMode ) ; 110 112 asdmRec.define( "sampling", timeSampling ) ; 113 asdmRec.define( "srt", resolutionType ) ; 111 114 if ( reg.match( antenna.c_str(), antenna.size() ) != String::npos ) { 112 115 // antenna is specifiec as id
Note:
See TracChangeset
for help on using the changeset viewer.