IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 35012


Ignore:
Timestamp:
Jan 22, 2013, 5:09:40 AM (13 years ago)
Author:
eugene
Message:

fix some errors in the table/chip split

File:
1 edited

Legend:

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

    r35003 r35012  
    688688                self.scratchDb.createIndex(extension, "IPP_IDET")
    689689        # try the test Chip
    690         self.scratchDb.createIndex(Chip_psf, "IPP_IDET")
     690        self.scratchDb.createIndex("Chip_psf", "IPP_IDET")
    691691
    692692        self.logger.infoPair("created indexes on", "IPP tables")     
     
    712712    Does the processing, i.e. pulling stuff from IPP tables into PSPS tables
    713713    '''
    714     def populatePspsTablesChip(self, chipname, x, y):
     714    def populatePspsTablesChip(self, chipname, x, y, results, tables):
    715715        #self.logger.infoTitle("Processing " + chipname)
    716716        if not self.scratchDb.astrometricSolutionOK(chipname):
     
    738738                results['NULLOBJID'],
    739739                rowCount)
    740         totalOriginal = totalOriginal + results['ORIGINALTOTAL']
    741         totalSatDet = totalSatDet + results['SATDET']
    742         totalNulIInstFlux = totalNulIInstFlux + results['NULLINSTFLUX']
    743         totalNullPeakFlux = totalNullPeakFlux + results['NULLPEAKADU']
    744         totalNullObjID = totalNullObjID + results['NULLOBJID']
    745         totalDetections = totalDetections + rowCount
     740        self.totalOriginal     = self.totalOriginal + results['ORIGINALTOTAL']
     741        self.totalSatDet       = self.totalSatDet + results['SATDET']
     742        self.totalNulIInstFlux = self.totalNulIInstFlux + results['NULLINSTFLUX']
     743        self.totalNullPeakFlux = self.totalNullPeakFlux + results['NULLPEAKADU']
     744        self.totalNullObjID    = self.totalNullObjID + results['NULLOBJID']
     745        self.totalDetections   = self.totalDetections + rowCount
    746746        #self.logger.info("updated totals")
    747747        # check we have something in this Detection table TODO add this to table above
    748748        if rowCount < 1:
    749             self.logger.debugPair("Skipping empty table for chipname", chipname)
     749            self.logger.infoPair("Skipping empty table for chipname", chipname)
    750750            return False;
    751751
     
    783783        otaCount = 0
    784784        results = {}
    785         totalOriginal = totalSatDet = totalNulIInstFlux = totalNullPeakFlux = totalNullObjID = totalDetections = 0
     785        self.totalOriginal = self.totalSatDet = self.totalNulIInstFlux = self.totalNullPeakFlux = self.totalNullObjID = self.totalDetections = 0
    786786        self.logger.info("+-------+---------------+---------------+---------------+---------------+---------------+---------------+")
    787787        self.logger.info("|  OTA  | Initial total |   Sat Det     | NULL instFlux | NULL peak ADU | NULL obj ID   |  Remainder    |")
     
    799799                if ota not in self.imageIDs: continue
    800800
    801                 if populatePspsTables(ota, x, y): otaCount = otaCount + 1
    802 
    803         if populatePspsTables("Chip", 0, 0): otaCount = otaCount + 1
     801                if self.populatePspsTablesChip(ota, x, y, results, tables): otaCount = otaCount + 1
     802
     803        if self.populatePspsTablesChip("Chip", 0, 0, results, tables): otaCount = otaCount + 1
    804804
    805805        # print totals
    806806        self.logger.info("+-------+---------------+---------------+---------------+---------------+---------------+---------------+")
    807807        self.logger.info("| Total | %13d | %13d | %13d | %13d | %13d | %13d |",
    808                 totalOriginal,
    809                 totalSatDet,
    810                 totalNulIInstFlux,
    811                 totalNullPeakFlux,
    812                 totalNullObjID,
    813                 totalDetections)
     808                self.totalOriginal,
     809                self.totalSatDet,
     810                self.totalNulIInstFlux,
     811                self.totalNullPeakFlux,
     812                self.totalNullObjID,
     813                self.totalDetections)
    814814        self.logger.info("+-------+---------------+---------------+---------------+---------------+---------------+---------------+")
    815815
Note: See TracChangeset for help on using the changeset viewer.