Index: trunk/ppMerge/src/ppMergeFiles.c
===================================================================
--- trunk/ppMerge/src/ppMergeFiles.c	(revision 21244)
+++ trunk/ppMerge/src/ppMergeFiles.c	(revision 21365)
@@ -6,6 +6,6 @@
  *
  *  @author IfA
- *  @version $Revision: 1.7 $ $Name: not supported by cvs2svn $
- *  @date $Date: 2009-02-01 21:43:05 $
+ *  @version $Revision: 1.8 $ $Name: not supported by cvs2svn $
+ *  @date $Date: 2009-02-06 02:44:31 $
  *  Copyright 2009 Institute for Astronomy, University of Hawaii
  */
@@ -13,9 +13,9 @@
 #include "ppMerge.h"
 
-const char *allFiles[] = { "PPMERGE.INPUT", "PPMERGE.INPUT.MASK", "PPMERGE.INPUT.WEIGHT",
+const char *allFiles[] = { "PPMERGE.INPUT", "PPMERGE.INPUT.MASK", "PPMERGE.INPUT.VARIANCE",
                            "PPMERGE.OUTPUT", "PPMERGE.OUTPUT.COUNT", "PPMERGE.OUTPUT.SIGMA",
-                           NULL };      ///< All files
-const char *inputFiles[] = { "PPMERGE.INPUT", "PPMERGE.INPUT.MASK", "PPMERGE.INPUT.WEIGHT",
-                             NULL };    ///< Input files
+                           NULL };      // All files
+const char *inputFiles[] = { "PPMERGE.INPUT", "PPMERGE.INPUT.MASK", "PPMERGE.INPUT.VARIANCE",
+                             NULL };    // Input files
 const char *outputFiles[] = { "PPMERGE.OUTPUT", "PPMERGE.OUTPUT.COUNT", "PPMERGE.OUTPUT.SIGMA",
                               NULL };   ///< Output files
@@ -51,8 +51,8 @@
         }
     }
-    if (psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS")) {
-        pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT.WEIGHT", num);
-        if (!pmReadoutReadChunkWeight(readout, file->fits, 0, rows, 0, config)) {
-            psError(PS_ERR_UNKNOWN, false, "Unable to read readout weight.");
+    if (psMetadataLookupBool(&mdok, config->arguments, "INPUTS.VARIANCES")) {
+        pmFPAfile *file = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT.VARIANCE", num);
+        if (!pmReadoutReadChunkVariance(readout, file->fits, 0, rows, 0, config)) {
+            psError(PS_ERR_UNKNOWN, false, "Unable to read readout variance.");
             return false;
         }
@@ -91,9 +91,10 @@
         psFree(fileView);
     }
-    if (psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS")) {
-        pmFPAfile *weight = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT.WEIGHT", num); // Weight file
-        pmFPAview *fileView = pmFPAviewForLevel(weight->fileLevel, view);
-        if (!pmFPAfileOpen(weight, fileView, config)) {
-            psError(PS_ERR_UNKNOWN, false, "Unable to open weight file %d", num);
+    if (psMetadataLookupBool(&mdok, config->arguments, "INPUTS.VARIANCES")) {
+        pmFPAfile *variance = pmFPAfileSelectSingle(config->files, "PPMERGE.INPUT.VARIANCE",
+                                                    num); // Variance file
+        pmFPAview *fileView = pmFPAviewForLevel(variance->fileLevel, view);
+        if (!pmFPAfileOpen(variance, fileView, config)) {
+            psError(PS_ERR_UNKNOWN, false, "Unable to open variance file %d", num);
             psFree(fileView);
             return false;
@@ -127,5 +128,5 @@
     bool mdok;                          // Status of MD lookup
     bool haveMasks = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.MASKS"); // Do we have masks?
-    bool haveWeights = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS"); // Got weights?
+    bool haveVariances = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.VARIANCES"); // Got variances?
 
     const char **fileList = selectFiles(files); // Files to activate
@@ -134,5 +135,5 @@
             continue;
         }
-        if (!haveWeights && strcmp(fileList[i], "PPMERGE.INPUT.WEIGHT") == 0) {
+        if (!haveVariances && strcmp(fileList[i], "PPMERGE.INPUT.VARIANCE") == 0) {
             continue;
         }
@@ -163,5 +164,5 @@
     bool mdok;                          // Status of MD lookup
     bool haveMasks = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.MASKS"); // Do we have masks?
-    bool haveWeights = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.WEIGHTS"); // Got weights?
+    bool haveVariances = psMetadataLookupBool(&mdok, config->arguments, "INPUTS.VARIANCES"); // Got variances?
 
     psList *list = psListAlloc(NULL);   // List of files
@@ -171,5 +172,5 @@
             continue;
         }
-        if (!haveWeights && strcmp(fileList[i], "PPMERGE.INPUT.WEIGHT") == 0) {
+        if (!haveVariances && strcmp(fileList[i], "PPMERGE.INPUT.VARIANCE") == 0) {
             continue;
         }
