Index: trunk/psphot/src/psphotSetup.c
===================================================================
--- trunk/psphot/src/psphotSetup.c	(revision 4954)
+++ trunk/psphot/src/psphotSetup.c	(revision 5049)
@@ -5,11 +5,11 @@
 //   apply X/Y border info
 //   apply the SATURATE mask?
-// load or construct the noise 
+// load or construct the weight 
 
-psImageData *psphotSetup (psMetadata *config) 
+eamReadout *psphotSetup (psMetadata *config) 
 {
     psMetadata *header = NULL;
     psImage *image = NULL;
-    psImage *noise = NULL;
+    psImage *weight = NULL;
     psImage *mask = NULL;
     psRegion region = {0,0,0,0};	// a region representing the entire array
@@ -39,17 +39,18 @@
     psMetadataAdd (config, PS_LIST_TAIL, "GAIN",    PS_META_F32 | PS_META_REPLACE, "gain value used", GAIN);
 
-    // load the noise image if it is supplied, otherwise build from input
-    char *noiseName = psMetadataLookupPtr (&status, config, "NOISE");
+    // load the weight image if it is supplied, otherwise build from input
+    // by 'weight' we really mean variance image
+    char *weightName = psMetadataLookupPtr (&status, config, "WEIGHT");
     if (status == true) {
-	file = psFitsAlloc (noiseName);
-	noise = psFitsReadImage  (NULL, file, region, 0);
+	file = psFitsAlloc (weightName);
+	weight = psFitsReadImage  (NULL, file, region, 0);
 	psFree (file);
-	// psFree (noiseName); XXX - see psFree (input)
+	// psFree (weightName); XXX - see psFree (input)
     } else {
-	// build the noise image from the input image, RDNOISE, and GAIN
-	noise = psImageAlloc (image->numCols, image->numRows, PS_TYPE_F32);
+	// build the weight image from the input image, RDNOISE, and GAIN
+	weight = psImageAlloc (image->numCols, image->numRows, PS_TYPE_F32);
 	for (int iy = 0; iy < image->numRows; iy++) {
 	    for (int ix = 0; ix < image->numCols; ix++) {
-		noise->data.F32[iy][ix] = image->data.F32[iy][ix] / GAIN + PS_SQR(RDNOISE/GAIN);
+		weight->data.F32[iy][ix] = image->data.F32[iy][ix] / GAIN + PS_SQR(RDNOISE/GAIN);
 	    }
 	}
@@ -92,5 +93,5 @@
 
     // save the image data & return it
-    psImageData *imdata = psImageDataAlloc(image, noise, mask, header);
+    eamReadout *imdata = eamReadoutAlloc(image, weight, mask, header);
     return (imdata);
 }
