Index: trunk/psModules/src/camera/pmFPAfileDefine.c
===================================================================
--- trunk/psModules/src/camera/pmFPAfileDefine.c	(revision 18567)
+++ trunk/psModules/src/camera/pmFPAfileDefine.c	(revision 18908)
@@ -24,8 +24,8 @@
 
 # define FPA_TEST_ASSERT(A){ \
-	assert(A->format == NULL); \
-	assert(A->formatName == NULL); \
-	assert(A->filerule == NULL); \
-	assert(A->filesrc == NULL); }
+        assert(A->format == NULL); \
+        assert(A->formatName == NULL); \
+        assert(A->filerule == NULL); \
+        assert(A->filesrc == NULL); }
 
 // Parse an option from a metadata, returning the appropriate integer value
@@ -164,5 +164,5 @@
     } else {
         bool mdok;                      // Status of MD lookup
-        psMetadata *cameras = psMetadataLookupMetadata(&mdok, config->complete, "CAMERAS"); // Known cameras
+        psMetadata *cameras = psMetadataLookupMetadata(&mdok, config->system, "CAMERAS"); // Known cameras
         if (!mdok || !cameras) {
             psError(PS_ERR_UNEXPECTED_NULL, true, "Unable to find CAMERAS in the system configuration.\n");
@@ -486,6 +486,6 @@
         psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", realName);
         psFree(phu);
-	psFree(camera);
-	psFree(formatName);
+        psFree(camera);
+        psFree(formatName);
         psFree(realName);
         return NULL;
@@ -498,6 +498,6 @@
         psError(PS_ERR_IO, false, "Failed to construct FPA from %s", realName);
         psFree(phu);
-	psFree(camera);
-	psFree(formatName);
+        psFree(camera);
+        psFree(formatName);
         psFree(realName);
         psFree(format);
@@ -513,10 +513,10 @@
         psError(PS_ERR_IO, false, "file %s not defined\n", filename);
         psFree(phu);
-	psFree(formatName);
+        psFree(formatName);
         psFree(format);
         psFree(fpa);
         return NULL;
     }
-    psFree (file->filerule); // this is set in pmFPAfileDefineInput 
+    psFree (file->filerule); // this is set in pmFPAfileDefineInput
     file->format = format;
     file->formatName = formatName;
@@ -534,8 +534,8 @@
 
     if (file->type == PM_FPA_FILE_MASK) {
-	if (!pmConfigMaskReadHeader (config, phu)) {
-	    psError(PS_ERR_IO, false, "error in mask bits");
-	    return NULL;
-	}
+        if (!pmConfigMaskReadHeader (config, phu)) {
+            psError(PS_ERR_IO, false, "error in mask bits");
+            return NULL;
+        }
     }
 
@@ -549,6 +549,6 @@
             if (!realName) {
                 psError(PS_ERR_IO, false, "Failed to convert file name %s", (char *) infiles->data[i]);
-		psFree(phu);
-		psFree(fpa);
+                psFree(phu);
+                psFree(fpa);
                 return NULL;
             }
@@ -558,6 +558,6 @@
                 psError(PS_ERR_IO, false, "Failed to open file %s\n", realName);
                 psFree(realName);
-		psFree(phu);
-		psFree(fpa);
+                psFree(phu);
+                psFree(fpa);
                 return NULL;
             }
@@ -567,6 +567,6 @@
                 psFree(realName);
                 psFitsClose(fits);
-		psFree(phu);
-		psFree(fpa);
+                psFree(phu);
+                psFree(fpa);
                 return NULL;
             }
@@ -576,6 +576,6 @@
                 psFree(realName);
                 psFitsClose(fits);
-		psFree(phu);
-		psFree(fpa);
+                psFree(phu);
+                psFree(fpa);
                 return NULL;
             }
@@ -584,6 +584,6 @@
                 psFree(realName);
                 psFitsClose(fits);
-		psFree(phu);
-		psFree(fpa);
+                psFree(phu);
+                psFree(fpa);
                 return NULL;
             }
@@ -744,10 +744,10 @@
         psMetadataAddStr (file->names, PS_LIST_TAIL, name, 0, "", infiles->data[i]);
 
-	if ((i == 0) && (file->type == PM_FPA_FILE_MASK)) {
-	    if (!pmConfigMaskReadHeader (config, phu)) {
-		psError(PS_ERR_IO, false, "error in mask bits");
-		return NULL;
-	    }
-	}
+        if ((i == 0) && (file->type == PM_FPA_FILE_MASK)) {
+            if (!pmConfigMaskReadHeader (config, phu)) {
+                psError(PS_ERR_IO, false, "error in mask bits");
+                return NULL;
+            }
+        }
 
         psFree(view);
@@ -819,6 +819,6 @@
         psError(PS_ERR_IO, false, "Failed to read CCD format from %s\n", (char *)infiles->data[0]);
         psFree(phu);
-	psFree(camera);
-	psFree(formatName);
+        psFree(camera);
+        psFree(formatName);
         return NULL;
     }
@@ -829,6 +829,6 @@
         psError(PS_ERR_IO, false, "Failed to construct FPA from %s", (char *)infiles->data[0]);
         psFree(phu);
-	psFree(camera);
-	psFree(formatName);
+        psFree(camera);
+        psFree(formatName);
         psFree(format);
         return NULL;
@@ -863,8 +863,8 @@
 
     if (file->type == PM_FPA_FILE_MASK) {
-	if (!pmConfigMaskReadHeader (config, phu)) {
-	    psError(PS_ERR_IO, false, "error in mask bits");
-	    return NULL;
-	}
+        if (!pmConfigMaskReadHeader (config, phu)) {
+            psError(PS_ERR_IO, false, "error in mask bits");
+            return NULL;
+        }
     }
 
