Index: trunk/tools/eam/teleff/diffmask.pro
===================================================================
--- trunk/tools/eam/teleff/diffmask.pro	(revision 41719)
+++ trunk/tools/eam/teleff/diffmask.pro	(revision 41720)
@@ -13,4 +13,6 @@
 if (not($?MATCH_RADIUS)) set MATCH_RADIUS = 2.0
 
+if (not($?USE_CAMSOURCE)) set USE_CAMSOURCE = 0
+
 $SMF_FIELDS_DIF = X_PSF Y_PSF RA_PSF DEC_PSF CAL_PSF_MAG PSF_QF PSF_QF_PERFECT
 $REF_FIELDS_DIF = Rref Dref Mref 
@@ -50,5 +52,14 @@
   # load the reference source table
   # how to choose the name of the filter?
-  data $refsrcs; read -fits DATA $REF_FIELDS_DIF
+  data $refsrcs; 
+  if ($USE_CAMSOURCE) 
+   read -fits DATA Rref_out Dref_out Mref_out
+   set Rref = Rref_out
+   set Dref = Dref_out
+   set Mref = Mref_out
+  else
+    read -fits DATA $REF_FIELDS_DIF
+  end
+
   set Nref = ramp(Rref)
   if ($VERBOSE) echo "loaded Rref[] sources from reference $refsrcs"
