Index: trunk/ippScripts/scripts/chip_imfile.pl
===================================================================
--- trunk/ippScripts/scripts/chip_imfile.pl	(revision 35686)
+++ trunk/ippScripts/scripts/chip_imfile.pl	(revision 35724)
@@ -200,5 +200,12 @@
 
     ## get the ppImage recipe for this camera and CHIP reduction
-    $command = "$ppConfigDump -camera $camera -dump-recipe PPIMAGE -recipe PPIMAGE $recipe_ppImage -";
+    $command = "$ppConfigDump -dump-recipe PPIMAGE -recipe PPIMAGE $recipe_ppImage -";
+    if ($dump_config) {
+        # use this camera's recipes
+        $command .= " -camera $camera";
+    } else {
+        # get recipes as set in config dump file
+        $command .= " -ipprc $configuration";
+    }
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => 0);
@@ -228,5 +235,5 @@
     my $useDeburnedImage = metadataLookupBool($recipeData, 'USE.DEBURNED.IMAGE');
     my $ppImageApplyBurntool = metadataLookupBool($recipeData, 'APPLY.BURNTOOL');
-    my $burntoolArgument;
+    my $burntoolArguments;
 
     if ($useDeburnedImage) {
@@ -330,5 +337,5 @@
 
         # if recipe option PPIMAGE:APPLY.BURNTOOL is set and the burntool information is stored in
-        # an external table (usual case), check the existence of that table file and set $burntoolArgument.
+        # an external table (usual case), check the existence of that table file and set $burntoolArguments.
         # If burntool state does not match, say if the burntool data is stored in a fits extension in
         # the rawImfile, use the burntool program.
@@ -351,5 +358,5 @@
                     $PS_EXIT_SYS_ERROR);
             }
-            $burntoolArgument = " -burntool $burntoolTable_uri";
+            $burntoolArguments = " -burntool $burntoolTable_uri";
         } else {
             ## use external burntool program 
@@ -433,6 +440,11 @@
             }
 
+            if ($dump_config) {
+                # tell ppImage to not apply burntool since we have done it here
+                $burntoolArguments = ' -Db PPIMAGE:APPLY.BURNTOOL F';
+            }
     #       print STDERR "$uri $uriReal $tempName $burntoolTable_uri $burntoolTable_uriReal $burntool_cmd $save_temps\n";
     #       exit(100);
+
         }
     }
@@ -468,5 +480,5 @@
         $command .= " -R PPIMAGE.CHIP FITS.TYPE NONE";
     }
-    $command .= $burntoolArgument if $burntoolArgument;
+    $command .= $burntoolArguments if $burntoolArguments;
     $command .= " -threads $threads" if defined $threads;
     $command .= " -image_id $chip_imfile_id" if defined $chip_imfile_id;
