IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

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

add native dvo ingest option for objects

Location:
branches/eam_branches/ipp-20121219/ippToPsps
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • branches/eam_branches/ipp-20121219/ippToPsps/config/settings.xml

    r35045 r35056  
    1818  <!-- GPC1 Db section -->
    1919  <gpc1database>
    20     <!-- TEST VERSION
     20    <!-- TEST VERSION -->
    2121    <name>gpc1test</name>
    2222    <host>localhost</host>
    2323    <user>dvo</user>
    24     <password>dvo</password> -->
    25     <!-- REAL VERSION -->
     24    <password>dvo</password>
     25    <!-- REAL VERSION
    2626    <name>gpc1</name>
    2727    <host>ippdb01</host>
    2828    <user>ipp</user>
    29     <password>ipp</password>
     29    <password>ipp</password> -->
    3030  </gpc1database>
    3131
  • branches/eam_branches/ipp-20121219/ippToPsps/jython/batch.py

    r35032 r35056  
    543543            raise
    544544
    545         # this reads the detection tables from the CMF/SMF file(s)
     545        # for P2/ST, this reads the detection tables from the CMF/SMF file(s)
     546        # for OB, this imports object data from DVO
    546547        if not self.importIppTables():
    547548            self.logger.errorPair("Aborting this batch", "could not import IPP tables")
  • 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
  • branches/eam_branches/ipp-20121219/ippToPsps/jython/loader.py

    r35043 r35056  
    190190                                useFullTables = 1
    191191                        else:
     192                            # XXX EAM : this is not currently an
     193                            # option. either remove the non-native
     194                            # ingest code or make it an option
    192195                            # if we are using the native loader, always use it
    193196                            # need to work out a good boundary / region strategy in coordination with
     
    196199                            useFullTables = 1
    197200               
     201                    ## else:
     202                    ##     # if we are using the native loader, always use it
     203                    ##     # need to work out a good boundary / region strategy in coordination with
     204                    ##     # impact of mysql insertion
     205                    ##     self.dvoObjects.nativeIngestObjects(boxDim['RA'], boxDim['DEC'], boxSizeSansBorder)
     206                    ##     useFullTables = 1
     207
    198208                    '''
    199209                    NOTE EAM : "TheseItems" refers to each of the stack CMFs, camera SMFs, or object batches
  • branches/eam_branches/ipp-20121219/ippToPsps/jython/objectbatch.py

    r34834 r35056  
    7171        self.region = self.scratchDb.getRegionNameFromThisDvoIndex(self.id)
    7272        self.ippToPspsDb.insertObjectMeta(self.batchID, self.region)
    73         self.dvoObjects.ingestRegion(self.region)
     73        if True:
     74            self.dvoObjects.nativeIngestRegion(self.region)
     75        else:
     76            self.dvoObjects.ingestRegion(self.region)
    7477
    7578        return True
  • branches/eam_branches/ipp-20121219/ippToPsps/jython/stackbatch.py

    r35053 r35056  
    714714    '''   
    715715    Populates the StackDetectionCalib table
     716    XXX this can probably get a big speed increase by using 'SELECT () INTO OUTFILE '/tmp/name' and then
     717    calling the load data infile '/tmp/name' into table;
    716718    '''
    717719    def populateStackDetectionCalib(self):
Note: See TracChangeset for help on using the changeset viewer.