IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 3, 2013, 12:52:33 PM (13 years ago)
Author:
eugene
Message:

changed dvoDetectionFull mysql engine to 'MEMORY' to improve ingest speed

handle errrors in calls to dvopsps (only in detectionbatch.py)

removed a lot of excess verbosity used for debugging / testing

determine the mysql major version number via mysql query

added test option -realgpc to use test ipptopsps databases with a real gpc1 dataset

add version-dependent call to 'set session old_alter_table' to allow
the ALTER IGNORE statements to work on mysql v5.5 machines (like our
desktops).

raise an exception in case the load infile operations fail

remove unneeded 'killLastConnectionID'

extend logging time to milliseconds

allow an exposure to be skipped without aborting loader

check that a P2 image exists in the dvoImage table (otherwise skip the chip)

change the mysql floating point types for the dvoDetection table to use FLOAT/DOUBLE instead of REAL/FLOAT

remove the old test for valid astrometry of a chip (NASTRO >= 50)

this test was crude and not really the right test. it was also used
to verify that an image should / should not be included. now we check
against dvoImages to see if the chip should be loaded or not (DVO
rejects input images for bad astrometry)

skip an exposure if too many detections have been rejected. this is a sign of a problem and should require more attention

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20130307/ippToPsps/jython/stackbatch.py

    r35222 r35352  
    543543        # response = raw_input("updated dvo ")
    544544       
     545        # XXX EAM : note that in mysql versions later than 5.1, this fails
     546        # unless the following is called first:
     547        # set session old_alter_table=1
     548        # follow the command with
     549        # set session old_alter_table=0
     550        # OF COURSE, this fails for mysql version < 5.5...
     551        if self.scratchDb.version > 5.1:
     552            self.scratchDb.execute("set session old_alter_table=1")
     553
    545554        sql = "ALTER IGNORE TABLE StackDetection ADD PRIMARY KEY (objID)"
    546555       
     556        if self.scratchDb.version > 5.1:
     557            self.scratchDb.execute("set session old_alter_table=0")
     558
    547559        self.scratchDb.execute(sql)
    548560        # response = raw_input("add primary key? ")
     
    806818         ON (a.stackDetectID = b.detectID) where b.imageID = " + str(imageID) + \
    807819         " INTO OUTFILE '" + dumpFile + "'"
    808         print "sql: ", sql
    809         self.scratchDb.execute(sql)
     820
     821        try: self.scratchDb.execute(sql)
     822        except:
     823            self.logger.info("failed to select data for stackDetectionCalib")
     824            self.logger.infoPair("sql: ", sql)
     825            raise
    810826
    811827        sql = "LOAD DATA INFILE '" + dumpFile + "' INTO TABLE " + tableName
    812         print "sql: ", sql
    813         self.scratchDb.execute(sql)
     828        try: self.scratchDb.execute(sql)
     829        except:
     830            self.logger.info("failed to load data from infile for stackDetectionCalib")
     831            self.logger.infoPair("sql: ", sql)
     832            raise
    814833
    815834        ## XXX write this with the select/insert
Note: See TracChangeset for help on using the changeset viewer.