IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 25, 2013, 4:48:08 PM (13 years ago)
Author:
eugene
Message:

add native dvo ingest option for objects

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/ippToPsps/jython/dvoobjects.py

    r33675 r35056  
    88import logging
    99import glob
     10from subprocess import call, PIPE, Popen
    1011
    1112from dvo import Dvo
     
    4748
    4849
     50    '''
     51    ingest object data into MySQL database using the native DVO program dvopsps
     52    Populates dvoDetections and dvoDone with FITS tables from DVO for the defined sky area, this
     53    includes purging detections outside sky area
     54    '''
     55    def nativeIngestRegion(self, region):
     56
     57        # drop cpt/cps/object table?
     58        # create detections table?
     59
     60        # TODO path to DVO prog hardcoded temporarily
     61        cmd = "dvopsps objects"
     62        cmd += " -dbhost " + self.scratchDb.dbHost
     63        cmd += " -dbname " + self.scratchDb.dbName
     64        cmd += " -dbuser " + self.scratchDb.dbUser
     65        cmd += " -dbpass " + self.scratchDb.dbPass
     66        cmd += " -D CATDIR " + self.config.dvoLocation
     67        cmd += " -cpt " + region
     68
     69        self.logger.infoPair("Running dvopsps", cmd)
     70        p = Popen(cmd, shell=True, stdout=PIPE)
     71        p.wait()
     72
     73        # update lists after attempted sync
     74        # self.printSummary()
     75
     76        return True
Note: See TracChangeset for help on using the changeset viewer.