Index: trunk/ippScripts/scripts/warp_overlap.pl
===================================================================
--- trunk/ippScripts/scripts/warp_overlap.pl	(revision 17168)
+++ trunk/ippScripts/scripts/warp_overlap.pl	(revision 17518)
@@ -37,5 +37,5 @@
 my $ipprc = PS::IPP::Config->new(); # IPP configuration
 
-my ($warp_id, $camera, $tess_id, $dbname, $verbose, $no_update, $no_op);
+my ($warp_id, $camera, $tess_id, $dbname, $verbose, $no_update, $no_op, $save_temps);
 GetOptions(
     'warp_id|i=s'       => \$warp_id, # Warp identifier
@@ -46,4 +46,5 @@
     'no-update'         => \$no_update,	# Don't update the database?
     'no-op'             => \$no_op, # Don't do any operations
+    'save-temps'        => \$save_temps, # Save temporary files?
 ) or pod2usage( 2 );
 
@@ -119,4 +120,5 @@
     
     # XXX this is a bit too hard wired: the concept is that astrometry comes from the MOSAIC vs CHIP output
+    # XXX we have moved the astrometry analysis to the camera stage only: we should always have the source be MEF
     if ($astromSource eq 'PSASTRO.OUTPUT.MEF') {
 	# We have a MEF astrometry file from psastro
@@ -170,5 +172,5 @@
 
 # Generate a MDC file with the overlaps
-my ($overlapFile, $overlapName) = tempfile( 'overlaps.wrp' . $warp_id . '.mdc.XXXX', UNLINK => 1 );
+my ($overlapFile, $overlapName) = tempfile( 'overlaps.wrp' . $warp_id . '.mdc.XXXX', UNLINK => !$save_temps );
 print $overlapFile "warpSkyCellMap MULTI\n\n";
 foreach my $overlap (@overlaps) {
@@ -252,5 +254,5 @@
     my $fileLevel = $imfile->{filelevel};
     my $entry;	# How to identify this imfile in the dvoImageOverlaps output
-    if ((lc($fileLevel) eq "chip") && (lc($astromDepth) eq "MEF")) {
+    if ((lc($fileLevel) eq "chip") && (lc($astromDepth) eq "mef")) {
 	my $class_id = $imfile->{class_id};
 	my $chipRoot = $ipprc->file_resolve( $imfile->{chip_path_base} );
