Changeset 2216 for trunk/external-alma/asdm2ASAP
- Timestamp:
- 07/12/11 16:06:18 (13 years ago)
- Location:
- trunk/external-alma/asdm2ASAP
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/external-alma/asdm2ASAP/ASDMReader.cc
r2215 r2216 106 106 107 107 // spectral resolution type 108 String resolutionType = "all" ;108 string resolutionType = "all" ; 109 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 { 110 resolutionType = string( asdmrec.asString( "srt" ) ) ; 111 } 112 string resolutionTypes[3] ; 113 Int numType = split( resolutionType, resolutionTypes, 3, "," ) ; 114 for ( Int it = 0 ; it < numType ; it++ ) { 115 if ( resolutionTypes[it] == "all" ) { 116 resolutionType_.reset() ; 117 resolutionType_.set( FULL_RESOLUTION ) ; 118 resolutionType_.set( BASEBAND_WIDE ) ; 119 resolutionType_.set( CHANNEL_AVERAGE ) ; 120 break ; 121 } 122 else if ( resolutionTypes[it] == "fr" ) { 123 resolutionType_.set( FULL_RESOLUTION ) ; 124 } 125 else if ( resolutionTypes[it] == "bw" ) { 126 resolutionType_.set( BASEBAND_WIDE ) ; 127 } 128 else if ( resolutionTypes[it] == "ca" ) { 129 resolutionType_.set( CHANNEL_AVERAGE ) ; 130 } 131 } 132 if ( resolutionType_.size() == 0 ) { 127 133 logsink_->postLocally( LogMessage( "Unrecognized option for spectral resolution type: "+String::toString(resolutionType), LogOrigin(className_,funcName,WHERE), LogMessage::WARN ) ) ; 128 134 status = false ; … … 130 136 131 137 // input correlation mode 138 string corrMode = "ao+ca" ; 132 139 if ( asdmrec.isDefined( "corr" ) ) { 133 stringcorrMode = string( asdmrec.asString( "corr" ) ) ;140 corrMode = string( asdmrec.asString( "corr" ) ) ; 134 141 //logsink_->postLocally( LogMessage("corrMode = "+String(corrMode),LogOrigin(className_,funcName,WHERE)) ) ; 135 string corrModes[3] ; 136 Int numCorr = split( corrMode, corrModes, 3, "+" ) ; 137 for ( Int ic = 0 ; ic < numCorr ; ic++ ) { 138 if ( corrModes[ic] == "ao" ) { 139 corrMode_.set( AUTO_ONLY ) ; 140 } 141 else if ( corrModes[ic] == "ca" ) { 142 corrMode_.set( CROSS_AND_AUTO ) ; 143 } 144 } 145 //delete corrModes ; 146 if ( corrMode_.size() == 0 ) { 147 logsink_->postLocally( LogMessage( "Invalid option for correlation mode: "+String::toString(corrMode), LogOrigin(className_,funcName,WHERE), LogMessage::WARN ) ) ; 148 status = false ; 149 } 142 } 143 string corrModes[3] ; 144 Int numCorr = split( corrMode, corrModes, 3, "," ) ; 145 for ( Int ic = 0 ; ic < numCorr ; ic++ ) { 146 if ( corrModes[ic] == "ao" ) { 147 corrMode_.set( AUTO_ONLY ) ; 148 } 149 else if ( corrModes[ic] == "ca" ) { 150 corrMode_.set( CROSS_AND_AUTO ) ; 151 } 152 } 153 if ( corrMode_.size() == 0 ) { 154 logsink_->postLocally( LogMessage( "Invalid option for correlation mode: "+String::toString(corrMode), LogOrigin(className_,funcName,WHERE), LogMessage::WARN ) ) ; 155 status = false ; 150 156 } 151 157 -
trunk/external-alma/asdm2ASAP/asdm2ASAP.cc
r2215 r2216 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] [-srt fr|bw|ca|all]" ;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|fr,bw|fr,ca|ca,bw|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 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 51 inp.readArguments( argc, argv ) ;
Note:
See TracChangeset
for help on using the changeset viewer.