Index: trunk/ippScripts/scripts/magic_process.pl
===================================================================
--- trunk/ippScripts/scripts/magic_process.pl	(revision 23295)
+++ trunk/ippScripts/scripts/magic_process.pl	(revision 23637)
@@ -30,5 +30,5 @@
 my $missing_tools;
 my $magictool      = can_run('magictool') or (warn "Can't find magictool" and $missing_tools = 1);
-my $removestreaks = can_run('RemoveStreaks') or (warn "Can't find RemoveStreaks" and $missing_tools = 1);
+my $detectstreaks = can_run('DetectStreaks') or (warn "Can't find DetectStreaks" and $missing_tools = 1);
 if ($missing_tools) {
     warn("Can't find required tools.");
@@ -63,10 +63,10 @@
 $ipprc->redirect_output($logfile) or my_die( "Unable to redirect output", $magic_id, $node, $PS_EXIT_SYS_ERROR ) if $logfile;
 
-# RemoveStreaks doesn't know about nebulous. It expects to be able to append strings to outroot
+# DetectStreaks doesn't know about nebulous. It expects to be able to append strings to outroot
 # to form valid file names.
-# So forbid nebulous path in outroot. We could relax this by change RemoveStreaks to take all
-# of the file names as arguments
+# So forbid nebulous path in outroot. We could relax this by change DetectStreaks to take all
+# of the file names as arguments or by teaching it aoubt Nebulous
 if ($outroot =~ 'neb:/') {
-    &my_die("RemoveStreaks does not support nebulous paths in outroot", $magic_id, $node, $PS_EXIT_CONFIG_ERROR);
+    &my_die("DetectStreaks does not support nebulous paths in outroot", $magic_id, $node, $PS_EXIT_CONFIG_ERROR);
 }
 
@@ -100,9 +100,10 @@
 {
     my $command;                # Command to execute
-    $command = "$removestreaks --outroot $outroot";
+    $command = "$detectstreaks --outroot $outroot";
     $command .= " --verbose" if $verbose;
 
-    # added per Paul Sydney's Jan 6, 2009
-    $command .= " -D 3";
+    # added per Paul Sydney's request Jan 6, 2009
+    # removed per Paul Sydney March 30, 2009
+    # $command .= " -D 3";
 
 
@@ -118,5 +119,5 @@
     if (scalar @$inputs == 1 and $node ne "root") {
         #
-        #  RemoveStreak --detect --image filename --mask maskname --weight weightname --outroot path_base
+        #  DetectStreaks --detect --image filename --mask maskname --weight weightname --outroot path_base
         #
         # Leaf node: 'detect' stage
@@ -131,9 +132,12 @@
         }
         my ($image, $mask, $weight) = resolve_inputs($innode);
+        if (!defined($image) or !defined($mask) or !defined($weight)) {
+            &my_die("failed to resolve inputs", $magic_id, $node, $PS_EXIT_DATA_ERROR);
+        }
 
         $command .= " --detect --image $image --mask $mask --weight $weight";
 
         # set threshold to 4 sigma
-        $command .= ' -t 4';
+        $command .= ' -t 4 -S';
 
         # create the list of inputs used at this stage. At higher levels the
@@ -156,5 +160,5 @@
     } else {
         #
-        # RemoveStreak --merge --inputs input.list --images image0_1.list \
+        # DetectStreaks --merge --inputs input.list --images image0_1.list \
         #                      --masks mask0_1.list --weight weights0_1.list
         #                      --outroot outroot
@@ -202,5 +206,5 @@
 
     unless ($no_op) {
-        # RemoveStreaks fails if an output file already exists
+        # DetectStreaks fails if an output file already exists
         foreach my $output (@outputs) {
             unlink($output) if -e $output;
@@ -211,5 +215,5 @@
         unless ($success) {
             $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
-            &my_die("Unable to perform RemoveStreaks: $error_code", $magic_id, $node, $error_code);
+            &my_die("Unable to perform DetectStreaks: $error_code", $magic_id, $node, $error_code);
         }
 
