Index: trunk/ippScripts/scripts/detrend_reject_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/detrend_reject_imfile.pl	(revision 9505)
+++ trunk/ippScripts/scripts/detrend_reject_imfile.pl	(revision 9892)
@@ -40,4 +40,6 @@
     and defined $det_type
     and defined $camera;
+
+$ipprc->define_camera($camera);
 
 use constant RECIPE1 => 'PPIMAGE_J1'; # Recipe to use for ppImage to make JPEGs
@@ -87,6 +89,6 @@
 
 # Output products --- need to synch with the camera configuration!
-my $jpeg1Name = $outputRoot . ".b1.jpg"; # Binned JPEG #1
-my $jpeg2Name = $outputRoot . ".b2.jpg"; # Binned JPEG #2
+my $jpeg1Name = $ipprc->filename("PPIMAGE.JPEG1", $outputRoot); # Binned JPEG #1
+my $jpeg2Name = $ipprc->filename("PPIMAGE.JPEG2", $outputRoot); # Binned JPEG #2
 
 # Make the jpeg for binning 1
@@ -106,5 +108,4 @@
 }
 
-$ipprc->define_camera( $camera);
 my $expected = rejection_limit( 'EXPECTED', $det_type, $filter ); # Expected mean
 # Rejection thresholds
