Index: trunk/psModules/src/camera/pmFPA_JPEG.c
===================================================================
--- trunk/psModules/src/camera/pmFPA_JPEG.c	(revision 10417)
+++ trunk/psModules/src/camera/pmFPA_JPEG.c	(revision 10421)
@@ -5,6 +5,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-12-02 04:24:48 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-03 18:48:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,5 +31,5 @@
 
 
-bool pmFPAviewWriteJPEG(const pmFPAview *view, pmFPAfile *file)
+bool pmFPAviewWriteJPEG(const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(view, false);
@@ -39,5 +39,5 @@
 
     if (view->chip == -1) {
-        pmFPAWriteJPEG (fpa, view, file);
+        pmFPAWriteJPEG (fpa, view, file, config);
         return true;
     }
@@ -49,5 +49,5 @@
 
     if (view->cell == -1) {
-        pmChipWriteJPEG (chip, view, file);
+        pmChipWriteJPEG (chip, view, file, config);
         return true;
     }
@@ -59,5 +59,5 @@
 
     if (view->readout == -1) {
-        pmCellWriteJPEG (cell, view, file);
+        pmCellWriteJPEG (cell, view, file, config);
         return true;
     }
@@ -68,10 +68,10 @@
     pmReadout *readout = cell->readouts->data[view->readout];
 
-    pmReadoutWriteJPEG (readout, view, file);
+    pmReadoutWriteJPEG (readout, view, file, config);
     return true;
 }
 
 // read in all chip-level JPEG files for this FPA
-bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
+bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(fpa, false);
@@ -82,5 +82,5 @@
 
         pmChip *chip = fpa->chips->data[i];
-        pmChipWriteJPEG (chip, view, file);
+        pmChipWriteJPEG (chip, view, file, config);
     }
     return true;
@@ -88,5 +88,5 @@
 
 // read in all cell-level JPEG files for this chip
-bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
+bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(chip, false);
@@ -97,5 +97,5 @@
 
         pmCell *cell = chip->cells->data[i];
-        pmCellWriteJPEG (cell, view, file);
+        pmCellWriteJPEG (cell, view, file, config);
     }
     return true;
@@ -103,5 +103,5 @@
 
 // read in all readout-level JPEG files for this cell
-bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
+bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(cell, false);
@@ -112,5 +112,5 @@
 
         pmReadout *readout = cell->readouts->data[i];
-        pmReadoutWriteJPEG (readout, view, file);
+        pmReadoutWriteJPEG (readout, view, file, config);
     }
     return true;
@@ -118,5 +118,5 @@
 
 // read in all readout-level Objects files for this cell
-bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
+bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -178,4 +178,5 @@
 
     psString name = pmFPAfileNameFromRule (file->filerule, file, view);
+    psString newName = pmConfigConvertFilename (name, config);
     psString mapname = pmFPAfileNameFromRule (file->filextra, file, view);
     psImageJpegColormap *map = psImageJpegColormapSet (NULL, mapname);
@@ -185,5 +186,6 @@
     }
 
-    psImageJpeg (map, readout->image, name, min, max);
+    psImageJpeg (map, readout->image, newName, min, max);
+    psFree(newName);
     psFree(name);
     psFree(map);
Index: trunk/psModules/src/camera/pmFPA_JPEG.h
===================================================================
--- trunk/psModules/src/camera/pmFPA_JPEG.h	(revision 10417)
+++ trunk/psModules/src/camera/pmFPA_JPEG.h	(revision 10421)
@@ -7,6 +7,6 @@
 *  @author EAM, IfA
 *
-*  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-05-01 01:55:43 $
+*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-12-03 18:48:10 $
 *
 *  Copyright 2004-2005 Institute for Astronomy, University of Hawaii
@@ -19,9 +19,9 @@
 /// @{
 
-bool pmFPAviewWriteJPEG (const pmFPAview *view, pmFPAfile *file);
-bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
-bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
-bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
-bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);
+bool pmFPAviewWriteJPEG (const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmFPAWriteJPEG (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmChipWriteJPEG (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmCellWriteJPEG (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmReadoutWriteJPEG (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
 
 # endif
Index: trunk/psModules/src/camera/pmFPA_MANAPLOT.c
===================================================================
--- trunk/psModules/src/camera/pmFPA_MANAPLOT.c	(revision 10417)
+++ trunk/psModules/src/camera/pmFPA_MANAPLOT.c	(revision 10421)
@@ -5,6 +5,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-10-17 00:41:05 $
+ *  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-03 18:48:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -31,5 +31,5 @@
 
 
-bool pmFPAviewWriteMANAPLOT(const pmFPAview *view, pmFPAfile *file)
+bool pmFPAviewWriteMANAPLOT(const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(view, false);
@@ -39,5 +39,5 @@
 
     if (view->chip == -1) {
-        pmFPAWriteMANAPLOT (fpa, view, file);
+        pmFPAWriteMANAPLOT (fpa, view, file, config);
         return true;
     }
@@ -49,5 +49,5 @@
 
     if (view->cell == -1) {
-        pmChipWriteMANAPLOT (chip, view, file);
+        pmChipWriteMANAPLOT (chip, view, file, config);
         return true;
     }
@@ -59,5 +59,5 @@
 
     if (view->readout == -1) {
-        pmCellWriteMANAPLOT (cell, view, file);
+        pmCellWriteMANAPLOT (cell, view, file, config);
         return true;
     }
@@ -68,10 +68,10 @@
     pmReadout *readout = cell->readouts->data[view->readout];
 
-    pmReadoutWriteMANAPLOT (readout, view, file);
+    pmReadoutWriteMANAPLOT (readout, view, file, config);
     return true;
 }
 
 // read in all chip-level MANAPLOT files for this FPA
-bool pmFPAWriteMANAPLOT (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
+bool pmFPAWriteMANAPLOT (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(fpa, false);
@@ -82,5 +82,5 @@
 
         pmChip *chip = fpa->chips->data[i];
-        pmChipWriteMANAPLOT (chip, view, file);
+        pmChipWriteMANAPLOT (chip, view, file, config);
     }
     return true;
@@ -88,5 +88,5 @@
 
 // read in all cell-level MANAPLOT files for this chip
-bool pmChipWriteMANAPLOT (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
+bool pmChipWriteMANAPLOT (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(chip, false);
@@ -97,5 +97,5 @@
 
         pmCell *cell = chip->cells->data[i];
-        pmCellWriteMANAPLOT (cell, view, file);
+        pmCellWriteMANAPLOT (cell, view, file, config);
     }
     return true;
@@ -103,5 +103,5 @@
 
 // read in all readout-level MANAPLOT files for this cell
-bool pmCellWriteMANAPLOT (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
+bool pmCellWriteMANAPLOT (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(cell, false);
@@ -112,5 +112,5 @@
 
         pmReadout *readout = cell->readouts->data[i];
-        pmReadoutWriteMANAPLOT (readout, view, file);
+        pmReadoutWriteMANAPLOT (readout, view, file, config);
     }
     return true;
@@ -118,5 +118,5 @@
 
 // read in all readout-level Objects files for this cell
-bool pmReadoutWriteMANAPLOT (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
+bool pmReadoutWriteMANAPLOT (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     PS_ASSERT_PTR_NON_NULL(readout, false);
@@ -136,7 +136,16 @@
     // output : filerule
 
-    psString input = pmFPAfileNameFromRule (file->filextra, file, view);
-    psString output = pmFPAfileNameFromRule (file->filerule, file, view);
-    psString script = pmFPAfileNameFromRule (file->extname, file, view);
+    psString tmpName;
+    tmpName = pmFPAfileNameFromRule (file->filextra, file, view);
+    psString input = pmConfigConvertFilename (tmpName, config);
+    psFree (tmpName);
+
+    tmpName = pmFPAfileNameFromRule (file->filerule, file, view);
+    psString output = pmConfigConvertFilename (tmpName, config);
+    psFree (tmpName);
+
+    tmpName = pmFPAfileNameFromRule (file->extname, file, view);
+    psString script = pmConfigConvertFilename (tmpName, config);
+    psFree (tmpName);
 
     psString line = NULL;
Index: trunk/psModules/src/camera/pmFPA_MANAPLOT.h
===================================================================
--- trunk/psModules/src/camera/pmFPA_MANAPLOT.h	(revision 10417)
+++ trunk/psModules/src/camera/pmFPA_MANAPLOT.h	(revision 10421)
@@ -7,6 +7,6 @@
 *  @author EAM, IfA
 *
-*  @version $Revision: 1.1 $ $Name: not supported by cvs2svn $
-*  @date $Date: 2006-10-17 00:41:05 $
+*  @version $Revision: 1.2 $ $Name: not supported by cvs2svn $
+*  @date $Date: 2006-12-03 18:48:10 $
 *
 *  Copyright 2004-2005 Institute for Astronomy, University of Hawaii
@@ -19,9 +19,9 @@
 /// @{
 
-bool pmFPAviewWriteMANAPLOT (const pmFPAview *view, pmFPAfile *file);
-bool pmFPAWriteMANAPLOT (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
-bool pmChipWriteMANAPLOT (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
-bool pmCellWriteMANAPLOT (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
-bool pmReadoutWriteMANAPLOT (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);
+bool pmFPAviewWriteMANAPLOT (const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmFPAWriteMANAPLOT (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmChipWriteMANAPLOT (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmCellWriteMANAPLOT (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmReadoutWriteMANAPLOT (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
 
 # endif
Index: trunk/psModules/src/camera/pmFPAfileDefine.c
===================================================================
--- trunk/psModules/src/camera/pmFPAfileDefine.c	(revision 10417)
+++ trunk/psModules/src/camera/pmFPAfileDefine.c	(revision 10421)
@@ -277,7 +277,23 @@
     }
 
+    psString realName = pmConfigConvertFilename (infiles->data[0], config);
+    if (!realName) {
+        psError(PS_ERR_IO, false, "Failed to convert file name %s\n", (char *) infiles->data[0]);
+        return NULL;
+    }
+
     // load the header of the first image
-    fits = psFitsOpen (infiles->data[0], "r");
+    fits = psFitsOpen (realName, "r");
+    if (!fits) {
+        psError(PS_ERR_IO, false, "Failed to open file %s\n", realName);
+        psFree (realName);
+        return NULL;
+    }
     phu = psFitsReadHeader (NULL, fits);
+    if (!phu) {
+        psError(PS_ERR_IO, false, "Failed to read file header %s\n", realName);
+        psFree (realName);
+        return NULL;
+    }
     psFitsClose (fits);
 
@@ -286,6 +302,7 @@
     format = pmConfigCameraFormatFromHeader (config, phu);
     if (!format) {
-        psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", (char *)infiles->data[0]);
+        psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", realName);
         psFree(phu);
+        psFree (realName);
         return NULL;
     }
@@ -294,7 +311,9 @@
     fpa = pmFPAConstruct (config->camera);
     if (!fpa) {
-        psError(PS_ERR_IO, false, "Failed to construct FPA from %s", (char *)infiles->data[0]);
-        return NULL;
-    }
+        psError(PS_ERR_IO, false, "Failed to construct FPA from %s", realName);
+        psFree (realName);
+        return NULL;
+    }
+    psFree (realName);
 
     // load the given filerule (from config->camera) and bind it to the fpa
@@ -337,7 +356,28 @@
     for (int i = 0; i < infiles->n; i++) {
         if (i > 0) {
-            fits = psFitsOpen (infiles->data[i], "r");
+            psString realName = pmConfigConvertFilename (infiles->data[i], config);
+            if (!realName) {
+                psError(PS_ERR_IO, false, "Failed to convert file name %s", (char *) infiles->data[i]);
+                return NULL;
+            }
+            fits = psFitsOpen (realName, "r");
+            if (!fits) {
+                psError(PS_ERR_IO, false, "Failed to open file %s\n", realName);
+                psFree (realName);
+                return NULL;
+            }
             phu = psFitsReadHeader (NULL, fits);
-            pmConfigValidateCameraFormat (format, phu);
+            if (!phu) {
+                psError(PS_ERR_IO, false, "Failed to read file header %s", realName);
+                psFree (realName);
+                psFitsClose (fits);
+                return NULL;
+            }
+            if (!pmConfigValidateCameraFormat (format, phu)) {
+                psError(PS_ERR_IO, false, "file %s is not from the required camera", realName);
+                psFree (realName);
+                psFitsClose (fits);
+                return NULL;
+            }
             psFitsClose (fits);
         }
@@ -545,7 +585,7 @@
 
     // Prepend the global path to the file rule
-    if (config->workdir) {
-        psStringPrepend(&file->filerule, "%s/", config->workdir);
-    }
+    psString tmpName = pmConfigConvertFilename (file->filerule, config);
+    psFree (file->filerule);
+    file->filerule = tmpName;
 
     if (found) {
Index: trunk/psModules/src/camera/pmFPAfileIO.c
===================================================================
--- trunk/psModules/src/camera/pmFPAfileIO.c	(revision 10417)
+++ trunk/psModules/src/camera/pmFPAfileIO.c	(revision 10421)
@@ -210,15 +210,12 @@
         }
 
-        // XXXX this is very ad-hoc
-        // XXXX prepend the value config[WORKDIR] to the filename...
-        char *workdir = psMetadataLookupStr (NULL, config->site, "WORKDIR");
-        if (workdir) {
-            psStringPrepend (&file->filename, "%s/", workdir);
-        }
-
         psTrace ("pmFPAfile", 6, "got detrend file %s\n", file->filename);
         psFree (extra);
     }
-    // if () "neb://" -> get from neb...
+
+    // apply filename mangling rules (file://, path://, neb://, WORKDIR)
+    psString tmpName = pmConfigConvertFilename (file->filename, config);
+    psFree (file->filename);
+    file->filename = tmpName;
 
     switch (file->type) {
@@ -353,10 +350,10 @@
     case PM_FPA_FILE_CMP:
     case PM_FPA_FILE_CMF:
-        pmFPAviewReadObjects (view, file);
+        pmFPAviewReadObjects (view, file, config);
         psTrace ("pmFPAfile", 5, "reading %s (type: %d)\n", file->filename, file->type);
         break;
 
     case PM_FPA_FILE_PSF:
-        pmFPAviewReadPSFmodel (view, file);
+        pmFPAviewReadPSFmodel (view, file, config);
         psTrace ("pmFPAfile", 5, "reading %s (type: %d)\n", file->filename, file->type);
         break;
@@ -508,5 +505,5 @@
     case PM_FPA_FILE_CMF:
         psTrace ("pmFPAfile", 5, "writing object %s (fpa: %p)\n", file->filename, file->fpa);
-        if (!pmFPAviewWriteObjects (view, file)) {
+        if (!pmFPAviewWriteObjects (view, file, config)) {
             psError(PS_ERR_IO, false, "Failed to write object %s", file->filename);
             return false;
@@ -516,15 +513,15 @@
 
     case PM_FPA_FILE_PSF:
-        pmFPAviewWritePSFmodel (view, file);
+        pmFPAviewWritePSFmodel (view, file, config);
         psTrace ("pmFPAfile", 5, "wrote PSF %s (fpa: %p)\n", file->filename, file->fpa);
         break;
 
     case PM_FPA_FILE_JPEG:
-        pmFPAviewWriteJPEG (view, file);
+        pmFPAviewWriteJPEG (view, file, config);
         psTrace ("pmFPAfile", 5, "wrote JPEG %s (fpa: %p)\n", file->filename, file->fpa);
         break;
 
     case PM_FPA_FILE_MANAPLOT:
-        pmFPAviewWriteMANAPLOT (view, file);
+        pmFPAviewWriteMANAPLOT (view, file, config);
         psTrace ("pmFPAfile", 5, "wrote MANAPLOT %s (fpa: %p)\n", file->filename, file->fpa);
         break;
Index: trunk/psModules/src/config/pmConfig.c
===================================================================
--- trunk/psModules/src/config/pmConfig.c	(revision 10417)
+++ trunk/psModules/src/config/pmConfig.c	(revision 10421)
@@ -4,6 +4,6 @@
  *  @author EAM (IfA)
  *
- *  @version $Revision: 1.54 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-11-15 02:34:18 $
+ *  @version $Revision: 1.55 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-03 18:48:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -454,4 +454,5 @@
 
 
+// XXX aren't these (return false) below errors: call psError?
 bool pmConfigValidateCameraFormat(const psMetadata *cameraFormat, const psMetadata *header)
 {
@@ -463,5 +464,5 @@
     psMetadata *rule = psMetadataLookupMetadata(&mdStatus, cameraFormat, "RULE");
     if (! mdStatus || ! rule) {
-        psLogMsg(__func__, PS_LOG_WARN, "Unable to read rule for camera.\n");
+        psError(PS_ERR_UNKNOWN, true, "Unable to read rule for camera.\n");
         return false;
     }
@@ -472,9 +473,9 @@
     while ((ruleItem = psMetadataGetAndIncrement(ruleIter))) {
         // Check for the existence of the rule
-        psMetadataItem *headerItem = psMetadataLookup((psMetadata*)header, ruleItem->name);
+        psMetadataItem *headerItem = psMetadataLookup(header, ruleItem->name);
         if (! headerItem) {
             // It doesn't have a required header keyword, so it's not it
             psFree(ruleIter);
-            psTrace("psModules.config", 5, "Can't find %s\n", ruleItem->name);
+            psError(PS_ERR_UNKNOWN, true, "Can't find %s\n", ruleItem->name);
             return false;
         }
@@ -482,5 +483,5 @@
         // Check to see if the rule works
         if (! psMetadataItemCompare(headerItem, ruleItem)) {
-            psTrace("psModules.config", 5, "%s doesn't match.\n", ruleItem->name);
+            psError(PS_ERR_UNKNOWN, true, "%s doesn't match.\n", ruleItem->name);
             psFree(ruleIter);
             return false;
@@ -938,13 +939,14 @@
             glob (words->data[i], 0, NULL, &globList);
 
+            // if the glob does not match, save the literal word:
+            // otherwise save all glob matches
             if (globList.gl_pathc == 0) {
-                psError(PS_ERR_IO, true, "No match for %s", (char *)words->data[i]);
-                return input;
-            }
-
-            for (int j = 0; j < globList.gl_pathc; j++) {
-                char *filename = psStringCopy (globList.gl_pathv[j]);
-                psArrayAdd (input, 16, filename);
-                psFree (filename);
+                psArrayAdd (input, 16, words->data[i]);
+            } else {
+                for (int j = 0; j < globList.gl_pathc; j++) {
+                    char *filename = psStringCopy (globList.gl_pathv[j]);
+                    psArrayAdd (input, 16, filename);
+                    psFree (filename);
+                }
             }
         }
@@ -1008,2 +1010,61 @@
     return true;
 }
+
+// convert the supplied name, create a new output psString
+psString pmConfigConvertFilename (char *filename, pmConfig *config)
+{
+
+    psString newName = psStringCopy (filename);
+
+    // strip file:// from front of name
+    if (!strncasecmp (newName, "file://", strlen("file://"))) {
+        newName = psStringSubstitute (newName, "", "file://");
+    }
+
+    // replace path://PATH with matched datapath
+    if (!strncasecmp (newName, "path://", strlen("path://"))) {
+        // filename should be of the form: path://PATH/rest/of/file
+        // replace PATH with matching name from config->site:DATAPATH
+        psMetadata *datapath = psMetadataLookupPtr (NULL, config->site, "DATAPATH");
+        if (datapath == NULL) {
+            psError(PS_ERR_UNKNOWN, true, "DATAPATH is not defined in config.site");
+            psFree (newName);
+            return NULL;
+        }
+
+        char *point = newName + strlen("path://");
+        char *mark = strchr (point, '/');
+        if (mark == NULL) {
+            psError(PS_ERR_UNKNOWN, true, "syntax error in PATH-style name %s", newName);
+            psFree (newName);
+            return false;
+        }
+
+        psString path = psStringNCopy (point, mark - point);
+        char *realpath = psMetadataLookupStr (NULL, datapath, path);
+        if (realpath == NULL) {
+            psError(PS_ERR_UNKNOWN, true, "path (%s) not defined in config.site:DATAPATH for PATH-style name %s", path, newName);
+            psFree (newName);
+            psFree (path);
+            return false;
+        }
+        psFree (path);
+
+        char *tmpName = NULL;
+        psStringAppend (&tmpName, "%s/%s", realpath, mark + 1);
+        psFree (newName);
+        newName = tmpName;
+    }
+
+    // substitute neb://name with matched nebulous name
+
+    // if we still have a relative path, prepend WORKDIR:
+    if (newName[0] != '/') {
+        char *workdir = psMetadataLookupStr (NULL, config->site, "WORKDIR");
+        if (workdir) {
+            psStringPrepend (&newName, "%s/", workdir);
+        }
+    }
+
+    return newName;
+}
Index: trunk/psModules/src/config/pmConfig.h
===================================================================
--- trunk/psModules/src/config/pmConfig.h	(revision 10417)
+++ trunk/psModules/src/config/pmConfig.h	(revision 10421)
@@ -9,6 +9,6 @@
 /// @author Eugene Magnier, IfA
 ///
-/// @version $Revision: 1.18 $ $Name: not supported by cvs2svn $
-/// @date $Date: 2006-11-08 02:10:07 $
+/// @version $Revision: 1.19 $ $Name: not supported by cvs2svn $
+/// @date $Date: 2006-12-03 18:48:10 $
 ///
 /// Copyright 2005-2006 Institute for Astronomy, University of Hawaii
@@ -161,4 +161,6 @@
                        );
 
+// convert the supplied name, create a new output psString
+psString pmConfigConvertFilename (char *filename, pmConfig *config);
 
 #endif
Index: trunk/psModules/src/objects/pmPSF_IO.c
===================================================================
--- trunk/psModules/src/objects/pmPSF_IO.c	(revision 10417)
+++ trunk/psModules/src/objects/pmPSF_IO.c	(revision 10421)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-10-28 20:23:51 $
+ *  @version $Revision: 1.9 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-03 18:48:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -117,5 +117,5 @@
 }
 
-bool pmFPAviewWritePSFmodel (const pmFPAview *view, pmFPAfile *file)
+bool pmFPAviewWritePSFmodel (const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -123,5 +123,5 @@
 
     if (view->chip == -1) {
-        pmFPAWritePSFmodel (fpa, view, file);
+        pmFPAWritePSFmodel (fpa, view, file, config);
         return true;
     }
@@ -133,5 +133,5 @@
 
     if (view->cell == -1) {
-        pmChipWritePSFmodel (chip, view, file);
+        pmChipWritePSFmodel (chip, view, file, config);
         return true;
     }
@@ -143,5 +143,5 @@
 
     if (view->readout == -1) {
-        pmCellWritePSFmodel (cell, view, file);
+        pmCellWritePSFmodel (cell, view, file, config);
         return true;
     }
@@ -152,10 +152,10 @@
     pmReadout *readout = cell->readouts->data[view->readout];
 
-    pmReadoutWritePSFmodel (readout, view, file);
+    pmReadoutWritePSFmodel (readout, view, file, config);
     return true;
 }
 
 // read in all chip-level PSFmodel files for this FPA
-bool pmFPAWritePSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
+bool pmFPAWritePSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -163,5 +163,5 @@
 
         pmChip *chip = fpa->chips->data[i];
-        pmChipWritePSFmodel (chip, view, file);
+        pmChipWritePSFmodel (chip, view, file, config);
     }
     return true;
@@ -169,5 +169,5 @@
 
 // read in all cell-level PSFmodel files for this chip
-bool pmChipWritePSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
+bool pmChipWritePSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -175,5 +175,5 @@
 
         pmCell *cell = chip->cells->data[i];
-        pmCellWritePSFmodel (cell, view, file);
+        pmCellWritePSFmodel (cell, view, file, config);
     }
     return true;
@@ -181,5 +181,5 @@
 
 // read in all readout-level PSFmodel files for this cell
-bool pmCellWritePSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
+bool pmCellWritePSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -187,5 +187,5 @@
 
         pmReadout *readout = cell->readouts->data[i];
-        pmReadoutWritePSFmodel (readout, view, file);
+        pmReadoutWritePSFmodel (readout, view, file, config);
     }
     return true;
@@ -193,8 +193,9 @@
 
 // read in all readout-level Objects files for this cell
-bool pmReadoutWritePSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
+bool pmReadoutWritePSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     bool status;
     char *filename;
+    char *realname;
 
     pmPSF *psf = psMetadataLookupPtr (&status, readout->analysis, "PSPHOT.PSF");
@@ -203,7 +204,10 @@
     case PM_FPA_FILE_PSF:
         filename = pmFPAfileNameFromRule (file->filerule, file, view);
+        realname = pmConfigConvertFilename (filename, config);
+
         psMetadata *psfData = pmPSFtoMetadata (NULL, psf);
-        psMetadataConfigWrite (psfData, filename);
+        psMetadataConfigWrite (psfData, realname);
         psFree (psfData);
+        psFree (realname);
         psFree (filename);
         return true;
@@ -218,5 +222,5 @@
 
 
-bool pmFPAviewReadPSFmodel (const pmFPAview *view, pmFPAfile *file)
+bool pmFPAviewReadPSFmodel (const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -224,5 +228,5 @@
 
     if (view->chip == -1) {
-        pmFPAReadPSFmodel (fpa, view, file);
+        pmFPAReadPSFmodel (fpa, view, file, config);
         return true;
     }
@@ -234,5 +238,5 @@
 
     if (view->cell == -1) {
-        pmChipReadPSFmodel (chip, view, file);
+        pmChipReadPSFmodel (chip, view, file, config);
         return true;
     }
@@ -244,5 +248,5 @@
 
     if (view->readout == -1) {
-        pmCellReadPSFmodel (cell, view, file);
+        pmCellReadPSFmodel (cell, view, file, config);
         return true;
     }
@@ -253,10 +257,10 @@
     pmReadout *readout = cell->readouts->data[view->readout];
 
-    pmReadoutReadPSFmodel (readout, view, file);
+    pmReadoutReadPSFmodel (readout, view, file, config);
     return true;
 }
 
 // read in all chip-level PSFmodel files for this FPA
-bool pmFPAReadPSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
+bool pmFPAReadPSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -264,5 +268,5 @@
 
         pmChip *chip = fpa->chips->data[i];
-        pmChipReadPSFmodel (chip, view, file);
+        pmChipReadPSFmodel (chip, view, file, config);
     }
     return true;
@@ -270,5 +274,5 @@
 
 // read in all cell-level PSFmodel files for this chip
-bool pmChipReadPSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
+bool pmChipReadPSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -276,5 +280,5 @@
 
         pmCell *cell = chip->cells->data[i];
-        pmCellReadPSFmodel (cell, view, file);
+        pmCellReadPSFmodel (cell, view, file, config);
     }
     return true;
@@ -282,5 +286,5 @@
 
 // read in all readout-level PSFmodel files for this cell
-bool pmCellReadPSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
+bool pmCellReadPSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -288,5 +292,5 @@
 
         pmReadout *readout = cell->readouts->data[i];
-        pmReadoutReadPSFmodel (readout, view, file);
+        pmReadoutReadPSFmodel (readout, view, file, config);
     }
     return true;
@@ -294,15 +298,17 @@
 
 // read in all readout-level Objects files for this cell
-bool pmReadoutReadPSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
+bool pmReadoutReadPSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
     unsigned int Nfail;
     char *filename;
+    char *realname;
 
     switch (file->type) {
     case PM_FPA_FILE_PSF:
         filename = pmFPAfileNameFromRule (file->filerule, file, view);
-
-        psMetadata *psfData = psMetadataConfigRead(NULL, &Nfail, filename, FALSE);
+        realname = pmConfigConvertFilename (filename, config);
+
+        psMetadata *psfData = psMetadataConfigRead(NULL, &Nfail, realname, FALSE);
         pmPSF *psf = pmPSFfromMetadata (psfData);
         psMetadataAdd (readout->analysis, PS_LIST_TAIL, "PSPHOT.PSF", PS_DATA_UNKNOWN, "psphot psf", psf);
@@ -310,4 +316,5 @@
         psFree (psf);
         psFree (psfData);
+        psFree (realname);
         psFree (filename);
 
Index: trunk/psModules/src/objects/pmPSF_IO.h
===================================================================
--- trunk/psModules/src/objects/pmPSF_IO.h	(revision 10417)
+++ trunk/psModules/src/objects/pmPSF_IO.h	(revision 10421)
@@ -6,6 +6,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-10-13 21:15:45 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-03 18:48:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -18,15 +18,15 @@
 psMetadata *pmPSFtoMetadata (psMetadata *metadata, pmPSF *psf);
 pmPSF *pmPSFfromMetadata (psMetadata *metadata);
-bool pmFPAviewWritePSFmodel (const pmFPAview *view, pmFPAfile *file);
-bool pmFPAWritePSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
-bool pmChipWritePSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
-bool pmCellWritePSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
-bool pmReadoutWritePSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);
+bool pmFPAviewWritePSFmodel (const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmFPAWritePSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmChipWritePSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmCellWritePSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmReadoutWritePSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
 
-bool pmFPAviewReadPSFmodel (const pmFPAview *view, pmFPAfile *file);
-bool pmFPAReadPSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
-bool pmChipReadPSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
-bool pmCellReadPSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
-bool pmReadoutReadPSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);
+bool pmFPAviewReadPSFmodel (const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmFPAReadPSFmodel (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmChipReadPSFmodel (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmCellReadPSFmodel (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmReadoutReadPSFmodel (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
 
 # endif
Index: trunk/psModules/src/objects/pmSourceIO.c
===================================================================
--- trunk/psModules/src/objects/pmSourceIO.c	(revision 10417)
+++ trunk/psModules/src/objects/pmSourceIO.c	(revision 10421)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.13 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-10-14 00:53:56 $
+ *  @version $Revision: 1.14 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-03 18:48:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -60,5 +60,5 @@
 
 // Given a FITS file pointer, write the table of object data
-bool pmFPAviewWriteObjects (const pmFPAview *view, pmFPAfile *file)
+bool pmFPAviewWriteObjects (const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -66,5 +66,5 @@
 
     if (view->chip == -1) {
-        if (!pmFPAWriteObjects (fpa, view, file)) {
+        if (!pmFPAWriteObjects (fpa, view, file, config)) {
             psError(PS_ERR_IO, false, "Failed to write objects from fpa");
             return false;
@@ -80,5 +80,5 @@
 
     if (view->cell == -1) {
-        if (!pmChipWriteObjects (chip, view, file)) {
+        if (!pmChipWriteObjects (chip, view, file, config)) {
             psError(PS_ERR_IO, false, "Failed to write objects from chip");
             return false;
@@ -95,5 +95,5 @@
 
     if (view->readout == -1) {
-        if (!pmCellWriteObjects (cell, view, file)) {
+        if (!pmCellWriteObjects (cell, view, file, config)) {
             psError(PS_ERR_IO, false, "Failed to write objects from cell");
             return false;
@@ -110,5 +110,5 @@
     pmReadout *readout = cell->readouts->data[view->readout];
 
-    if (!pmReadoutWriteObjects (readout, view, file)) {
+    if (!pmReadoutWriteObjects (readout, view, file, config)) {
         psError(PS_ERR_IO, false, "Failed to write objects from readout %d", view->readout);
         return false;
@@ -119,5 +119,5 @@
 
 // read in all chip-level Objects files for this FPA
-bool pmFPAWriteObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
+bool pmFPAWriteObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -125,5 +125,5 @@
 
         pmChip *chip = fpa->chips->data[i];
-        if (!pmChipWriteObjects (chip, view, file)) {
+        if (!pmChipWriteObjects (chip, view, file, config)) {
             psError(PS_ERR_IO, false, "Failed to write %dth chip", i);
             return false;
@@ -134,5 +134,5 @@
 
 // read in all cell-level Objects files for this chip
-bool pmChipWriteObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
+bool pmChipWriteObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -140,5 +140,5 @@
 
         pmCell *cell = chip->cells->data[i];
-        if (!pmCellWriteObjects (cell, view, file)) {
+        if (!pmCellWriteObjects (cell, view, file, config)) {
             psError(PS_ERR_IO, false, "Failed to write %dth cell", i);
             return false;
@@ -149,5 +149,5 @@
 
 // read in all readout-level Objects files for this cell
-bool pmCellWriteObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
+bool pmCellWriteObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -155,5 +155,5 @@
 
         pmReadout *readout = cell->readouts->data[i];
-        if (!pmReadoutWriteObjects (readout, view, file)) {
+        if (!pmReadoutWriteObjects (readout, view, file, config)) {
             psError(PS_ERR_IO, false, "Failed to write %dth readout", i);
             return false;
@@ -164,8 +164,9 @@
 
 // read in all readout-level Objects files for this cell
-bool pmReadoutWriteObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
+bool pmReadoutWriteObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
     bool status;
+    char *realname;
     char *filename;
     char *dataname;
@@ -183,5 +184,7 @@
     case PM_FPA_FILE_RAW:
         filename = pmFPAfileNameFromRule (file->filerule, file, view);
-        pmSourcesWriteRAW (sources, filename);
+        realname = pmConfigConvertFilename (filename, config);
+        pmSourcesWriteRAW (sources, realname);
+        psFree (realname);
         psFree (filename);
         break;
@@ -189,5 +192,7 @@
     case PM_FPA_FILE_OBJ:
         filename = pmFPAfileNameFromRule (file->filerule, file, view);
-        pmSourcesWriteOBJ (sources, filename);
+        realname = pmConfigConvertFilename (filename, config);
+        pmSourcesWriteOBJ (sources, realname);
+        psFree (realname);
         psFree (filename);
         break;
@@ -195,5 +200,7 @@
     case PM_FPA_FILE_SX:
         filename = pmFPAfileNameFromRule (file->filerule, file, view);
-        pmSourcesWriteSX (sources, filename);
+        realname = pmConfigConvertFilename (filename, config);
+        pmSourcesWriteSX (sources, realname);
+        psFree (realname);
         psFree (filename);
         break;
@@ -203,4 +210,5 @@
         hdu = pmFPAviewThisHDU (view, file->fpa);
         filename = pmFPAfileNameFromRule (file->filerule, file, view);
+        realname = pmConfigConvertFilename (filename, config);
 
         // copy the header to an output header, add the output header data
@@ -219,6 +227,7 @@
         }
 
-        bool status = pmSourcesWriteCMP (sources, filename, outhead);
+        bool status = pmSourcesWriteCMP (sources, realname, outhead);
         psFree (outhead);
+        psFree (realname);
         psFree (filename);
 
@@ -310,10 +319,10 @@
 
 // Given a FITS file pointer, read the table of object data
-bool pmFPAviewReadObjects (const pmFPAview *view, pmFPAfile *file)
+bool pmFPAviewReadObjects (const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     pmFPA *fpa = file->fpa;
 
     if (view->chip == -1) {
-        pmFPAReadObjects (fpa, view, file);
+        pmFPAReadObjects (fpa, view, file, config);
         return true;
     }
@@ -325,5 +334,5 @@
 
     if (view->cell == -1) {
-        pmChipReadObjects (chip, view, file);
+        pmChipReadObjects (chip, view, file, config);
         return true;
     }
@@ -335,5 +344,5 @@
 
     if (view->readout == -1) {
-        pmCellReadObjects (cell, view, file);
+        pmCellReadObjects (cell, view, file, config);
         return true;
     }
@@ -344,14 +353,14 @@
     pmReadout *readout = cell->readouts->data[view->readout];
 
-    pmReadoutReadObjects (readout, view, file);
+    pmReadoutReadObjects (readout, view, file, config);
     return true;
 }
 
 // read in all chip-level Objects files for this FPA
-bool pmFPAReadObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file)
+bool pmFPAReadObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     for (int i = 0; i < fpa->chips->n; i++) {
         pmChip *chip = fpa->chips->data[i];
-        pmChipReadObjects (chip, view, file);
+        pmChipReadObjects (chip, view, file, config);
     }
     return true;
@@ -359,9 +368,9 @@
 
 // read in all cell-level Objects files for this chip
-bool pmChipReadObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file)
+bool pmChipReadObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     for (int i = 0; i < chip->cells->n; i++) {
         pmCell *cell = chip->cells->data[i];
-        pmCellReadObjects (cell, view, file);
+        pmCellReadObjects (cell, view, file, config);
     }
     return true;
@@ -369,5 +378,5 @@
 
 // read in all readout-level Objects files for this cell
-bool pmCellReadObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file)
+bool pmCellReadObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
     // determine the number of readouts:
@@ -384,5 +393,5 @@
     for (int i = 0; i < cell->readouts->n; i++) {
         pmReadout *readout = cell->readouts->data[i];
-        pmReadoutReadObjects (readout, view, file);
+        pmReadoutReadObjects (readout, view, file, config);
         cell->data_exists = true;
     }
@@ -391,5 +400,5 @@
 
 // read in all readout-level Objects files for this cell
-bool pmReadoutReadObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file)
+bool pmReadoutReadObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config)
 {
 
@@ -427,5 +436,8 @@
             psMemIncrRefCounter (file->filename);
         }
-        file->fits = psFitsOpen (file->filename, "r");
+
+        psString realname = pmConfigConvertFilename (file->filename, config);
+
+        file->fits = psFitsOpen (realname, "r");
         if (hdu->header != NULL) {
             psFree (hdu->header);
@@ -435,5 +447,6 @@
         file->fits = NULL;
 
-        sources = pmSourcesReadCMP (file->filename, hdu->header);
+        sources = pmSourcesReadCMP (realname, hdu->header);
+        psFree (realname);
         break;
 
Index: trunk/psModules/src/objects/pmSourceIO.h
===================================================================
--- trunk/psModules/src/objects/pmSourceIO.h	(revision 10417)
+++ trunk/psModules/src/objects/pmSourceIO.h	(revision 10421)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA; GLG, MHPCC
  *
- *  @version $Revision: 1.3 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-11-24 20:57:26 $
+ *  @version $Revision: 1.4 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-03 18:48:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -30,15 +30,15 @@
 bool pmPeaksWriteText (psArray *peaks, char *filename);
 
-bool pmFPAviewReadObjects (const pmFPAview *view, pmFPAfile *file);
-bool pmFPAReadObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
-bool pmChipReadObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
-bool pmCellReadObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
-bool pmReadoutReadObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);
+bool pmFPAviewReadObjects (const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmFPAReadObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmChipReadObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmCellReadObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmReadoutReadObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
 
-bool pmFPAviewWriteObjects (const pmFPAview *view, pmFPAfile *file);
-bool pmFPAWriteObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file);
-bool pmChipWriteObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file);
-bool pmCellWriteObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file);
-bool pmReadoutWriteObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file);
+bool pmFPAviewWriteObjects (const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmFPAWriteObjects (pmFPA *fpa, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmChipWriteObjects (pmChip *chip, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmCellWriteObjects (pmCell *cell, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
+bool pmReadoutWriteObjects (pmReadout *readout, const pmFPAview *view, pmFPAfile *file, pmConfig *config);
 
 # endif /* PM_SOURCE_IO_H */
Index: trunk/psModules/src/objects/pmSourceIO_RAW.c
===================================================================
--- trunk/psModules/src/objects/pmSourceIO_RAW.c	(revision 10417)
+++ trunk/psModules/src/objects/pmSourceIO_RAW.c	(revision 10421)
@@ -3,6 +3,6 @@
  *  @author EAM, IfA
  *
- *  @version $Revision: 1.11 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2006-11-24 20:57:26 $
+ *  @version $Revision: 1.12 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2006-12-03 18:48:10 $
  *
  *  Copyright 2004 Maui High Performance Computing Center, University of Hawaii
@@ -67,5 +67,5 @@
     f = fopen (filename, "w");
     if (f == NULL) {
-        psLogMsg (__func__, 3, "can't open output file for PSFs: %s\n", filename);
+        psLogMsg (__func__, 3, "can't open output file for PSF sources: %s\n", filename);
         return false;
     }
@@ -126,5 +126,5 @@
     f = fopen (filename, "w");
     if (f == NULL) {
-        psLogMsg ("pmModelWriteEXTs", 3, "can't open output file for moments%s\n", filename);
+        psLogMsg ("pmModelWriteEXTs", 3, "can't open output file for EXT sources: %s\n", filename);
         return false;
     }
@@ -185,5 +185,5 @@
     f = fopen (filename, "w");
     if (f == NULL) {
-        psLogMsg ("DumpObjects", 3, "can't open output file for moments%s\n", filename);
+        psLogMsg ("DumpObjects", 3, "can't open output file for NULL sources: %s\n", filename);
         return false;
     }
@@ -230,5 +230,5 @@
     f = fopen (filename, "w");
     if (f == NULL) {
-        psLogMsg ("pmMomentsWriteText", 3, "can't open output file for moments%s\n", filename);
+        psLogMsg ("pmMomentsWriteText", 3, "can't open output file for moments: %s\n", filename);
         return false;
     }
