- Timestamp:
- Nov 8, 2011, 2:44:12 PM (15 years ago)
- Location:
- branches/eam_branches/ipp-20110906
- Files:
-
- 2 edited
-
. (modified) (1 prop)
-
ippToPsps/jython/scratchdb.py (modified) (2 diffs)
Legend:
- Unmodified
- Added
- Removed
-
branches/eam_branches/ipp-20110906
- Property svn:mergeinfo changed
-
branches/eam_branches/ipp-20110906/ippToPsps/jython/scratchdb.py
r32303 r32630 40 40 self.logger.debug("ScratchDb destructor") 41 41 42 43 42 ''' 44 43 Creates a stored procedure for psfLikelihood. This uses an implementation of the complimentary error function taken from Numerical Recipes in C. 45 44 ''' 46 45 def createPsfLikelihoodFunction(self): 47 sql = "DELIMITER $$ \ 48 DROP FUNCTION IF EXISTS `psfLikelihood` $$ \ 49 CREATE FUNCTION `psfLikelihood`(x REAL) RETURNS REAL \ 46 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 \ 50 55 DETERMINISTIC \ 51 56 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' \ … … 62 67 END IF; \ 63 68 RETURN ans; \ 64 END $$ \ 65 DELIMITER ;" 69 END" 66 70 67 71 try:
Note:
See TracChangeset
for help on using the changeset viewer.
