IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Apr 11, 2017, 3:01:23 PM (9 years ago)
Author:
heather
Message:

changes to make forcedwards correctly (not dropping things)

File:
1 edited

Legend:

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

    r39544 r40011  
    186186             
    187187        return imageID
     188
     189    '''
     190    Gets imageID from extern ID and photcoderange (needed for FW, possibly for others)
     191    '''
     192    def getImageIDFromExternIDandPhotcodeRange(self, externID, r1, r2):
     193               
     194        imageID = -1
     195               
     196        sql1 = "SELECT IMAGE_ID FROM " + self.dvoImagesTable + " WHERE EXTERN_ID = %s" % (externID)
     197        range = " AND PHOTCODE >= " + str(r1) +" AND PHOTCODE <=" + str(r2)
     198        sql = sql1 + range
     199
     200        self.logger.info(sql)
     201        try:
     202            rs = self.executeQuery(sql)   
     203            rs.first()
     204            imageID = rs.getInt(1)
     205        except:
     206            self.logger.errorPair("Unable to get imageID from dvo using", sql)
     207             
     208        return imageID
     209
     210
     211
     212
    188213
    189214    '''
Note: See TracChangeset for help on using the changeset viewer.