Changeset 39649
- Timestamp:
- Aug 5, 2016, 1:36:59 PM (10 years ago)
- File:
-
- 1 edited
-
trunk/ippToPsps/jython/stackbatch.py (modified) (4 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps/jython/stackbatch.py
r39570 r39649 619 619 for name in self.tablesLoaded: 620 620 print "-- table: " + name 621 os._exit(3)621 #os._exit(3) 622 622 continue 623 623 … … 686 686 for name in self.tablesLoaded: 687 687 print "-- table: " + name 688 os._exit(3)688 #os._exit(3) 689 689 return True 690 690 … … 857 857 for name in self.tablesLoaded: 858 858 print "-- table: " + name 859 os._exit(3)859 #os._exit(3) 860 860 return True 861 861 … … 1158 1158 field = "INP_%04d" % input 1159 1159 inputName = self.getKeyValue(header, field) 1160 1160 self.logger.infoPair("splitting",inputName) 1161 1161 # split inputName of form o5745g0406o.356782.wrp.1199763.skycell.1315.090.fits 1162 1162 # to get the expID (second block) 1163 words = inputName.split('.') 1164 frameID = words[1] 1163 # worsds 1164 words2=re.sub(":",".",inputName) 1165 words = words2.split('.') 1166 #frameID = words[1] 1165 1167 1168 ogo = -1 1169 1170 # search the words for the o....g....o part 1171 for j in range(len(words)): 1172 match = re.search('o\d\d\d\dg\d\d\d\d\o', words[j]) 1173 if (match != None): 1174 ogo=j 1175 break 1176 # did we find it? if so, are there are least 2 more elements past the ogo? 1177 # this is to make sure that the exp_id is not truncated 1178 1179 if ogo > -1: 1180 if (ogo +1) < len(words): 1181 # there is a o....g....o element, and the next 2 exist 1182 frameID = words[ogo+1] 1183 1184 else: 1185 self.logger.infoPair("unable to find exp_id from", inputName) 1186 raise 1187 # and then raise an error and stop the program. I expect this to mostly work fine 1188 # for the extra long label (?) - can probably get it from just the o g o (if exp_id 1189 # is truncated, otherwise, there will have to be some extra cleverness with 1190 # queries and matching 1191 self.logger.infoPair("found exp_id!", frameID) 1192 1166 1193 field = "SCL_%04d" % input 1167 1194 scaleFactor = self.getKeyFloat(header, "%9.5f", field)
Note:
See TracChangeset
for help on using the changeset viewer.
