Index: trunk/tools/runcameraexp.pl
===================================================================
--- trunk/tools/runcameraexp.pl	(revision 31243)
+++ trunk/tools/runcameraexp.pl	(revision 33577)
@@ -16,5 +16,5 @@
 my $dbname = "gpc1";
 my ($cam_id, $update, $redirect, $save_temps, $pretend, $no_verbose);
-my ($outdir);
+my ($outdir, $no_masks);
 
 GetOptions(
@@ -23,5 +23,6 @@
     'redirect-output'   => \$redirect,
     'save-temps'        => \$save_temps,
-    'outdir=s'          => \$outdir,
+    'outdir=s'          => \$outdir,    # move outroot to this directory
+    'no-masks'          => \$no_masks,
     'update'            => \$update,
     'dbname=s'          => \$dbname,
@@ -59,4 +60,7 @@
 
 if ($outdir) {
+    if ($outdir eq ".") {
+        $outdir = $ENV{PWD};
+    }
     my $base = basename($path_base);
     $path_base = "$outdir/$base";
@@ -81,4 +85,6 @@
 $command .= " --verbose" unless $no_verbose;
 $command .= " --dbname $dbname" if $dbname;
+$command .= " --skip-binned" if $no_masks;
+$command .= " --skip-refmask" if $no_masks;
 
 
@@ -134,5 +140,5 @@
 =head1 SYNOPSIS
     
-    perl runcameraexp.pl --cam_id <cam_id> [--update] [--redirect-output] [--pretend] [--dbname <dbname>]
+    perl runcameraexp.pl --cam_id <cam_id> [--update] [--redirect-output] [--pretend] [--dbname <dbname>] [--no-masks]
 
 Query the database for the results of a completed camera run and rerun the processing, optionally reverting a faulted
@@ -147,7 +153,22 @@
 =item * --update
 
-Revert a faulted run before processing. If the run is not faulted an error occurs.
+Revert a faulted run before processing. If the run is not faulted an error occurs. Use with care!
 WARNING: insure that the standard science processing either has camera stage turned off or the
-label of this camRun omitted from the label list otherwise it may attempt to processes this run at the same time.
+label of this camRun omitted from the label list otherwise it may attempt to process this run at the same time.
+
+Optional.
+
+=item *  --no-masks
+
+Override the recipe values to skip production of binnned images and creation
+of reference star masks. This allows psastro to perform the astrometry
+analysis even if the input chipRun has been cleaned up.
+
+Optional (for debugging).
+
+=item *  --outdir <outdir>
+
+Change the output root to the provided directory instead of the path_base
+in the database.  
 
 Optional.
@@ -156,4 +177,8 @@
 
 Send the output of the command to the log file. (This is the default if --update is supplied).
+
+=item *  --save-temps
+
+Pass -save-temps to camera_exp.pl
 
 Optional.
