IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 28, 2011, 11:41:25 AM (15 years ago)
Author:
rhenders
Message:

Fixed method to install psfLikelihood() stored procedure

File:
1 edited

Legend:

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

    r32459 r32590  
    3333        self.logger.debugPair("Using DVO detection table", self.dvoDetectionTable)
    3434
    35         #self.createPsfLikelihoodFunction()
    36 
    3735    '''
    3836    Destructor
     
    4745    def createPsfLikelihoodFunction(self):
    4846
    49         sql = "DELIMITER $$ \
    50                DROP FUNCTION IF EXISTS `psfLikelihood` $$ \
    51                CREATE FUNCTION `psfLikelihood`(x REAL) RETURNS REAL \
     47        sql = "DROP FUNCTION IF EXISTS `psfLikelihood`"
     48        try:
     49            self.execute(sql)
     50        except:
     51            self.logger.errorPair("Could not drop stored procedure", "psfLikelihood")
     52            return False
     53
     54        sql = "CREATE FUNCTION `psfLikelihood`(x REAL) RETURNS REAL \
    5255               DETERMINISTIC \
    5356               COMMENT 'Returns the psfLikelihood using the complimentary error function with fractional error everywhere less than 1.2 x 10-7. From Numerical Recipes in C' \
     
    6467               END IF; \
    6568               RETURN ans; \
    66                END $$ \
    67                DELIMITER ;"
     69               END"
    6870
    6971        try:
Note: See TracChangeset for help on using the changeset viewer.