Index: trunk/ippTests/ippCheck/diffmask.pro
===================================================================
--- trunk/ippTests/ippCheck/diffmask.pro	(revision 42085)
+++ trunk/ippTests/ippCheck/diffmask.pro	(revision 42125)
@@ -51,5 +51,22 @@
   # load the reference source table
   # how to choose the name of the filter?
-  data $refsrcs; 
+  data $refsrcs
+
+  # first check if the FITS table has any entries
+  read -fits DATA -sizes
+  if ($table:Ny == 0) 
+    echo "WARNING: empty reference table $refsrcs"
+
+    $OUT_FIELDS = 
+    foreach field $SMF_FIELDS_DIF $REF_FIELDS_DIF $XTR_FIELDS_DIF
+      $OUT_FIELDS = $OUT_FIELDS $field\_out
+      create -empty $field\_out
+    end
+    
+    sprintf output "%s/%s.%s.dif.stf" $OUTDIR $expname $OUTVERSION
+    write -fits DATA $output $OUT_FIELDS
+    return
+  end
+
   if ($USE_CAMSOURCE) 
    read -fits DATA Rref_out Dref_out Mref_out
