Index: trunk/ippScripts/scripts/detrend_process_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 19127)
+++ trunk/ippScripts/scripts/detrend_process_imfile.pl	(revision 19652)
@@ -37,5 +37,5 @@
     'dbname|d=s'        => \$dbname, # Database name
     'reduction=s'       => \$reduction, # Reduction class
-    'threads=s'       	=> \$threads,   # Number of threads to use for ppImage
+    'threads=s'         => \$threads,   # Number of threads to use for ppImage
     'verbose'           => \$verbose,   # Print to stdout
     'no-update'         => \$no_update,
@@ -65,5 +65,6 @@
 # Recipes to use as a function of detrend type
 $reduction = "DETREND" unless defined $reduction;
-my $recipe = $ipprc->reduction($reduction, uc($det_type) . '_PROCESS'); # Recipe name to use
+my $ppimage_recipe = $ipprc->reduction($reduction, uc($det_type) . '_PROCESS'); # Recipe name for ppImage
+my $jpeg_recipe = $ipprc->reduction($reduction, uc($det_type) . '_JPEG_IMAGE'); # Recipe name for JPEG
 
 # values to extract from output metadata and the stats to calculate
@@ -104,5 +105,6 @@
 unless ($no_op) {
     my $command = "$ppImage -file $input_uri $outroot";
-    $command .= " -recipe PPIMAGE $recipe";
+    $command .= " -recipe PPIMAGE $ppimage_recipe";
+    $command .= " -recipe JPEG $jpeg_recipe";
     $command .= " -recipe PPSTATS CHIPSTATS";
     $command .= " -stats $outputStats";
@@ -175,5 +177,5 @@
         $command .= " -exp_id $exp_id";
         $command .= " -class_id $class_id";
-	$command .= " -path_base $outroot";
+        $command .= " -path_base $outroot";
         $command .= " -code $exit_code";
         $command .= " -dbname $dbname" if defined $dbname;
