IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 39649


Ignore:
Timestamp:
Aug 5, 2016, 1:36:59 PM (10 years ago)
Author:
heather
Message:

stack changes for PV3 (first attempt)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/stackbatch.py

    r39570 r39649  
    619619                for name in self.tablesLoaded:
    620620                    print "-- table: " + name
    621                 os._exit(3)
     621                #os._exit(3)
    622622                continue
    623623
     
    686686            for name in self.tablesLoaded:
    687687                print "-- table: " + name
    688             os._exit(3)
     688            #os._exit(3)
    689689            return True
    690690
     
    857857            for name in self.tablesLoaded:
    858858                print "-- table: " + name
    859             os._exit(3)
     859            #os._exit(3)
    860860            return True
    861861
     
    11581158                field = "INP_%04d" % input
    11591159                inputName = self.getKeyValue(header, field)
    1160                
     1160                self.logger.infoPair("splitting",inputName)
    11611161                # split inputName of form o5745g0406o.356782.wrp.1199763.skycell.1315.090.fits
    11621162                # 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]
    11651167               
     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
    11661193                field = "SCL_%04d" % input
    11671194                scaleFactor = self.getKeyFloat(header, "%9.5f", field)
Note: See TracChangeset for help on using the changeset viewer.