IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Oct 22, 2015, 6:50:53 AM (11 years ago)
Author:
eugene
Message:

forcedwarp cannot get filter from header, has to get it from db; use a dictionary to return key/value pairs

File:
1 edited

Legend:

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

    r38930 r38940  
    107107           self.header[num] = self.fits[num].getPrimaryHeader()
    108108           self.warpSkyFileID[num] = self.getKeyValue(self.header[num],"IMAGEID")
    109            self.filterName[num] = self.getKeyValue(self.header[num],"FPA.FILTERID")
    110            self.logger.infoPair("found filterName",self.filterName[num])
     109
     110           ## XXX: filter is not in the heade
     111           ## self.filterName[num] = self.getKeyValue(self.header[num],"FPA.FILTERID")
     112           ## self.logger.infoPair("found filterName",self.filterName[num])
     113
    111114           self.logger.infoPair("found warp_skyfile_id",self.warpSkyFileID[num])
    112115
    113116           # get camera meta data from gpc1 database
    114            # NOTE: this should all be in the header
    115            meta ={}
     117           # NOTE: this should all be in the header, but is not in at least some cases
    116118           meta = self.gpc1Db.getForcedWarpStageMeta(forcedWarpID, self.warpSkyFileID[num])
    117119
     
    120122               raise
    121123
    122            self.expID[num] = meta[0]
    123            self.expTime[num] = meta[1]
     124           self.expID[num]       = meta['exp_id']
     125           self.expTime[num]     = meta['exp_time']
     126           self.filterName[num]  = meta['filter']
     127           self.skycellName[num] = meta['skycell_id']
     128           self.tessName[num]    = meta['tess_id']
     129       
    124130           # This isn't populated in the database (it's NULL).  The hack is below.
    125131           # self.analysisVer[num] = meta[2]
    126            self.skycellName[num] = meta[3]
    127            self.tessName[num] = meta[4]
    128        
    129            self.logger.infoPair("found exp_id",str(self.expID[num]))
    130            self.logger.infoPair("found exp_time",str(self.expTime[num]))
    131            self.logger.infoPair("found skycell_id",self.skycellName[num])
    132            self.logger.infoPair("found tess_id",self.tessName[num])
     132
     133           self.logger.infoPair("found exp_id",     str(self.expID[num]))
     134           self.logger.infoPair("found exp_time",   str(self.expTime[num]))
     135           self.logger.infoPair("found filter",     str(self.filterNam[num]))
     136           self.logger.infoPair("found skycell_id", self.skycellName[num])
     137           self.logger.infoPair("found tess_id",    self.tessName[num])
    133138
    134139           self.tessID[num] = self.scratchDb.getTessID(self.tessName[num])
     
    237242        header   = self.header[num]
    238243        self.logger.infoPair("found header","ok")
    239         photoCalID = str(self.scratchDb.getPhotoCalID(header['IMAGEID']))       
     244
     245        # photoCalID = str(self.scratchDb.getPhotoCalID(header['IMAGEID']))       
     246
     247        # XXX fix this:
     248        photoCalID = GPC1.filtername.ForcedWarp
    240249
    241250        # XXX hard-wired platescale : 0.25
Note: See TracChangeset for help on using the changeset viewer.