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/forcedwarpbatch.py

    r38827 r38837  
    404404        imageID = self.scratchDb.getImageIDFromExternID(self.warpSkyFileID[num])
    405405        self.logger.infoPair("updating","forcedWarpMeasurement_"+forcedWarpID)
     406
    406407        sqlLine = sqlUtility("UPDATE ForcedWarpMeasurement_"+forcedWarpID+" as a, " + self.scratchDb.dvoDetectionTable + " as b SET ")
    407408        sqlLine.group("a.objID",      "b.objID")
     
    414415        sqlLine.group("a.FinfoFlag3", "b.flags")
    415416
    416         sqlLine.group("a.FpsfFlux",    "a.FpsfFlux     * b.zpFactor")
    417         sqlLine.group("a.FpsfFluxErr", "a.FpsfFluxErr  * b.zpFactor")
    418         sqlLine.group("a.FapFlux",     "a.FapFlux      * b.zpFactor")
    419         sqlLine.group("a.FapFluxErr",  "a.FapFluxErr   * b.zpFactor")
    420         sqlLine.group("a.FkronFlux",   "a.FkronFlux    * b.zpFactor")
    421         sqlLine.group("a.FkronFluxErr","a.FkronFluxErr * b.zpFactor")
    422         sqlLine.group("a.Fsky",        "a.Fsky         * b.zpFactor")
    423         sqlLine.group("a.FskyErr",     "a.FskyErr      * b.zpFactor")
     417        sqlLine.group("a.FpsfFlux",     "a.FpsfFlux     * b.zpFactor")
     418        sqlLine.group("a.FpsfFluxErr",  "a.FpsfFluxErr  * b.zpFactor")
     419        sqlLine.group("a.FapFlux",      "a.FapFlux      * b.zpFactor")
     420        sqlLine.group("a.FapFluxErr",   "a.FapFluxErr   * b.zpFactor")
     421        sqlLine.group("a.FkronFlux",    "a.FkronFlux    * b.zpFactor")
     422        sqlLine.group("a.FkronFluxErr", "a.FkronFluxErr * b.zpFactor")
     423        sqlLine.group("a.Fsky",         "a.Fsky         * b.zpFactor")
     424        sqlLine.group("a.FskyErr",      "a.FskyErr      * b.zpFactor")
    424425
    425426        sql = sqlLine.makeEquals("WHERE a.ippDetectID = b.ippDetectID AND b.imageID = " +str( imageID))
Note: See TracChangeset for help on using the changeset viewer.