Index: trunk/ippScripts/scripts/detrend_reject_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_reject_imfile.pl	(revision 17943)
+++ trunk/ippScripts/scripts/detrend_reject_imfile.pl	(revision 18048)
@@ -36,5 +36,5 @@
 # parse the command-line options
 my ( $det_id, $iter, $exp_id, $exp_tag, $det_type, $camera, $filter, $reject, $outroot, $dbname, $reduction,
-     $verbose, $no_update, $no_op, $save_temps );
+     $verbose, $no_update, $no_op, $save_temps, $redirect );
 GetOptions(
            'det_id|d=s'        => \$det_id,
@@ -53,4 +53,5 @@
            'no-op'             => \$no_op,
            'save-temps'        => \$save_temps, # Save temporary files?
+           'redirect-output'   => \$redirect,   # redirect output from LOG.IMFILE
            ) or pod2usage( 2 );
 
@@ -68,4 +69,12 @@
 # load IPP config information for the specified camera
 $ipprc->define_camera($camera);
+if ($redirect) {
+    # XXX should this really be going to LOG.IMFILE?
+    # That's where detrend.resid.pro was sending it
+    my $logDest     = $ipprc->filename("LOG.IMFILE", $outroot, "NONE")
+       or &my_die("Missing entry from camera config", $det_id, $iter, $exp_id, $PS_EXIT_CONFIG_ERROR);
+    $ipprc->redirect_output($logDest);
+}
+
 
 # Recipes to use based on reduction class
