Changeset 2039


Ignore:
Timestamp:
03/14/11 20:51:04 (14 years ago)
Author:
Takeshi Nakazato
Message:

New Development: No

JIRA Issue: Yes CAS-2718

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...

Modification according to the change of OBS_MODE string created by
importasdm task.


File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/MSFiller.cpp

    r2035 r2039  
    10351035  // determine separator
    10361036  String sep = "" ;
    1037   if ( obsMode.find( ":" ) != String::npos ) {
     1037  String tmpStr = obsMode.substr( 0, obsMode.find_first_of( "," ) ) ;
     1038  os_ << "tmpStr = " << tmpStr << LogIO::POST ;
     1039  //if ( obsMode.find( ":" ) != String::npos ) {
     1040  if ( tmpStr.find( ":" ) != String::npos ) {
    10381041    sep = ":" ;
    10391042  }
    1040   else if ( obsMode.find( "." ) != String::npos ) {
     1043  //else if ( obsMode.find( "." ) != String::npos ) {
     1044  else if ( tmpStr.find( "." ) != String::npos ) {
    10411045    sep = "." ;
    10421046  }
     1047  //else if ( obsMode.find( "_" ) != String::npos ) {
     1048  else if ( tmpStr.find( "_" ) != String::npos ) {
     1049    sep = "_" ;
     1050  }
     1051  os_ << "separator = " << sep << LogIO::POST ;
    10431052
    10441053  // determine SRCTYPE
     
    10941103    // sep == "."
    10951104    //
    1096     // ALMA & EVLA case (MS via ASDM)
     1105    // ALMA & EVLA case (MS via ASDM) before3.1
    10971106    //
    10981107    // obsMode1=CALIBRATE_*
     
    11221131      if ( obsMode2 == "ON_SOURCE" ) srcType = SrcType::PSON ;
    11231132      if ( obsMode2 == "OFF_SOURCE" ) srcType = SrcType::PSOFF ;
     1133    }
     1134  }
     1135  else if ( sep == "_" ) {
     1136    // sep == "_"
     1137    //
     1138    // ALMA & EVLA case (MS via ASDM) after 3.2
     1139    //
     1140    // obsMode1=CALIBRATE_*
     1141    //    obsMode2=ON_SOURCE: PONCAL
     1142    //    obsMode2=OFF_SOURCE: POFFCAL
     1143    // obsMode1=OBSERVE_TARGET
     1144    //    obsMode2=ON_SOURCE: PON
     1145    //    obsMode2=OFF_SOURCE: POFF
     1146    string substr[2] ;
     1147    int numSubstr = split( obsMode, substr, 2, "," ) ;
     1148    os_ << "numSubstr = " << numSubstr << LogIO::POST ;
     1149    //for ( int i = 0 ; i < numSubstr ; i++ )
     1150    //os_ << "substr[" << i << "] = " << substr[i] << LogIO::POST ;
     1151    String obsType( substr[0] ) ;
     1152    //os_ << "obsType = " << obsType << LogIO::POST ;
     1153    string substr2[4] ;
     1154    int numSubstr2 = split( obsType, substr2, 4, sep ) ;
     1155    //Int epos = obsType.find_first_of( sep ) ;
     1156    //Int nextpos = obsType.find_first_of( sep, epos+1 ) ;
     1157    //String obsMode1 = obsType.substr( 0, epos ) ;
     1158    //String obsMode2 = obsType.substr( epos+1, nextpos-epos-1 ) ;
     1159    String obsMode1( substr2[0] ) ;
     1160    String obsMode2( substr2[2] ) ;
     1161    //os_ << "obsMode1 = " << obsMode1 << LogIO::POST ;
     1162    //os_ << "obsMode2 = " << obsMode2 << LogIO::POST ;
     1163    if ( obsMode1.find( "CALIBRATE" ) == 0 ) {
     1164      if ( obsMode2 == "ON" ) srcType = SrcType::PONCAL ;
     1165      if ( obsMode2 == "OFF" ) srcType = SrcType::POFFCAL ;
     1166    }
     1167    else if ( obsMode1 == "OBSERVE" ) {
     1168      if ( obsMode2 == "ON" ) srcType = SrcType::PSON ;
     1169      if ( obsMode2 == "OFF" ) srcType = SrcType::PSOFF ;
    11241170    }
    11251171  }
Note: See TracChangeset for help on using the changeset viewer.