IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 10, 2015, 12:40:44 PM (11 years ago)
Author:
eugene
Message:

make code less forgiving: sql execute aborts on failures; deal with various hidden problems: add IF EXISTS to drop table operations to avoid raising unneeded error, make sure tables exist before trying to add indexes, test for existence of the stack _xsrc, _xfit, etc tables (and skip if missing); fix sqlLine.group to cast inputs to string before performing string ops; getKeyFloat now returns a float value which is safe with sqlLine.group, but can be used in a math expression; use python math. operators as needed (sqrt, fabs); fulltest.sh runs for camera, stack, object stages; update dvoSkyTable to use REGION_ID instead of special word INDEX; add existsClient method (avoid using mysql failure as a test for table existence); no need to test for exceptions to sql.execute since we abort on failure; replace esoteric SQL with dropTable calls; trap errors in stilts.treads in setupScratchdb; drop StackObjecThin and StackDetOffMeta along with other stack scratch tables

File:
1 edited

Legend:

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

    r38602 r38837  
    234234
    235235    '''
    236     Returns the string keyword value from this header or else "NULL"
     236    Returns the float keyword value from this header or else "NULL"
    237237    '''
    238238    def getKeyFloat(self, header, format, key):
    239239
    240240         if key in header:
    241              value = format % float(header[key])
     241             value = float(format % float(header[key]))
    242242         else:
    243243             self.logger.errorPair("Missing header field", key)
    244              value = format % -999.9
     244             value = float(format % -999.9)
    245245
    246246         return value
     
    414414    '''   
    415415    def createEmptyPspsTables(self):
    416          print "THIS SUCKS"
    417          self.pspsTables = stilts.treads(self.pspsVoTableFilePath)
    418          for table in self.pspsTables:
    419              self.logger.debug("Creating PSPS table: " + table.name)
    420              self.logger.infoPair("creating psps table ",table.name)
    421              table.write(self.scratchDb.url + '#' + table.name)
    422              self.tablesToExport.append(table.name)
    423 
    424          return True
     416        self.pspsTables = stilts.treads(self.pspsVoTableFilePath)
     417        for table in self.pspsTables:
     418            self.logger.debug("Creating PSPS table: " + table.name)
     419            self.logger.infoPair("creating psps table ",table.name)
     420            table.write(self.scratchDb.url + '#' + table.name)
     421            self.tablesToExport.append(table.name)
     422
     423        return True
    425424
    426425    '''
Note: See TracChangeset for help on using the changeset viewer.