Index: trunk/ippMonitor/def/autocode.php
===================================================================
--- trunk/ippMonitor/def/autocode.php	(revision 9399)
+++ trunk/ippMonitor/def/autocode.php	(revision 9439)
@@ -4,9 +4,9 @@
 
 $ID = checkID ();
-if ($ID['proj']) {
-  $db = dbconnect($ID['proj']);
-} else {
-  $db = dbconnect('detrend');
-}
+
+// require an explicit project
+if (! $ID['proj']) { projectform ($ID); }
+
+$db = dbconnect($ID['proj']);
 
 if ($ID['menu']) {
@@ -16,5 +16,5 @@
 }
 
-menu($myMenu, '$TITLE', '$STYLE', $ID['link']);
+menu($myMenu, '$TITLE', '$STYLE', $ID['link'], $ID['proj']);
 
 echo "<p> $TITLE </p>";
@@ -25,7 +25,7 @@
 // query the database
 if ($WHERE) {
-  $sql = "SELECT $FIELDS FROM $TABLE WHERE $WHERE LIMIT 20";
+  $sql = "SELECT $FIELDS FROM $TABLE WHERE $WHERE LIMIT 40";
 } else {
-  $sql = "SELECT $FIELDS FROM $TABLE LIMIT 20";
+  $sql = "SELECT $FIELDS FROM $TABLE LIMIT 40";
 }
 
Index: trunk/ippMonitor/def/detNormalizedExp.d
===================================================================
--- trunk/ippMonitor/def/detNormalizedExp.d	(revision 9399)
+++ trunk/ippMonitor/def/detNormalizedExp.d	(revision 9439)
@@ -4,11 +4,11 @@
 MENU  ipp.detrend.dat
 
-#     field     name     show   link to     extras
-FIELD det_id, 20,   det_id
-FIELD iteration, 20,   iteration
-FIELD bg, 20, bg
-FIELD bg_stdev, 20, bg_stdev
-FIELD bg_mean_stdev, 20, bg_mean_stdev
-FIELD b1_uri, 20,   b1_uri
-FIELD b2_uri, 20,   b2_uri
-FIELD recipe, 20,   recipe
+#     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 b2_uri,        8,     image,     image=$b2_uri,  detNormalizedImfile.php, det_id=$det_id,iteration=$iteration,image=$b1_uri
+#FIELD b1_uri, 20,   b1_uri
+#FIELD recipe, 20,   recipe
Index: trunk/ippMonitor/def/detNormalizedImfile.d
===================================================================
--- trunk/ippMonitor/def/detNormalizedImfile.d	(revision 9399)
+++ trunk/ippMonitor/def/detNormalizedImfile.d	(revision 9439)
@@ -4,12 +4,14 @@
 MENU  ipp.imfiles.dat
 
-#     field     name     show   link to     extras
-FIELD det_id, 20,   det_id
-FIELD iteration, 20,   iteration
-FIELD class_id, 20,   class_id
-FIELD uri, 20,   uri
-FIELD bg, 20, bg
-FIELD bg_stdev, 20, bg_stdev
-FIELD bg_mean_stdev, 20, bg_mean_stdev
-FIELD b1_uri, 20,   b1_uri
-FIELD b2_uri, 20,   b2_uri
+#     field          size name     show   link to     extras
+FIELD det_id,          7, det_id
+FIELD class_id,        8, class_id
+FIELD bg,              8, backgnd
+FIELD bg_stdev,        8, stdev
+FIELD iteration,       5, iteration
+#FIELD uri,           20, uri
+#FIELD bg_mean_stdev, 20, bg_mean_stdev
+#FIELD b1_uri,        20, b1_uri
+#FIELD b2_uri,        20, b2_uri
+
+TAIL PHP insert_image ('image');
Index: trunk/ippMonitor/def/detProcessedExp.d
===================================================================
--- trunk/ippMonitor/def/detProcessedExp.d	(revision 9399)
+++ trunk/ippMonitor/def/detProcessedExp.d	(revision 9439)
@@ -8,7 +8,7 @@
 FIELD exp_tag, 	 15,   Exposure,  value
 FIELD b2_uri, 	  8,   image,     image=$b2_uri,  detProcessedImfile.php, det_id=$det_id,exp_tag=$exp_tag,image=$b1_uri
-FIELD bg, 	 10,   bg,        value
-FIELD bg_stdev,  10,   bg_stdev,  value
+FIELD bg, 	  8,   backgnd,   value
+FIELD bg_mean_stdev, 8, [stdev],  value
+FIELD bg_stdev,   8,   stdev,     value
 FIELD recipe,    15,   Recipe,    value
 FIELD b1_uri,  	 20,   b1_uri,    none
-# FIELD bg_mean_stdev, 20, bg_mean_stdev
Index: trunk/ippMonitor/def/detResidExp.d
===================================================================
--- trunk/ippMonitor/def/detResidExp.d	(revision 9399)
+++ trunk/ippMonitor/def/detResidExp.d	(revision 9439)
@@ -4,13 +4,13 @@
 MENU  ipp.detrend.dat
 
-#     field     size     name       show            link to             extras
-FIELD det_id,     7,   	 Det ID,    value
-FIELD exp_tag, 	 15,   	 Exposure,  value,          rawImfile.php,      exp_tag=$exp_tag
-FIELD b2_uri, 	  8,   	 image,     image=$b2_uri,  detResidImfile.php, det_id=$det_id,iteration=$iteration,exp_tag=$exp_tag,image=$b1_uri
-FIELD bg,         8,   	 backgnd,   value
-FIELD bg_stdev,   8,   	 bg_stdev,  value
-FIELD iteration,  5,   	 iter,      value
-FIELD accept,     4,   	 keep,      value
-FIELD b1_uri, 	 20,   	 b1_uri,    none
-# FIELD bg_mean_stdev, 20,   bg_mean_stdev
-# FIELD recipe, 	 15,   	 recipe,    value
+#     field        size    name       show            link to             extras
+FIELD det_id,        7,    Det ID,    value
+FIELD exp_tag, 	    15,    Exposure,  value,          rawImfile.php,      exp_tag=$exp_tag
+FIELD b2_uri, 	     8,    image,     image=$b2_uri,  detResidImfile.php, det_id=$det_id,iteration=$iteration,exp_tag=$exp_tag,image=$b1_uri
+FIELD bg,            8,    backgnd,   value
+FIELD bg_mean_stdev, 8,    [stdev]
+FIELD bg_stdev,      8,    stdev,     value
+FIELD iteration,     5,    iter,      value
+FIELD accept,        4,    keep,      value
+FIELD b1_uri, 	    20,    b1_uri,    none
+# FIELD recipe,     15,    recipe,    value
Index: trunk/ippMonitor/def/detRun.d
===================================================================
--- trunk/ippMonitor/def/detRun.d	(revision 9399)
+++ trunk/ippMonitor/def/detRun.d	(revision 9439)
@@ -5,5 +5,5 @@
 
 #     field      name         show    link to              extras
-FIELD position,  20,   det ID,      value,  detRunSummary.php,   det_id=$position
+FIELD det_id,    20,   det ID,      value,  detRunSummary.php,   det_id=$det_id
 FIELD iteration, 20,   iteration
 FIELD det_type,  20,   det_type
Index: trunk/ippMonitor/def/example.d
===================================================================
--- trunk/ippMonitor/def/example.d	(revision 9399)
+++ trunk/ippMonitor/def/example.d	(revision 9439)
@@ -9,5 +9,5 @@
 # the following WHERE clauses are added to all queries joined by AND
 WHERE detRunSummary.accept = 1
-WHERE detRun.position = detRunSummary.det_id
+WHERE detRun.det_it = detRunSummary.det_id
 WHERE detRun.iteration = detRunSummary.iteration
 
@@ -26,4 +26,4 @@
 # SELECT detRunSummary.det_id,detRunSummary.iteration,detRunSummary.iteration,detRun.det_type,detRunSummary.bg,detRunSummary.bg_stdev \
 # FROM detRunSummary, detRun \
-# WHERE detRunSummary.accept = 1 AND detRun.position = detRunSummary.det_id AND detRun.iteration = detRunSummary.iteration \
+# WHERE detRunSummary.accept = 1 AND detRun.det_id = detRunSummary.det_id AND detRun.iteration = detRunSummary.iteration \
 # LIMIT 20
Index: trunk/ippMonitor/def/masterDetrendFrames.d
===================================================================
--- trunk/ippMonitor/def/masterDetrendFrames.d	(revision 9399)
+++ trunk/ippMonitor/def/masterDetrendFrames.d	(revision 9439)
@@ -9,14 +9,14 @@
 # the following WHERE clauses are added to all queries joined by AND
 WHERE detRunSummary.accept = 1
-WHERE detRun.position = detRunSummary.det_id
+WHERE detRun.det_id = detRunSummary.det_id
 WHERE detRun.iteration = detRunSummary.iteration
 
-#     field                    width name          show         link to            extras
-FIELD detRunSummary.det_id,    7,    det_id,       value,       detRunSummary.php, det_id=$detRunSummary.det_id
+#     field                    width name          show         link to                   extras
+FIELD detRunSummary.det_id,    7,    det_id,       value,       detRunSummary.php,        det_id=$detRunSummary.det_id
 FIELD detRunSummary.iteration, 5,    iter
 FIELD detRun.det_type,         5,    type
-FIELD *,                       20,   choose,       value=files, masterDetrendImfiles.php,  det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration
-FIELD *,                       20,   choose,       value=input, detInputExp.php,  det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration
-FIELD *,                       20,   choose,       value=resid, detResidExp.php,  det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration
+FIELD *,                       20,   choose,       value=files, detNormalizedImfiles.php, det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration
+FIELD *,                       20,   choose,       value=input, detInputExp.php,          det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration
+FIELD *,                       20,   choose,       value=resid, detResidExp.php,          det_id=$detRunSummary.det_id,iteration=$detRunSummary.iteration
 FIELD detRunSummary.bg,        20,   bg
 FIELD detRunSummary.bg_stdev,  20,   bg_stdev
@@ -27,4 +27,4 @@
 # SELECT detRunSummary.det_id,detRunSummary.iteration,detRunSummary.iteration,detRun.det_type,detRunSummary.bg,detRunSummary.bg_stdev \
 # FROM detRunSummary, detRun \
-# WHERE detRunSummary.accept = 1 AND detRun.position = detRunSummary.det_id AND detRun.iteration = detRunSummary.iteration \
+# WHERE detRunSummary.accept = 1 AND detRun.det_id = detRunSummary.det_id AND detRun.iteration = detRunSummary.iteration \
 # LIMIT 20
