Index: trunk/ippScripts/scripts/magic_destreak.pl
===================================================================
--- trunk/ippScripts/scripts/magic_destreak.pl	(revision 21145)
+++ trunk/ippScripts/scripts/magic_destreak.pl	(revision 21157)
@@ -30,6 +30,9 @@
 my ($magic_ds_id, $camera, $streaks, $stage, $stage_id, $component, $uri, $path_base, $cam_path_base);
 my ($outroot, $recoveryroot);
-my ($replace, $remove);
+my ($replace, $remove, $release);
 my ($dbname, $save_temps, $verbose, $no_update, $no_op, $logfile);
+
+# XXX: remove this
+$release = 1;
 
 GetOptions(
@@ -45,6 +48,7 @@
            'outroot=s'      => \$outroot,     # "directory" for temporary images (may be nebulous)
            'recoveryroot=s' => \$recoveryroot,# "directory" for saving the images of excised pixels
-           'replace=s'        => \$replace,    # replace the input images with the results.
-           'remove=s'         => \$remove,     # remove the original images when done YIKES!
+           'replace=s'      => \$replace,    # replace the input images with the results.
+           'remove=s'       => \$remove,     # remove the original images when done YIKES!
+           'release'        => \$release,    # NAN masked pixels for release
            'save-temps'     => \$save_temps, # Save temporary files?
            'dbname=s'       => \$dbname,     # Database name
@@ -180,4 +184,5 @@
 if ($stage eq "raw") {
     $astrom = $ipprc->filename("PSASTRO.OUTPUT", $cam_path_base);
+    $mask   = $ipprc->filename("PSASTRO.OUTPUT.MASK", $cam_path_base, $class_id) if $release ;
 } elsif ($stage eq "chip") {
     # we use the mask output from the camera stage for input and replace
@@ -197,4 +202,7 @@
 {
     my $command = "$streaksremove -stage $stage -tmproot $outroot -streaks $streaks -image $image";
+
+    $command .= " -release" if $release;
+
     $command .= " -class_id $class_id" if defined $class_id;
     $command .= " -recovery $recoveryroot" if defined $recoveryroot;
