Index: trunk/ippScripts/scripts/camera_exp.pl
===================================================================
--- trunk/ippScripts/scripts/camera_exp.pl	(revision 27010)
+++ trunk/ippScripts/scripts/camera_exp.pl	(revision 27039)
@@ -144,4 +144,22 @@
 }
 
+
+my $produceMasks;               # Produce masks?
+{
+    # Get the PSASTRO recipe
+    my $command = "$ppConfigDump -camera $camera -recipe PSASTRO $recipe_psastro -dump-recipe ADDSTAR -";
+    my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
+        run(command => $command, verbose => $verbose);
+    unless ($success) {
+        $error_code = (($error_code >> 8) or $PS_EXIT_PROG_ERROR);
+        &my_die("Unable to perform ppConfigDump: $error_code", $cam_id, $PS_EXIT_CONFIG_ERROR);
+    }
+    my $recipeData = $mdcParser->parse(join "", @$stdout_buf) or
+        &my_die("Unable to parse metadata config doc", $cam_id, $PS_EXIT_CONFIG_ERROR);
+
+    $produceMasks = metadataLookupBool($recipeData, 'REFSTAR_MASK');
+}
+
+
 ### not needed to have such an extensive temp file name.
 my ($list1File, $list1Name) = tempfile( "/tmp/$exp_tag.cm.$cam_id.b1.list.XXXX", UNLINK => !$save_temps ); # For binning 1
@@ -177,5 +195,5 @@
     print $list4File ($chipMask . "\n");
 
-    push @outMasks, $ipprc->filename("PSASTRO.OUTPUT.MASK", $outroot, $class_id);
+    push @outMasks, $ipprc->filename("PSASTRO.OUTPUT.MASK", $outroot, $class_id) if $produceMasks;
 }
 close $list1File;
