Index: trunk/tools/eam/teleff/warpmask.pro
===================================================================
--- trunk/tools/eam/teleff/warpmask.pro	(revision 41719)
+++ trunk/tools/eam/teleff/warpmask.pro	(revision 41720)
@@ -5,4 +5,6 @@
 $OUTDIR     = .
 $OUTVERSION = XXX
+
+if (not($?USE_CAMSOURCE)) set USE_CAMSOURCE = 0
 
 $REF_FIELDS_WRP = Rref Dref Mref 
@@ -40,7 +42,15 @@
   # load the reference source table
   # how to choose the name of the filter?
-  data $refsrcs
   # NOTE: Mref is chosen to match filter for this exposure
-  data $refsrcs; read -fits DATA $REF_FIELDS_WRP
+  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_WRP
+  end
+
   set Nref = ramp(Rref)
   if ($VERBOSE) echo "loaded Rref[] sources from reference $refsrcs"
