Index: trunk/ippScripts/scripts/camera_exp.pl
===================================================================
--- trunk/ippScripts/scripts/camera_exp.pl	(revision 19971)
+++ trunk/ippScripts/scripts/camera_exp.pl	(revision 20652)
@@ -145,4 +145,7 @@
 my ($list3File, $list3Name) = tempfile( "/tmp/$exp_tag.cm.$cam_id.b3.list.XXXX", UNLINK => !$save_temps ); # For astrometry
 
+### XXX for the moment, always generate the bright-star mask
+my ($list4File, $list4Name) = tempfile( "/tmp/$exp_tag.cm.$cam_id.b4.list.XXXX", UNLINK => !$save_temps ); # For astrometry
+
 # XXX we perform astrometry iff photometry output exists
 my $chipObjectsExist = 0;
@@ -154,4 +157,5 @@
     # we expect the chip analysis stage to produce psphot output (cmf file) and two binned images
     my $chipObjects = $ipprc->filename("PSPHOT.OUTPUT", $file->{path_base}, $class_id);
+    my $chipMask   = $ipprc->filename("PPIMAGE.CHIP.MASK", $file->{path_base}, $class_id);
 
     # if any of the output chip photometry files exist, we can run psastro / addstar below
@@ -166,8 +170,10 @@
     print $list2File ($ipprc->filename("PPIMAGE.BIN2", $file->{path_base}, $class_id) . "\n");
     print $list3File ($ipprc->file_resolve($chipObjects, 0) . "\n");
+    print $list4File ($ipprc->file_resolve($chipMask, 0) . "\n");
 }
 close $list1File;
 close $list2File;
 close $list3File;
+close $list4File;
 
 # Output products
@@ -234,5 +240,5 @@
         # run psastro on the chipObjects, producing fpaObjects
         my $command;
-        $command  = "$psastro -list $list3Name $outroot";
+        $command  = "$psastro -list $list3Name -masklist $list4Name $outroot";
         $command .= " -tracedest $traceDest -log $logDest";
         $command .= " -dbname $dbname" if defined $dbname;
