Index: trunk/ippMonitor/def/detNormalizedExp.d
===================================================================
--- trunk/ippMonitor/def/detNormalizedExp.d	(revision 12835)
+++ trunk/ippMonitor/def/detNormalizedExp.d	(revision 13264)
@@ -1,14 +1,26 @@
-TABLE detNormalizedExp
+TABLE detNormalizedExp, rawExp
 TITLE detNormalizedExp
 FILE  detNormalizedExp.php
 MENU  ipp.detrend.dat
 
-#     field        size     name       show            link to                  extras
-FIELD det_id,        7,     det_id
-FIELD bg,            8,     backgnd
-FIELD bg_mean_stdev, 8,     [stdev]
-FIELD bg_stdev,      8,     stdev
-FIELD iteration,     5,     iteration
-FIELD *,             8,     image,     image=$path_base@PPIMAGE.JPEG2,  detNormalizedImfile.php, det_id=$det_id,iteration=$iteration,image=$path_base@PPIMAGE.JPEG1
-FIELD path_base,     20,    path_base, none
-#FIELD recipe, 20,   recipe
+# the following WHERE clauses are added to all queries joined by AND
+WHERE detNormalizedExp.exp_tag = rawExp.exp_tag
+
+# define image names to be used below
+# IMAGE VAR basename filerule camera class_id
+IMAGE JPEG2 $detNormalizedExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE
+
+ARGS  ARG2 det_id=$detNormalizedExp.det_id
+ARGS  ARG2 iteration=$detNormalizedExp.iteration
+ARGS  ARG2 exp_tag=$detNormalizedExp.exp_tag
+ARGS  ARG2 camera=$rawExp.camera
+ARGS  ARG2 basename=$detNormalizedExp.path_base
+
+#     field        		      size     name     show          link to                  extras
+FIELD detNormalizedExp.det_id,        7,     det_id
+FIELD detNormalizedExp.bg,            8,     backgnd
+FIELD detNormalizedExp.bg_mean_stdev, 8,     [stdev]
+FIELD detNormalizedExp.bg_stdev,      8,     stdev
+FIELD detNormalizedExp.iteration,     5,     iteration
+FIELD *,             		      8,     image,     image=JPEG2,  detNormalizedImfile.php, ARG2
+FIELD detNormalizedExp.path_base,     20,    path_base, none
