IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Feb 6, 2013, 3:16:35 PM (13 years ago)
Author:
eugene
Message:

upgrade to ippToPsps (see doc/upgrade.txt): adds native dvo to mysql ingest operations, adds autogen configuration & installation, splits out global config information from new "skychunk" information (current region on the sky being processed), adds test suites

Location:
trunk/ippToPsps
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps

  • trunk/ippToPsps/jython

    • Property svn:ignore
      •  

        old new  
        11*.class
         2Makefile
         3Makefile.in
  • trunk/ippToPsps/jython/dvoobjects.py

    r33675 r35097  
    88import logging
    99import glob
     10from subprocess import call, PIPE, Popen
    1011
    1112from dvo import Dvo
    12 
    1313
    1414'''
     
    2020    Constructor
    2121    '''
    22     def __init__(self, logger, config, scratchDbName=None):
     22    def __init__(self, logger, config, skychunk, ippToPspsDb, scratchDbName=None):
    2323
    24         super(DvoObjects, self).__init__(logger, config, scratchDbName)
     24        super(DvoObjects, self).__init__(logger, config, skychunk, ippToPspsDb, scratchDbName)
    2525
    2626        # declare DVO file types of interest
     
    3737       for fileType in self.ingestFileTypes:
    3838
    39            path = self.config.dvoLocation + "/" + region + "." + fileType
     39           path = self.skychunk.dvoLocation + "/" + region + "." + fileType
    4040           tableName = self.scratchDb.getDbFriendlyTableName(region + "." + fileType)
    4141
     
    4747
    4848
     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.