IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Jan 31, 2013, 5:47:48 PM (13 years ago)
Author:
eugene
Message:

track the boxes for which dvo detections have been ingested

File:
1 edited

Legend:

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

    r35076 r35077  
    3333
    3434    '''
    35     def __init__(self, logger, config, skychunk, scratchDbName=None):
     35    def __init__(self, logger, config, skychunk, ippToPspsDb, scratchDbName=None):
    3636
    3737        # set up logging
     
    3939        self.config = config
    4040        self.skychunk = skychunk
     41        self.ippToPspsDb = ippToPspsDb
    4142
    4243        # set up empty lists
     
    4748        self.regionsIngestedButOutOfDate = []
    4849       
    49         # XXX use Stilts for ingest in certain cases or not?
    50         self.useStilts = 0
    51 
    5250        # connect to the specified scratch database, if a name is given, otherwise use the first version
    5351        try:
     
    5553        except: raise
    5654
     55        # we have (still) 3 modes of ingest from dvo cpt/cps/cpm files
     56        # 1) dvograbber (useFullTables == FALSE),
     57        # 2) jython/stilts (useStilts == TRUE, useFullTables == TRUE)
     58        # 3) dvopsps (useStilts == FALSE, useFullTables == TRUE)
     59        # my goal (EAM, 2013/01/31) is to migrate to only dvopsps
     60
     61        self.useStilts = 0
    5762        self.scratchDb.setUseFullTables(True)
    5863
     
    569574    includes purging detections outside sky area
    570575    '''
    571     def nativeIngestDetections(self, raCenter, decCenter, boxSize):
    572 
    573         # XXX put the skychunk below in a separate method
     576    def nativeIngestDetections(self, boxId, raCenter, decCenter, boxSize):
     577
     578        # XXX put the chunk below in a separate method
     579        # blow away existing dvoDetection table
     580
     581        # clear the 'ingested' field for all boxes
     582        self.ippToPspsDb.clearIngestedBoxes()
    574583       
    575584        # drop detections table
     
    599608        self.loadImages()
    600609
    601         # XXX blow away existing dvoDetection table?
    602 
    603610        # dvopsps -D catdir CATDIR -region .... -dbhost xx -dbname xx -dbuser xx -dbpass xx
    604611        halfSize = boxSize / 2.0
     
    625632        p.wait()
    626633
     634        self.ippToPspsDb.setIngestedBox(boxId)
     635
    627636        # update lists after attempted sync
    628637        # self.printSummary()
Note: See TracChangeset for help on using the changeset viewer.