IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 32596 for trunk/ippToPsps


Ignore:
Timestamp:
Oct 28, 2011, 10:24:40 PM (15 years ago)
Author:
rhenders
Message:

some re-arranging so that, if the FITS file is not found in Nebulous, the program does not stop

File:
1 edited

Legend:

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

    r32589 r32596  
    5454        self.logger.debug("Batch class constructor")
    5555
    56         # check FITS file is ok
    57         if self.fits:
    58             self.header = self.fits.getPrimaryHeader()
    59 
    60             # now check that the fits header is readable
    61             if not self.header: return
    62 
    63         # if no fits file, and this is not an IN batch, then get out of here
    64         else:
    65            if batchType != "IN": return
    66 
    6756        # set up class variables
    6857        self.id = id
     
    7261        self.batchType = batchType;
    7362        self.pspsVoTableFilePath = "../config/" + batchType + "/tables.vot"
     63
     64        # check FITS file is ok
     65        if self.fits:
     66            self.header = self.fits.getPrimaryHeader()
     67
     68            # now check that the fits header is readable
     69            if not self.header:
     70                logger.errorPair("Could not read FITS for id", "%d" % id)
     71                return
     72
     73        # if no fits file, and this is not an IN batch, then get out of here
     74        else:
     75           if batchType != "IN":
     76               logger.errorPair("Could not read FITS for id", "%d" % id)
     77               return
    7478
    7579        # get info from config
Note: See TracChangeset for help on using the changeset viewer.