Index: /trunk/dbconfig/tasks.md
===================================================================
--- /trunk/dbconfig/tasks.md	(revision 13605)
+++ /trunk/dbconfig/tasks.md	(revision 13606)
@@ -1,3 +1,3 @@
-# $Id: tasks.md,v 1.132 2007-03-22 01:10:12 jhoblitt Exp $
+# $Id: tasks.md,v 1.133 2007-06-04 02:26:09 eugene Exp $
 
 # this table records all exposure ID ever seen from the summit
@@ -116,4 +116,5 @@
     decl        F64         0.0
     exp_time    F32         0.0
+    sat_pixel_frac F32      0.0
     bg          F64         0.0
     bg_stdev    F64         0.0
@@ -142,4 +143,5 @@
     decl        F64         0.0
     exp_time    F32         0.0
+    sat_pixel_frac F32      0.0
     bg          F64         0.0
     bg_stdev    F64         0.0
Index: /trunk/ippScripts/scripts/register_exp.pl
===================================================================
--- /trunk/ippScripts/scripts/register_exp.pl	(revision 13605)
+++ /trunk/ippScripts/scripts/register_exp.pl	(revision 13606)
@@ -72,4 +72,5 @@
                            "ccd_temp", # CCD temperature
                            "exp_time", # Exposure time
+                           "sat_pixel_frac", # Fraction of saturated pixels
                            "airmass", # Airmass
                            "ra", # Right ascension
@@ -160,9 +161,9 @@
 if (0) {
 # XXX for a test, randomly declare a failure and return to pantasks
-my $rnd = rand(1);
-if ($rnd > 0.5) {
-    warn ("random failure");
-    &my_die ($exp_tag, $PS_EXIT_DATA_ERROR);
-}
+    my $rnd = rand(1);
+    if ($rnd > 0.5) {
+	warn ("random failure");
+	&my_die ($exp_tag, $PS_EXIT_DATA_ERROR);
+    }
 }
 
Index: /trunk/ippScripts/scripts/register_imfile.pl
===================================================================
--- /trunk/ippScripts/scripts/register_imfile.pl	(revision 13605)
+++ /trunk/ippScripts/scripts/register_imfile.pl	(revision 13606)
@@ -58,5 +58,5 @@
     and defined $uri;
 
-my $RECIPE = "PPSTATS_PHASE0"; # Recipe to use for ppStats
+my $RECIPE = "PPSTATS_REGISTER"; # Recipe to use for ppStats
 
 # These values should be constant for all components
@@ -79,6 +79,7 @@
 # The key is the name in the ppStats output; the value is the switch for "phase0 -updateexp"
 use constant VARIABLES => {
-    "CHIP.TEMP"    => "-ccd_temp", # CCD temperature
-    "CELL.EXPOSURE" => "-exp_time" # Exposure time
+    "CHIP.TEMP"      => "-ccd_temp", # CCD temperature
+    "CELL.EXPOSURE"  => "-exp_time", # Exposure time
+    "SAT_PIXEL_FRAC" => "-sat_pixel_frac" # fraction of saturated pixels
     };
 
Index: /trunk/ippTools/src/regtool.c
===================================================================
--- /trunk/ippTools/src/regtool.c	(revision 13605)
+++ /trunk/ippTools/src/regtool.c	(revision 13606)
@@ -892,4 +892,10 @@
     }
 
+    psF32 sat_pixel_frac = psMetadataLookupF32(&status, config->args, "-sat_pixel_frac");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -sat_pixel_frac");
+        return false;
+    }
+
     psF64 bg = psMetadataLookupF64(&status, config->args, "-bg");
     if (!status) {
@@ -977,4 +983,5 @@
         decl,
         exp_time,
+        sat_pixel_frac,
         bg,
         bg_stdev,
@@ -1046,4 +1053,10 @@
     }
 
+    psF32 sat_pixel_frac = psMetadataLookupF32(&status, config->args, "-sat_pixel_frac");
+    if (!status) {
+        psError(PS_ERR_UNKNOWN, false, "failed to lookup value for -sat_pixel_frac");
+        return false;
+    }
+
     psF64 bg = psMetadataLookupF64(&status, config->args, "-bg");
     if (!status) {
@@ -1126,4 +1139,5 @@
         decl,
         exp_time,
+        sat_pixel_frac,
         bg,
         bg_stdev,
Index: /trunk/ippTools/src/regtoolConfig.c
===================================================================
--- /trunk/ippTools/src/regtoolConfig.c	(revision 13605)
+++ /trunk/ippTools/src/regtoolConfig.c	(revision 13606)
@@ -79,4 +79,6 @@
     psMetadataAddF32(addprocessedimfileArgs, PS_LIST_TAIL, "-exp_time",  0,
         "define exposure time", NAN);
+    psMetadataAddF32(addprocessedimfileArgs, PS_LIST_TAIL, "-sat_pixel_frac",  0,
+        "define fraction of saturated pixels", NAN);
     psMetadataAddF64(addprocessedimfileArgs, PS_LIST_TAIL, "-bg",  0,
         "define exposue background", NAN);
@@ -160,4 +162,6 @@
     psMetadataAddF32(addprocessedexpArgs, PS_LIST_TAIL, "-exp_time",  0,
         "define exposure time", NAN);
+    psMetadataAddF32(addprocessedexpArgs, PS_LIST_TAIL, "-sat_pixel_frac",  0,
+        "define fraction of saturated pixels", NAN);
     psMetadataAddF64(addprocessedexpArgs, PS_LIST_TAIL, "-bg",  0,
         "define exposue background", NAN);
