Index: /trunk/psphot/src/psphotArguments.c
===================================================================
--- /trunk/psphot/src/psphotArguments.c	(revision 21457)
+++ /trunk/psphot/src/psphotArguments.c	(revision 21458)
@@ -33,10 +33,10 @@
     if ((N = psArgumentGet(argc, argv, "-threads"))) {
         psArgumentRemove(N, &argc, argv);
-	int nThreads = atoi(argv[N]);
+        int nThreads = atoi(argv[N]);
         psMetadataAddS32(config->arguments, PS_LIST_TAIL, "NTHREADS", 0, "number of psphot threads", nThreads);
         psArgumentRemove(N, &argc, argv);
 
-	// create the thread pool with number of desired threads, supplying our thread launcher function
-	psThreadPoolInit (nThreads);
+        // create the thread pool with number of desired threads, supplying our thread launcher function
+        psThreadPoolInit (nThreads);
     }
     psphotSetThreads();
@@ -82,6 +82,6 @@
     if ((N = psArgumentGet (argc, argv, "-visual"))) {
         psArgumentRemove (N, &argc, argv);
-	psphotSetVisual (true);
-	// pmSourceSetVisual (true);
+        psphotSetVisual (true);
+        // pmSourceSetVisual (true);
     }
 
@@ -118,5 +118,5 @@
     //
     pmConfigFileSetsMD (config->arguments, &argc, argv, "MASK",   "-mask",   "-masklist");
-    pmConfigFileSetsMD (config->arguments, &argc, argv, "WEIGHT", "-weight", "-weightlist");
+    pmConfigFileSetsMD (config->arguments, &argc, argv, "VARIANCE", "-variance", "-variancelist");
     pmConfigFileSetsMD (config->arguments, &argc, argv, "PSPHOT.PSF", "-psf", "-psflist");
     pmConfigFileSetsMD (config->arguments, &argc, argv, "SRC",    "-src",    "-srclist");
Index: /trunk/psphot/src/psphotImageLoop.c
===================================================================
--- /trunk/psphot/src/psphotImageLoop.c	(revision 21457)
+++ /trunk/psphot/src/psphotImageLoop.c	(revision 21458)
@@ -16,74 +16,74 @@
     pmFPAfile *load = psMetadataLookupPtr (&status, config->files, "PSPHOT.LOAD");
     if (!status) {
-	psError(PSPHOT_ERR_PROG, false, "Can't find input data!");
-	return false;
+        psError(PSPHOT_ERR_PROG, false, "Can't find input data!");
+        return false;
     }
     pmFPAfile *input = psMetadataLookupPtr (&status, config->files, "PSPHOT.INPUT");
     if (!status) {
-	psError(PSPHOT_ERR_PROG, false, "Can't find input data!");
-	return false;
+        psError(PSPHOT_ERR_PROG, false, "Can't find input data!");
+        return false;
     }
 
     pmFPAview *view = pmFPAviewAlloc (0);
-    
+
     // files associated with the science image
     if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE ("failed input for fpa in psphot.");
 
-    // for psphot, we force data to be read at the chip level 
+    // for psphot, we force data to be read at the chip level
     while ((chip = pmFPAviewNextChip (view, load->fpa, 1)) != NULL) {
         psLogMsg ("psphot", 4, "Chip %d: %x %x\n", view->chip, chip->file_exists, chip->process);
         if (! chip->process || ! chip->file_exists) { continue; }
 
-	// load just the input image data (image, mask, weight)
-	pmFPAfileActivate (config->files, false, NULL);
-	pmFPAfileActivate (config->files, true, "PSPHOT.LOAD");
-	pmFPAfileActivate (config->files, true, "PSPHOT.MASK");
-	pmFPAfileActivate (config->files, true, "PSPHOT.WEIGHT");
-	if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE ("failed input for Chip in psphot.");
+        // load just the input image data (image, mask, weight)
+        pmFPAfileActivate (config->files, false, NULL);
+        pmFPAfileActivate (config->files, true, "PSPHOT.LOAD");
+        pmFPAfileActivate (config->files, true, "PSPHOT.MASK");
+        pmFPAfileActivate (config->files, true, "PSPHOT.VARIANCE");
+        if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE ("failed input for Chip in psphot.");
 
-	// mosaic the cells of a chip into a single contiguous (trimmed) chip
+        // mosaic the cells of a chip into a single contiguous (trimmed) chip
         if (!psphotMosaicChip(config, view, "PSPHOT.INPUT", "PSPHOT.LOAD")) ESCAPE ("Unable to mosaic chip.");
 
-	// try to load other supporting data (PSF, SRC, etc).
-	// do not re-load the following three files
-	pmFPAfileActivate (config->files, true, NULL);
-	pmFPAfileActivate (config->files, false, "PSPHOT.LOAD");
-	pmFPAfileActivate (config->files, false, "PSPHOT.MASK");
-	pmFPAfileActivate (config->files, false, "PSPHOT.WEIGHT");
-	if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE ("failed input for Chip in psphot.");
+        // try to load other supporting data (PSF, SRC, etc).
+        // do not re-load the following three files
+        pmFPAfileActivate (config->files, true, NULL);
+        pmFPAfileActivate (config->files, false, "PSPHOT.LOAD");
+        pmFPAfileActivate (config->files, false, "PSPHOT.MASK");
+        pmFPAfileActivate (config->files, false, "PSPHOT.VARIANCE");
+        if (!pmFPAfileIOChecks (config, view, PM_FPA_BEFORE)) ESCAPE ("failed input for Chip in psphot.");
 
-	// re-activate files so they will be closed and freed below
-	pmFPAfileActivate (config->files, true, NULL);
+        // re-activate files so they will be closed and freed below
+        pmFPAfileActivate (config->files, true, NULL);
 
-	// there is now only a single chip (multiple readouts?). loop over it and process
-	while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
+        // there is now only a single chip (multiple readouts?). loop over it and process
+        while ((cell = pmFPAviewNextCell (view, input->fpa, 1)) != NULL) {
             psLogMsg ("psphot", 5, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
 
-	    // process each of the readouts
-	    while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
-		psLogMsg ("psphot", 6, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
-		if (! readout->data_exists) { continue; }
+            // process each of the readouts
+            while ((readout = pmFPAviewNextReadout (view, input->fpa, 1)) != NULL) {
+                psLogMsg ("psphot", 6, "Cell %d: %x %x\n", view->cell, cell->file_exists, cell->process);
+                if (! readout->data_exists) { continue; }
 
-		// run the actual photometry analysis on this chip/cell/readout
-		if (!psphotReadout (config, view)) {
-		    psError(psErrorCodeLast(), false, "failure in psphotReadout for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout);
-		    psFree (view);
-		    return false;
-		}
-	    }
+                // run the actual photometry analysis on this chip/cell/readout
+                if (!psphotReadout (config, view)) {
+                    psError(psErrorCodeLast(), false, "failure in psphotReadout for chip %d, cell %d, readout %d\n", view->chip, view->cell, view->readout);
+                    psFree (view);
+                    return false;
+                }
+            }
 
-	    status = true;
-	    status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL");
-	    status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL.STDEV");
-	    status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKGND");
-	    if (!status) {
-		psError(PSPHOT_ERR_PROG, false, "trouble dropping internal files");
-		psFree (view);
-		return false;
-	    }
-	}
+            status = true;
+            status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL");
+            status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKMDL.STDEV");
+            status &= pmFPAfileDropInternal (config->files, "PSPHOT.BACKGND");
+            if (!status) {
+                psError(PSPHOT_ERR_PROG, false, "trouble dropping internal files");
+                psFree (view);
+                return false;
+            }
+        }
 
-	// save output which is saved at the chip level
-	if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE ("failed output for Chip in psphot.");
+        // save output which is saved at the chip level
+        if (!pmFPAfileIOChecks (config, view, PM_FPA_AFTER)) ESCAPE ("failed output for Chip in psphot.");
     }
     // save output which is saved at the fpa level
@@ -108,4 +108,4 @@
 
 // PSPHOT.MASK
-// PSPHOT.WEIGHT
-// 
+// PSPHOT.VARIANCE
+//
Index: /trunk/psphot/src/psphotParseCamera.c
===================================================================
--- /trunk/psphot/src/psphotParseCamera.c	(revision 21457)
+++ /trunk/psphot/src/psphotParseCamera.c	(revision 21458)
@@ -15,5 +15,5 @@
     load->dataLevel = PM_FPA_LEVEL_CHIP; // force load at the CHIP level
 
-    // if MASK or WEIGHT was supplied on command line, bind files to 'load'
+    // if MASK or VARIANCE was supplied on command line, bind files to 'load'
     // the mask and weight will be mosaicked with the image
     pmFPAfileBindFromArgs (&status, load, config, "PSPHOT.MASK", "MASK");
@@ -27,5 +27,5 @@
     }
 
-    pmFPAfileBindFromArgs (&status, load, config, "PSPHOT.WEIGHT", "WEIGHT");
+    pmFPAfileBindFromArgs (&status, load, config, "PSPHOT.VARIANCE", "VARIANCE");
     if (!status) {
         psError (PS_ERR_UNKNOWN, false, "failed to load find definition");
