IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 22, 2011, 4:20:43 PM (15 years ago)
Author:
rhenders
Message:

now checking if this exposure has already been processed before proceeding

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippToPsps/jython/detectionbatch.py

    r31351 r31357  
    5858
    5959       self.totalNumPhotoRef = 0
     60
     61       # get filterID using init table
     62       self.filter = self.header['FILTERID'][0:1]
     63
     64       # insert what we know about this stack batch into the stack table
     65       self.ippToPspsDb.insertDetectionMeta(self.batchID, self.expID, self.filter)
     66
    6067
    6168    '''
     
    490497    def populatePspsTables(self):
    491498
    492         # get filterID using init table
    493         self.filter = self.header['FILTERID'][0:1]
    494 
    495499        self.populateFrameMeta()
    496500     
     
    592596        self.scratchDb.stmt.execute(sql)
    593597
     598    '''
     599    Checks whether this batch has already been processed and published
     600    '''
     601    def alreadyProcessed(self):
     602
     603        return self.ippToPspsDb.alreadyProcessed("detection", "exp_id", self.expID)
    594604
    595605
     
    621631    #file = "detdemo.fits"
    622632    detectionBatch = DetectionBatch(logger, camID, file, True)
    623     detectionBatch.createEmptyPspsTables()
    624     detectionBatch.importIppTables("XY33\.psf")
    625     if detectionBatch.populatePspsTables():
    626         detectionBatch.exportPspsTablesToFits("([a-zA-Z]+)")
    627         detectionBatch.writeBatchManifest()
    628         detectionBatch.reportNullsInAllPspsTables(False)
    629         #detectionBatch.createTarball()
    630         #detectionBatch.publishToDatastore()
    631 
     633
     634    if not detectionBatch.alreadyProcessed():
     635
     636        detectionBatch.createEmptyPspsTables()
     637        detectionBatch.importIppTables("XY33\.psf")
     638        if detectionBatch.populatePspsTables():
     639            detectionBatch.exportPspsTablesToFits("([a-zA-Z]+)")
     640            detectionBatch.writeBatchManifest()
     641            detectionBatch.reportNullsInAllPspsTables(False)
     642            #detectionBatch.createTarball()
     643            #detectionBatch.publishToDatastore()
     644   
    632645    i = i+1
    633646    if i > 0: break
Note: See TracChangeset for help on using the changeset viewer.