Changeset 2039
- Timestamp:
- 03/14/11 20:51:04 (14 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/MSFiller.cpp
r2035 r2039 1035 1035 // determine separator 1036 1036 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 ) { 1038 1041 sep = ":" ; 1039 1042 } 1040 else if ( obsMode.find( "." ) != String::npos ) { 1043 //else if ( obsMode.find( "." ) != String::npos ) { 1044 else if ( tmpStr.find( "." ) != String::npos ) { 1041 1045 sep = "." ; 1042 1046 } 1047 //else if ( obsMode.find( "_" ) != String::npos ) { 1048 else if ( tmpStr.find( "_" ) != String::npos ) { 1049 sep = "_" ; 1050 } 1051 os_ << "separator = " << sep << LogIO::POST ; 1043 1052 1044 1053 // determine SRCTYPE … … 1094 1103 // sep == "." 1095 1104 // 1096 // ALMA & EVLA case (MS via ASDM) 1105 // ALMA & EVLA case (MS via ASDM) before3.1 1097 1106 // 1098 1107 // obsMode1=CALIBRATE_* … … 1122 1131 if ( obsMode2 == "ON_SOURCE" ) srcType = SrcType::PSON ; 1123 1132 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 ; 1124 1170 } 1125 1171 }
Note:
See TracChangeset
for help on using the changeset viewer.