Index: /trunk/ippScripts/scripts/staticsky.pl
===================================================================
--- /trunk/ippScripts/scripts/staticsky.pl	(revision 37914)
+++ /trunk/ippScripts/scripts/staticsky.pl	(revision 37915)
@@ -48,4 +48,5 @@
     print "  --outroot (root)    : Output root name\n";
     print "  --reduction (class) : Reduction class\n";
+    print "  --require_sources   : Require that the stack source files exist\n";
     print "  --verbose           : Be extra verbose\n";
     print "  --no-update         : Don't update the database?\n";
@@ -60,5 +61,5 @@
 print "run staticsky.pl @ARGV\n";
 
-my ($sky_id, $camera, $dbname, $threads, $outroot, $reduction, $verbose, $no_update, $no_op, $redirect, $save_temps);
+my ($sky_id, $camera, $dbname, $threads, $outroot, $reduction, $require_sources, $verbose, $no_update, $no_op, $redirect, $save_temps);
 GetOptions(
     'sky_id=s'          => \$sky_id, # Diff identifier
@@ -68,4 +69,5 @@
     'outroot=s'         => \$outroot, # Output root name
     'reduction=s'       => \$reduction, # Reduction class
+    'require_sources'   => \$require_sources, # Require that the stack sources exist.
     'verbose'           => \$verbose,   # Print to stdout
     'no-update'         => \$no_update, # Don't update the database?
@@ -178,6 +180,10 @@
                 &my_die("Couldn't find input: $psfCnv",    $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$psfCnv");
             }
-            &my_die("Couldn't find input: $sources",   $sky_id, $PS_EXIT_SYS_ERROR) unless $ipprc->file_exists("$sources");
-
+	    
+	    my $have_sources = $ipprc->file_exists("$sources");
+	    if ($require_sources) {
+		&my_die("Couldn't find input: $sources",   $sky_id, $PS_EXIT_SYS_ERROR) unless $have_sources;
+	    }
+	    
             print $listFile "  STACK_ID      S64  " . $stack_id  . "\n";
             print $listFile "  RAW:IMAGE     STR  " . $imageRaw  . "\n";
@@ -185,5 +191,7 @@
             print $listFile "  RAW:VARIANCE  STR  " . $weightRaw . "\n";
             print $listFile "  RAW:EXPNUM    STR  " . $expnumRaw . "\n";
-            print $listFile "  SOURCES       STR  " . $sources   . "\n";
+	    if ($have_sources) {
+		print $listFile "  SOURCES       STR  " . $sources   . "\n";
+	    }
             if ($needConvolvedImages) {
                 print $listFile "  CNV:IMAGE     STR  " . $imageCnv  . "\n";
