Index: trunk/ippScripts/scripts/camera_exp.pl
===================================================================
--- trunk/ippScripts/scripts/camera_exp.pl	(revision 33525)
+++ trunk/ippScripts/scripts/camera_exp.pl	(revision 33576)
@@ -41,7 +41,7 @@
 
 my ( $exp_tag, $cam_id, $camera, $outroot, $dbname, $reduction, $dvodb, $verbose, $no_update,
-     $no_op, $redirect, $save_temps, $run_state);
+     $no_op, $redirect, $save_temps, $run_state, $skip_binned, $skip_masks);
 GetOptions(
-    'exp_tag=s'          => \$exp_tag, # Exposure identifier
+    'exp_tag=s'         => \$exp_tag, # Exposure identifier
     'cam_id=s'          => \$cam_id, # Camtool identifier
     'camera|c=s'        => \$camera, # Camera
@@ -51,4 +51,6 @@
     'dvodb|w=s'         => \$dvodb,  # output DVO database
     'run-state=s'       => \$run_state, # 'new' or 'update'
+    'skip-binned'       => \$skip_binned, # override recipe - don't create binned images
+    'skip-refmask'      => \$skip_masks, # override recipe - don't create refmask
     'verbose'           => \$verbose,   # Print to stdout
     'no-update'         => \$no_update, # Update the database?
@@ -190,5 +192,5 @@
 
 my $produceMasks;               # Produce masks?
-{
+if (!$skip_masks) {
     # Get the PSASTRO recipe
     my $command = "$ppConfigDump -camera $camera -recipe PSASTRO $recipe_psastro -dump-recipe PSASTRO -";
@@ -205,5 +207,4 @@
 }
 
-
 ### 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
@@ -261,5 +262,5 @@
 
     # Make the jpeg for binning 1
-    if ($run_state eq 'new') {
+    if (!$skip_binned and ($run_state eq 'new')) {
         my $command = "$ppImage -list $list1Name $outroot"; # Command to run
         $command .= " -recipe PPIMAGE $recipe1";
@@ -276,5 +277,5 @@
 
     # Make the jpeg for binning 2
-    if ($run_state eq 'new') {
+    if (!$skip_binned and ($run_state eq 'new')) {
         my $command = "$ppImage -list $list2Name $outroot"; # Command to run
         $command .= " -recipe PPIMAGE $recipe2";
@@ -295,7 +296,8 @@
         $command  = "$psastro";
         $command .= " -list $list3Name";
-        $command .= " -masklist $list4Name";
+        $command .= " -masklist $list4Name" if $produceMasks;
         $command .= " $outroot";
         $command .= " -recipe PSASTRO $recipe_psastro";
+        $command .= " -Db PSASTRO:REFSTAR_MASK F" if $skip_masks;
         $command .= " -tracedest $traceDest -log $logDest";
         $command .= " -dbname $dbname" if defined $dbname;
