Index: trunk/ppImage/src/ppImageDetrendReadout.c
===================================================================
--- trunk/ppImage/src/ppImageDetrendReadout.c	(revision 7522)
+++ trunk/ppImage/src/ppImageDetrendReadout.c	(revision 7531)
@@ -39,9 +39,11 @@
 
     // Bias, dark and overscan subtraction are all merged.
-    ppImageDetrendBias(input, bias, dark, options);
+    if (options->doBias || options->doDark) {
+	ppImageDetrendBias(input, bias, dark, options);
+    }
 
     // Flat-field correction (no options used?)
     if (options->doFlat) {
-        pmReadout *flat = pmFPAfileThisReadout (config->files, detview, "PPIMAGE.FLAT");
+	pmReadout *flat = pmFPAfileThisReadout (config->files, detview, "PPIMAGE.FLAT");
         pmFlatField(input, flat);
     }
@@ -50,7 +52,2 @@
     return true;
 }
-
-    // XXX in psphot, the recipe options are parsed at this depth
-    // XXX consider if we move ppImageOptions in here
-    // psMetadata *recipe  = psMetadataLookupPtr (&status, config->recipes, "PSPHOT");
-
