IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Ignore:
Timestamp:
Aug 4, 2011, 11:52:43 AM (15 years ago)
Author:
rhenders
Message:

added methods to return original file path and count of primary header fields; changed 'info' log messages to 'debug'

File:
1 edited

Legend:

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

    r31975 r32036  
    2929
    3030       # ok, we have a file, now copy it locally to save on NFS overhead
    31        self.logger.infoPair("FITS file", self.originalPath)
     31       self.logger.debugPair("FITS file", self.originalPath)
    3232       self.localCopyPath = self.localDir + "/temp.fits"
    3333       shutil.copy2(self.originalPath, self.localCopyPath)
     
    3636       self.file = open(self.localCopyPath)
    3737       self.header = self.parseHeader()
    38        self.logger.infoPair("FITS local copy", self.localCopyPath)
    39        self.logger.infoPair("FITS primary header", "%d cards found" % len(self.header))
     38       self.logger.debugPair("FITS local copy", self.localCopyPath)
     39       self.logger.debugPair("FITS primary header", "%d cards found" % len(self.header))
    4040
    4141       # move file pointer back to the start of the file
    4242       self.rewindToStart()
     43
     44    '''
     45    Returns count of 'cards' found in primary header
     46    '''
     47    def getPrimaryHeaderCardCount(self):
     48        return len(self.header)
    4349
    4450    '''
     
    4753    def getPath(self):
    4854        return self.localCopyPath
     55
     56    '''
     57    Returns the path to the LOCAL COPY of this FITS file
     58    '''
     59    def getOriginalPath(self):
     60        return self.originalPath
    4961
    5062    '''
Note: See TracChangeset for help on using the changeset viewer.