Index: trunk/ippToPsps/jython/fits.py
===================================================================
--- trunk/ippToPsps/jython/fits.py	(revision 31832)
+++ trunk/ippToPsps/jython/fits.py	(revision 31849)
@@ -3,5 +3,5 @@
 import os
 import re
-
+import shutil
 
 '''
@@ -15,18 +15,31 @@
 
     '''
-    def __init__(self, logger, path):
+    def __init__(self, logger, doc, originalPath):
 
-       self.path = path
+       self.originalPath = originalPath
        self.logger = logger
+       self.doc = doc
+       self.localDir = self.doc.find("localOutPath").text
 
        # does it exist?
-       if not os.path.isfile(self.path): 
-           self.logger.error("Cannot read file at '" + self.path + "'")
+       if not os.path.isfile(self.originalPath): 
+           self.logger.error("Cannot read file at '" + self.originalPath + "'")
            return
 
-       self.file = open(self.path)
+       self.logger.infoPair("FITS file", self.originalPath)
+       self.localCopyPath = self.localDir + "/temp.fits"
+       shutil.copy2(self.originalPath, self.localCopyPath)
+
+       self.file = open(self.localCopyPath)
        self.header = self.parseHeader()
-       self.logger.info("Read primary header and found " + str(len(self.header)) + " header cards")
+       self.logger.infoPair("FITS local copy", self.localCopyPath)
+       self.logger.infoPair("FITS primary header", "%d cards found" % len(self.header))
        self.rewindToStart()
+
+    '''
+    Returns the path to this FITS file
+    '''
+    def getPath(self):
+        return self.localCopyPath
 
     '''
