Index: trunk/ippScripts/scripts/warp_overlap.pl
===================================================================
--- trunk/ippScripts/scripts/warp_overlap.pl	(revision 32379)
+++ trunk/ippScripts/scripts/warp_overlap.pl	(revision 41539)
@@ -81,7 +81,8 @@
 }
 
-# Where do we get the astrometry source from?
+# Where do we get the astrometry source from? Do we limit by astrometry error?
 my $astromSource;               # The astrometry source filerule (eg, PSASTRO.OUTPUT, PSASTRO.OUTPUT.MEF)
 my $astromAccept;               # Accept the astrometry unconditionally?
+my $maxCerror = 0.0;
 {
     my $command = "$ppConfigDump -camera $camera -dump-recipe PSWARP -";
@@ -96,4 +97,5 @@
     $astromSource = metadataLookupStr($metadata, 'ASTROM.SOURCE');
     $astromAccept = metadataLookupBool($metadata, 'ASTROM.ACCEPT');
+    $maxCerror    = metadataLookupF32($metadata, 'MAX.CERROR');
 }
 
@@ -205,9 +207,11 @@
 {
     my $filename = shift;       # Filename on which to run dvoImageOverlaps
-    my $tess_dir_abs = shift;       # Tessellation directory
+    my $tess_dir_abs = shift;   # Tessellation directory
     my $accept = shift;         # Do we use the -accept-astrom flag?
+    my $maxCerror = shift;	# maximum allowed astrometric error
 
     my $command = "$dvoImageOverlaps -D CATDIR $tess_dir_abs " . $filename;
     $command .= ' -accept-astrom' if $accept;
+    $command .= ' -D OVERLAPS_MAX_CERROR $maxCerror'; # skip poorly calibrated images from warps
     my ( $success, $error_code, $full_buf, $stdout_buf, $stderr_buf ) =
         run(command => $command, verbose => $verbose);
