Changeset 2215


Ignore:
Timestamp:
07/12/11 15:22:48 (13 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-1913

Ready for Test: Yes

Interface Changes: No

What Interface Changed: Please list interface changes

Test Programs: List test programs

Put in Release Notes: Yes/No

Module(s): Module Names change impacts.

Description: Describe your changes here...

Added selection by spectral resolution type.


Location:
trunk/external-alma/asdm2ASAP
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/external-alma/asdm2ASAP/ASDMReader.cc

    r2208 r2215  
    5656  timeSampling_.reset() ;
    5757  corrMode_.reset() ;
     58  resolutionType_.reset() ;
    5859  apc_ = AP_CORRECTED ;
    5960
     
    104105    }     
    105106
     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   
    106131    // input correlation mode
    107132    if ( asdmrec.isDefined( "corr" ) ) {
     
    456481  // selection by input CorrelationMode
    457482  EnumSet<CorrelationMode> esCorrs ;
    458 //   esCorrs.set( CROSS_AND_AUTO ) ;
    459 //   esCorrs.set( AUTO_ONLY ) ;
    460 //   esCorrs.set( corrMode_ ) ;
    461 //   sdmBin_->select( esCorrs ) ;
    462483  sdmBin_->select( corrMode_ ) ;
    463484
    464485  // selection by TimeSampling
    465486  sdmBin_->select( timeSampling_ ) ;
     487
     488  // selection by SpectralResolutionType
     489  sdmBin_->select( resolutionType_ ) ;
    466490
    467491  // selection by AtmPhaseCorrection and output CorrelationMode
  • trunk/external-alma/asdm2ASAP/ASDMReader.h

    r2208 r2215  
    535535  EnumSet<CorrelationModeMod::CorrelationMode> corrMode_ ; // input correlation mode
    536536  EnumSet<TimeSamplingMod::TimeSampling> timeSampling_ ; // time sampling
     537  EnumSet<SpectralResolutionTypeMod::SpectralResolutionType> resolutionType_ ; // spectral resolution type
    537538  casa::CountedPtr<casa::LogSinkInterface> logsink_ ; // Logger
    538539  casa::String className_ ;
  • trunk/external-alma/asdm2ASAP/asdm2ASAP.cc

    r2214 r2215  
    2323  Input inp ;
    2424  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]" ;
    2626  Bool helpMode = False ;
    2727  for ( int i = 1 ; i < argc ; i++ ) {
     
    4747  inp.create( "ocorr-mode", "ao", "Output correlator mode: ao", "String" ) ;
    4848  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" ) ;
    4950  inp.create( "logfile", "", "logger output", "String" ) ;
    5051  inp.readArguments( argc, argv ) ;
     
    5758  string corrMode = inp.getString( "corr-mode" ) ;
    5859  string timeSampling = inp.getString( "time-sampling" ) ;
     60  string resolutionType = inp.getString( "srt" ) ;
    5961  string logfile = inp.getString( "logfile" ) ;
    6062   
     
    109111    asdmRec.define( "corr", corrMode ) ;
    110112    asdmRec.define( "sampling", timeSampling ) ;
     113    asdmRec.define( "srt", resolutionType ) ;
    111114    if ( reg.match( antenna.c_str(), antenna.size() ) != String::npos ) {
    112115      // antenna is specifiec as id
Note: See TracChangeset for help on using the changeset viewer.