Index: /branches/eam_branches/ipp-20211108/ippTests/ippCheck/smfcheck.pro
===================================================================
--- /branches/eam_branches/ipp-20211108/ippTests/ippCheck/smfcheck.pro	(revision 42032)
+++ /branches/eam_branches/ipp-20211108/ippTests/ippCheck/smfcheck.pro	(revision 42033)
@@ -111,4 +111,5 @@
 
   # load psfField definitions
+  # XXX these should depend on which file is being compared (camera, warp, diff)
   smf.compare.parse.book $PSF_FIELDS  psfFields
   smf.compare.parse.book $PSF_KEYS    psfKeys
@@ -124,12 +125,4 @@
 
   smf.compare.match.extlists ext0 ext1
-
-  ## ok ($ext0:n == $ext1:n) "same number of extensions"
-  ## if ($ext0:n != $ext1:n) 
-  ##   echo "impossible to continue with mismatched extensions"
-  ##   echo "smf1 : $smf1"
-  ##   echo "smf2 : $smf2"
-  ##   exit 3
-  ## end
 
   # track the number of chips for which the XYnn.hdr keys failed
@@ -166,4 +159,28 @@
     strstr -q $extname .psf -start s1
     if ($s1 == 4)
+      echo "##### check keys for $extname == FITS entry number $Next1,$Next2 #####"
+      echo "##### comparison results in $outroot.$extname.keys               #####"
+      exec ippCheckKeys $smf1 $Next1 $smf2 $Next2 >& $outroot.$extname.keys 
+      smf.compare.keys $outroot.$extname.keys psfKeys
+      if ($NfailKeys) set NfailPsf = $NfailPsf + 1
+
+      echo "##### check fields for $extname == FITS entry number $Next1,$Next2 #####"
+      echo "##### comparison results in $outroot.$extname.txt                  #####"
+      smf.compare.onechip $outroot.$extname $smf1 {$Next1-1} $smf2 {$Next2-1}; # Note smf.compare.onechip counts from 0 = first extension
+    end
+
+    # if extname is SkyChip.hdr, compare the headers
+    strstr -q $extname .hdr -start s1
+    if ($s1 == 7)
+      echo "##### check keys for $extname == FITS entry number $Next1,$Next2 #####"
+      echo "##### comparison results in $outroot.$extname.keys               #####"
+      exec ippCheckKeys $smf1 $Next1 $smf2 $Next2 >& $outroot.$extname.keys
+      smf.compare.keys $outroot.$extname.keys hdrKeys
+      if ($NfailKeys) set NfailHdr = $NfailHdr + 1
+    end
+
+    # if extname is SkyChip.psf, compare the headers AND compare the table values
+    strstr -q $extname .psf -start s1
+    if ($s1 == 7)
       echo "##### check keys for $extname == FITS entry number $Next1,$Next2 #####"
       echo "##### comparison results in $outroot.$extname.keys               #####"
