Index: trunk/tools/eam/teleff/cammask.pro
===================================================================
--- trunk/tools/eam/teleff/cammask.pro	(revision 41720)
+++ trunk/tools/eam/teleff/cammask.pro	(revision 41742)
@@ -46,5 +46,12 @@
  # load the reference source table
  # NOTE: Mref is chosen to match filter for this exposure
- data $refsrcs; read -fits DATA $REF_FIELDS_CAM
+ data $refsrcs; 
+ read -fits DATA -sizes
+ if ($table:Ny == 0)
+  echo "ERROR: no reference sources found in $refsrcs"
+  break
+ end
+ 
+ read -fits DATA $REF_FIELDS_CAM
  set Nref = ramp(Rref)
 
