Changeset 35097 for trunk/ippToPsps/jython/dvoobjects.py
- Timestamp:
- Feb 6, 2013, 3:16:35 PM (13 years ago)
- Location:
- trunk/ippToPsps
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/ippToPsps
- Property svn:mergeinfo changed
-
trunk/ippToPsps/jython
- Property svn:ignore
-
old new 1 1 *.class 2 Makefile 3 Makefile.in
-
- Property svn:ignore
-
trunk/ippToPsps/jython/dvoobjects.py
r33675 r35097 8 8 import logging 9 9 import glob 10 from subprocess import call, PIPE, Popen 10 11 11 12 from dvo import Dvo 12 13 13 14 14 ''' … … 20 20 Constructor 21 21 ''' 22 def __init__(self, logger, config, s cratchDbName=None):22 def __init__(self, logger, config, skychunk, ippToPspsDb, scratchDbName=None): 23 23 24 super(DvoObjects, self).__init__(logger, config, s cratchDbName)24 super(DvoObjects, self).__init__(logger, config, skychunk, ippToPspsDb, scratchDbName) 25 25 26 26 # declare DVO file types of interest … … 37 37 for fileType in self.ingestFileTypes: 38 38 39 path = self. config.dvoLocation + "/" + region + "." + fileType39 path = self.skychunk.dvoLocation + "/" + region + "." + fileType 40 40 tableName = self.scratchDb.getDbFriendlyTableName(region + "." + fileType) 41 41 … … 47 47 48 48 49 ''' 50 ingest object data into MySQL database using the native DVO program dvopsps 51 Populates dvoDetections and dvoDone with FITS tables from DVO for the defined sky area, this 52 includes purging detections outside sky area 53 ''' 54 def nativeIngestRegion(self, region): 55 56 # drop cpt/cps/object table? 57 # create detections table? 58 59 # TODO path to DVO prog hardcoded temporarily 60 cmd = "dvopsps objects" 61 cmd += " -dbhost " + self.scratchDb.dbHost 62 cmd += " -dbname " + self.scratchDb.dbName 63 cmd += " -dbuser " + self.scratchDb.dbUser 64 cmd += " -dbpass " + self.scratchDb.dbPass 65 cmd += " -D CATDIR " + self.skychunk.dvoLocation 66 cmd += " -cpt " + region 67 68 if self.skychunk.parallel: 69 cmd += " -parallel" 70 71 self.logger.infoPair("Running dvopsps", cmd) 72 p = Popen(cmd, shell=True, stdout=PIPE) 73 p.wait() 74 75 # update lists after attempted sync 76 # self.printSummary() 77 78 return True
Note:
See TracChangeset
for help on using the changeset viewer.
