Index: trunk/ppMerge/src/ppMergeScaleZero.c
===================================================================
--- trunk/ppMerge/src/ppMergeScaleZero.c	(revision 13957)
+++ trunk/ppMerge/src/ppMergeScaleZero.c	(revision 16842)
@@ -25,5 +25,5 @@
     assert(config);
 
-    if (!options->scale && !options->zero && !options->darktime && !options->shutter) {
+    if (!options->scale && !options->zero && !options->shutter) {
         return true;                    // We did everything we were asked for
     }
@@ -151,10 +151,6 @@
     psStats *bgStats = psStatsAlloc(options->mean); // Statistic to measure the background
     psVector *gains = NULL;             // The gains for each cell
-    psImage *darktime = NULL;           // The dark time for each integration of each cell
     if (options->scale) {
         gains = psVectorAlloc(data->numCells, PS_TYPE_F32);
-    }
-    if (options->darktime) {
-        darktime = psImageAlloc(data->numCells, filenames->n, PS_TYPE_F32);
     }
 
@@ -187,42 +183,4 @@
                 if (!pmCellReadHeader(cell, inFile)) {
                     continue;
-                }
-
-                // Normalising by the exposure time
-                if (options->darktime) {
-                    darktime->data.F32[i][cellNum] = psMetadataLookupF32(NULL, cell->concepts,
-                                                                         "CELL.DARKTIME");
-                    if (isnan(darktime->data.F32[i][cellNum])) {
-                        psWarning("CELL.DARKTIME for file %s chip %d cell %d is not set.\n", name, j, k);
-                        status = false;
-                    } else {
-                        view->chip = j;
-                        view->cell = k;
-
-			// This step applies the dark exptime / background relationship: F =
-			// polymomial(exptime).  Below, the input images are scaled by the
-			// output of this relationship.
-
-			// For devices with linear dark and no residual bias, this relationship
-			// is not defined in the configuration system, and the transformation
-			// is defined (when loaded by the concepts) to be F = exptime.  Thus,
-			// in this case, the resulting dark image consists of counts/sec.
-
-			// For devices with a different relationship, the transformation yields
-			// the expected number of counts in the given exposure, based on the
-			// recorded exptime.  Thus, in this case, the resulting dark image
-			// should have a median value of 1.0.
-
-			// note that these corrections must be applied differently when used to
-			// correct a science image.  
-
-                        darktime->data.F32[i][cellNum] = pmFPADarkNorm(fpa, view,
-                                                                       darktime->data.F32[i][cellNum]);
-                        if (isnan(darktime->data.F32[i][cellNum])) {
-                            psWarning("Cannot get dark normalisation for file %s chip %d cell %d.\n",
-                                      name, j, k);
-                            status = false;
-                        }
-                    }
                 }
 
@@ -355,13 +313,4 @@
     }
 
-    if (options->darktime) {
-        if (!options->scale) {
-            // Copy over the exposure times
-            *scales = psImageCopy(*scales, darktime, PS_TYPE_F32);
-        } else {
-            *scales = (psImage*)psBinaryOp(*scales, *scales, "*", darktime);
-        }
-    }
-
     if (options->zero) {
         if (!*zeros) {
