Index: trunk/ippScripts/scripts/warp_overlap.pl
===================================================================
--- trunk/ippScripts/scripts/warp_overlap.pl	(revision 19113)
+++ trunk/ippScripts/scripts/warp_overlap.pl	(revision 19117)
@@ -224,15 +224,15 @@
 # Extract a list of overlaps for an imfile
 #
-# The command "dvoImageOverlaps -accept-astrom -D CATDIR tessellation (megacam)" returns:
-# 729534pa.cmf[ccd00.hdr]  :  skycell.051.fits
-# PSASTRO.OUTPUT[CMF.HEAD] : SKYCELL
-# [CMF.HEAD] is optionally used for MEF files (SIMPLE or MOSAIC)
+# The command "dvoImageOverlaps FILENAME" returns:
+# FILENAME[HDU] : SKYCELL.ID
+# eg: 729534pa.cmf[ccd00.hdr]  :  skycell.051.fits
+# for the case of split data, we need to identify the input imfiles based on this information
 sub extract_overlaps
 {
-    my $matches = shift;        # Reference to list of skycells from dvoImageOverlaps
-    my $imfile = shift;         # Imfile information
-    my $filename = shift;       # Filename used with dvoImageOverlaps
+    my $matches = shift;         # Reference to list of skycells from dvoImageOverlaps
+    my $imfile = shift;          # Imfile information
+    my $filename = shift;        # Filename used with dvoImageOverlaps
     my $tess_dir = shift;        # Tessellation identifier
-    my $overlaps = shift;       # Reference to list of overlaps
+    my $overlaps = shift;        # Reference to list of overlaps
     my $unique_skycells = shift; # Reference to hash of found skycells
 
@@ -244,5 +244,8 @@
     my $fileLevel = $imfile->{filelevel};
     my $entry;  # How to identify this imfile in the dvoImageOverlaps output
+
     if (lc($fileLevel) eq "chip") {
+	# in the case of SPLIT images, all CLASSes are included in the output list
+	# we need to pull out the single CLASS_ID for this imfile from the full list
         my $class_id = $imfile->{class_id};
         my $chipRoot = $ipprc->file_resolve( $imfile->{chip_path_base} );
@@ -252,4 +255,5 @@
         print STDERR "entry: $entry, class: $class_id, extname: $extname, chiproot: $chipRoot\n" if $verbose;
     } else {
+	# in the case of MEF or SINGLE images, there is only a single CLASS in the output list
         $entry = $filename;
         print STDERR "entry: $entry\n" if $verbose;
