IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32179


Ignore:
Timestamp:
Aug 23, 2011, 2:42:05 PM (15 years ago)
Author:
rhenders
Message:

new method to check whether we have a decent astrometric solution for this chip

File:
1 edited

Legend:

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

    r32135 r32179  
    153153       
    154154    '''
     155    Checks whether the astrometric solution is ok for this chip
     156    TODO the value of 50 for numAstroRef is hardcoded here, but this should be temporary anyway
     157    '''
     158    def astrometricSolutionOK(self, ota):
     159
     160        sql = "SELECT numAstroRef FROM ImageMeta_" + ota
     161
     162        try:
     163            rs = self.executeQuery(sql)
     164            rs.first()
     165            if rs.getInt(1) < 50:
     166                self.logger.debug("Bad astrometric solution for",  ota)
     167                return False
     168            else:
     169                return True
     170        except:
     171            self.logger.debug("Unable to check astrometric solution")
     172
     173        return True
     174
     175    '''
    155176    Have we already imported this DVO table?
    156177    '''
Note: See TracChangeset for help on using the changeset viewer.