IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 24, 2015, 2:20:15 PM (11 years ago)
Author:
eugene
Message:

adjust md5sum code to put options into single location; test for AP_NPIX before trying to use in diffbatch; apply static plate scale in stackbatch; add FW source X,Y, ccdID

File:
1 edited

Legend:

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

    r38956 r38958  
    4646
    4747       super(DetectionBatch, self).__init__(
    48                logger,
    49                config,
    50                skychunk,
    51                gpc1Db,
    52                ippToPspsDb,
    53                scratchDb,
    54                camID,
    55                batchID,
    56                "P2",
    57                gpc1Db.getCameraStageSmf(camID,skychunk.P2_smf_version))
     48           logger,
     49           config,
     50           skychunk,
     51           gpc1Db,
     52           ippToPspsDb,
     53           scratchDb,
     54           camID,
     55           batchID,
     56           "P2",
     57           gpc1Db.getCameraStageSmf(camID,skychunk.P2_smf_version))
    5858
    5959       # get camera meta data
     
    109109           self.logger.errorPair("Could not get", "FILTERID")
    110110           raise
    111        
     111          
    112112       # MJD-OBS is the exposure start, EXTIME / 172800 = (EXPTIME sec / 84600 sec/day) / 2
    113113       self.obsTime = float(self.header['MJD-OBS']) + (float(self.header['EXPTIME']) / 172800.0)
    114    
     114       
    115115       ## MEH md5sum options test
    116        self.md5sum = None
    117116       self.md5sum = self.fits.getMd5sum()
    118        #self.md5sum = self.fits.getMd5sumShell()
    119        #self.md5sum = self.fits.getMd5sumFile()
    120  
     117       
    121118       # set up some defauts
    122119       self.totalNumPhotoRef = 0
    123 
    124120
    125121       self.filter = self.header['FILTERID'][0:1]
     
    198194        self.scratchDb.updateFilterID("FrameMeta", self.filter)
    199195        self.scratchDb.updateAllRows("FrameMeta", "processingVersion", str(self.skychunk.processingVersion))
     196        return True
    200197
    201198    '''
     
    344341        self.scratchDb.execute(sql)
    345342
     343        print "---- inserted ImageMeta into mysql"
     344
    346345        self.scratchDb.updateRecalStats(tableName, header['IMAGEID'], str(pltscale));
    347346        self.scratchDb.updateFilterID(tableName, self.filter)
    348347        self.scratchDb.updateAllRows(tableName, "processingVersion", str(self.skychunk.processingVersion))
    349348
     349        print "---- updated things"
     350
    350351        if 'NASTRO' in header: self.totalNumPhotoRef = self.totalNumPhotoRef + int(header['NASTRO'])
    351352        self.scratchDb.replaceNullsInThisColumn(tableName, "polyOrder", "0")
    352353
     354        print "---- completed ImageMeta"
     355        return True
     356
    353357    '''
    354358    Populates the ImageDetEffMeta table for this OTA
    355359    '''
    356360    def populateImageDetEffMetaTablePart1(self, ota, header):
     361        print "---- *** populate ImageDetEffMetaTablePart1"
    357362        ippTableName = ota + "_deteff"
    358363        tableName = "ImageDetEffMeta_" + ota
     
    384389
    385390        # for loop
     391        return True
    386392
    387393    '''
     
    389395    '''
    390396    def populateImageDetEffMetaTablePart2(self, ota):
     397        print "---- *** populate ImageDetEffMetaTablePart2"
     398
    391399        ippTableName = ota + "_deteff"
    392400        tableName = "ImageDetEffMeta_" + ota
    393401
    394               # ok, this is a bit tricky - Ideally I just want this all in one table, however, the way the table is layed out is 90 degrees from how I want it.
     402        # ok, this is a bit tricky - Ideally I just want this all in one table, however, the way the table is layed out is 90 degrees from how I want it.
    395403        # the steps out of this mess are as follows:
    396404        # give an index to XYxy_deteff (already done, called table_index)
     
    424432                          self.logger.errorPair('failed sql: ', sql)
    425433                          raise
     434        return True
    426435               
    427436
     
    552561        # we don't delete these anymore
    553562        results['NULLINSTFLUX'] = 0;
     563        return True
    554564
    555565    '''
     
    580590
    581591        self.scratchDb.updateAllRows(tableName, "processingVersion", str(self.skychunk.processingVersion))
     592        return True
     593
    582594    '''
    583595    Populates the SkinnyObject table for this OTA
     
    607619
    608620        self.scratchDb.updateAllRows(tableName, "processingVersion", str(self.skychunk.processingVersion))
     621        return True
    609622
    610623    '''
     
    641654           
    642655        # populate ImageMeta
     656        # XXX EAM 20151024 :
    643657        if not self.populateImageMetaTable(chipname, header):
    644658            self.logger.infoPair("skipping chip: ", chipname)
     
    647661        self.updateImageID("ImageMeta_" + chipname, x, y)
    648662
     663        # XXX EAM 20151024 : problem is here?
    649664        self.populateImageDetEffMetaTablePart1(chipname, header)
    650665        self.updateImageID("ImageDetEffMeta_" + chipname, x, y)
     
    693708        return True
    694709
    695 
    696710    '''
    697711    Applies indexes to the IPP tables
     
    722736
    723737        self.logger.infoPair("created indexes on", "IPP tables")     
     738        return True
     739
    724740
    725741    '''
     
    771787
    772788        self.scratchDb.execute(sql)
     789        return True
    773790
    774791    '''
     
    786803            self.logger.errorPair('failed sql',sql)
    787804            raise
     805        return True
    788806       
    789807    '''
     
    10041022
    10051023        print "duplicates found: ", str(Nduplicates)
     1024        return True
    10061025
    10071026    '''
     
    10121031        sql = "UPDATE " + tableName + " SET imageID = %d%d%d" % (self.expID, x, y)
    10131032        self.scratchDb.execute(sql)
     1033        return True
    10141034
    10151035    '''
     
    10221042            if table.name == "FrameMeta": self.scratchDb.reportNulls(table.name, showPartials)
    10231043            else: self.scratchDb.reportNulls(table.name + "_XY33", showPartials)
    1024 
     1044        return True
    10251045
    10261046    '''
Note: See TracChangeset for help on using the changeset viewer.