Index: /trunk/ippScripts/scripts/ipp_cleanup.pl
===================================================================
--- /trunk/ippScripts/scripts/ipp_cleanup.pl	(revision 25836)
+++ /trunk/ippScripts/scripts/ipp_cleanup.pl	(revision 25837)
@@ -190,5 +190,5 @@
 	    # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same.
 	    my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool";
-	    $command = "$magicdstool -dbname gpc1  -stage $stage -stage_id $stage_id -updaterun -set_state goto_purged";
+	    $command = "$magicdstool -dbname gpc1  -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned";
 	    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 		run(command => $command, verbose => $verbose);
@@ -309,5 +309,5 @@
 	# Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same.
 	my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool";
-	$command = "$magicdstool -dbname gpc1 -stage $stage -stage_id $stage_id -updaterun -set_state goto_purged";
+	$command = "$magicdstool -dbname gpc1 -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned";
 	( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 	    run(command => $command, verbose => $verbose);
@@ -444,5 +444,5 @@
 	    # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same.
 	    my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool";
-	    $command = "$magicdstool -dbname gpc1 -stage $stage -stage_id $stage_id -updaterun -set_state goto_purged";
+	    $command = "$magicdstool -dbname gpc1 -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned";
 	    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 		run(command => $command, verbose => $verbose);
@@ -580,5 +580,5 @@
 	    # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same.
 	    my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool";
-	    $command = "$magicdstool -dbname gpc1  -stage $stage -stage_id $stage_id -updaterun -set_state goto_purged";
+	    $command = "$magicdstool -dbname gpc1  -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned";
 	    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 		run(command => $command, verbose => $verbose);
@@ -732,5 +732,5 @@
 	    # Tell magicdstool that we've cleaned up this data, so it needs to do the same if it needs to do the same.
 	    my $magicdstool = can_run('magicdstool') or die "Can't find magicdstool";
-	    $command = "$magicdstool -dbname gpc1 -stage $stage -stage_id $stage_id -updaterun -set_state goto_purged";
+	    $command = "$magicdstool -dbname gpc1 -stage $stage -stage_id $stage_id -updaterun -set_state goto_cleaned";
 	    ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
 		run(command => $command, verbose => $verbose);
Index: /trunk/ippScripts/scripts/magic_destreak_cleanup.pl
===================================================================
--- /trunk/ippScripts/scripts/magic_destreak_cleanup.pl	(revision 25836)
+++ /trunk/ippScripts/scripts/magic_destreak_cleanup.pl	(revision 25837)
@@ -106,6 +106,6 @@
 
 
-&my_die("unexpected run state found: $state", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $state ne "goto_purged";
-&my_die("purge not allowed for raw stage, use goto_restore", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $stage eq "raw";
+&my_die("unexpected run state found: $state", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $state ne "goto_cleaned";
+&my_die("clean not allowed for raw stage, use goto_restore", $magic_ds_id, $PS_EXIT_CONFIG_ERROR) if $stage eq "raw";
 
 
@@ -210,5 +210,5 @@
 
 if (!$no_update) {
-    my $result = $dbh->do("UPDATE magicDSRun SET state = 'purged' WHERE magic_ds_id = ?", undef, $magic_ds_id);
+    my $result = $dbh->do("UPDATE magicDSRun SET state = 'cleaned' WHERE magic_ds_id = ?", undef, $magic_ds_id);
     my_die("attempt to update magicDSRun failed", $magic_ds_id, $PS_EXIT_UNKNOWN_ERROR) if $result eq "0E0";
 } else {
@@ -246,10 +246,10 @@
     $exit_code = $PS_EXIT_PROG_ERROR unless defined $exit_code;
 
-    my $command = "$magicdstool -updaterun -set_state purge_fault.$exit_code";
+    my $command = "$magicdstool -updaterun -fault $exit_code";
     $command   .= " -magic_ds_id $magic_ds_id";
     $command   .= " -dbname $dbname" if defined $dbname;
 
     # Add the processed file to the database
-    unless (1 or $no_update) {
+    unless ($no_update) {
         my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
             run(command => $command, verbose => $verbose);
Index: /trunk/ippTasks/pstamp.pro
===================================================================
--- /trunk/ippTasks/pstamp.pro	(revision 25836)
+++ /trunk/ippTasks/pstamp.pro	(revision 25837)
@@ -111,5 +111,5 @@
 
     task.exec
-        stdout $LOGSUBDIR/pstamp.request.find.log
+        stdout NULL
         stderr $LOGSUBDIR/pstamp.request.find.log
         if ($DB:n == 0)
Index: /trunk/ippTools/share/magicdstool_tocleanup.sql
===================================================================
--- /trunk/ippTools/share/magicdstool_tocleanup.sql	(revision 25836)
+++ /trunk/ippTools/share/magicdstool_tocleanup.sql	(revision 25837)
@@ -7,5 +7,5 @@
     JOIN magicRun USING(magic_id)
     JOIN rawExp USING(exp_id)
-WHERE magicDSRun.state = 'goto_purged'
+WHERE magicDSRun.state = 'goto_cleaned'
 -- XXX: need to add fault to magicDSRun
 --    AND magicDSRun.fault = 0
Index: /trunk/ippTools/src/magicdstool.c
===================================================================
--- /trunk/ippTools/src/magicdstool.c	(revision 25836)
+++ /trunk/ippTools/src/magicdstool.c	(revision 25837)
@@ -903,8 +903,8 @@
           (strcmp(state, "restored") == 0) ||
           (strcmp(state, "censored") == 0) ||
-          (strcmp(state, "purged") == 0) ||
+          (strcmp(state, "cleaned") == 0) ||
           (strcmp(state, "goto_restored") == 0) ||
           (strcmp(state, "goto_censored") == 0) ||
-          (strcmp(state, "goto_purged") == 0))
+          (strcmp(state, "goto_cleaned") == 0))
         ) {
         return false;
Index: /trunk/ippconfig/recipes/filerules-split.mdc
===================================================================
--- /trunk/ippconfig/recipes/filerules-split.mdc	(revision 25836)
+++ /trunk/ippconfig/recipes/filerules-split.mdc	(revision 25837)
@@ -228,5 +228,7 @@
 PPSTAMP.OUTPUT.MASK     OUTPUT {OUTPUT}.mk.fits                  MASK      COMP_MASK  FPA        TRUE      NONE
 PPSTAMP.OUTPUT.VARIANCE OUTPUT {OUTPUT}.wt.fits                  VARIANCE  COMP_WT    FPA        TRUE      NONE
+# mosaic image used for making stamps of raw images. Not saved.
 PPSTAMP.CHIP            OUTPUT {OUTPUT}.ch.fits                  IMAGE     NONE       CHIP       FALSE     MEF
+PPSTAMP.OUTPUT.JPEG1    OUTPUT {OUTPUT}.jpg                      JPEG      NONE       FPA        TRUE      NONE
 		        									        
 PPSIM.OUTPUT            OUTPUT {OUTPUT}.{CHIP.NAME}.fits         IMAGE     NONE       CHIP       TRUE      SPLIT
