Index: trunk/ippMonitor/def/autocode.php
===================================================================
--- trunk/ippMonitor/def/autocode.php	(revision 14096)
+++ trunk/ippMonitor/def/autocode.php	(revision 14113)
@@ -28,4 +28,5 @@
 // get the result table count
 $sql = "SELECT count(*) FROM $TABLE $WHERE";
+// echo "<br><small><b> count query : $sql </b></small><br>\n";
 
 $qry = $db->query($sql);
@@ -51,4 +52,5 @@
 // query the database
 $sql = "SELECT $FIELDS FROM $TABLE $WHERE LIMIT $dTABLE OFFSET $rowStart";
+// echo "<br><small><b> table query : $sql </b></small><br>\n";
 
 $qry = $db->query($sql);
Index: trunk/ippMonitor/def/camProcessedExp.d
===================================================================
--- trunk/ippMonitor/def/camProcessedExp.d	(revision 14096)
+++ trunk/ippMonitor/def/camProcessedExp.d	(revision 14113)
@@ -4,32 +4,45 @@
 MENU  ipp.science.dat
 
+# the following WHERE clauses are added to all queries joined by AND
 WHERE camRun.state = 'stop'
 WHERE camRun.chip_id = chipRun.chip_id
 WHERE chipRun.exp_id = rawExp.exp_id
-WHERE camProcessedExp.cam_id = camRun.cam_id
+WHERE camProcessedExp.cam_id  = camRun.cam_id
 WHERE camProcessedExp.chip_id = camRun.chip_id
 
+# define image names to be used below
+# IMAGE VAR basename filerule camera class_id
+IMAGE JPEG2 $camProcessedExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE
+
+# define the arguments supplied to the links below (if any)
 ARGS  ARG1  chipRun.exp_id=$chipRun.exp_id
 
-#     field                     size  name          show   link to                  extras
-FIELD camRun.cam_id,             5,   chip ID,      value, chipProcessedExp.php,    ARG1
-FIELD chipRun.chip_id,           5,   cam ID
-FIELD chipRun.exp_id,	         5,   exposure ID,  value, chipProcessedImfile.php, ARG1
-FIELD rawExp.exp_name,     	 5,   Exp Name,     value, rawImfile.php,  ARG1
-FIELD rawExp.telescope,      	10,   Telescope
-FIELD rawExp.camera,         	10,   Camera
-FIELD rawExp.dateobs,        	20,   Date/Time
-FIELD rawExp.filter,         	10,   FILTER
-FIELD rawExp.ra,       	         5,   RA    
-FIELD rawExp.decl,       	 5,   Dec
-FIELD rawExp.exp_time,       	 5,   exp_time    
-FIELD rawExp.sat_pixel_frac, 	 5,   f(sat pixels)
-FIELD rawExp.airmass,        	 5,   airmass     
-FIELD rawExp.bg,             	 5,   backgnd
-FIELD rawExp.bg_stdev,       	 5,   stdev    
-FIELD rawExp.bg_mean_stdev,  	 5,   &lt;backgnd&gt;
+ARGS  ARG2 camRun.cam_id=$camRun.cam_id
+ARGS  ARG2 rawExp.exp_id=$rawExp.exp_id
+ARGS  ARG2 camera=$rawExp.camera
+ARGS  ARG2 basename=$camProcessedExp.path_base
 
-FIELD camProcessedExp.n_stars,  5, Nstars
-FIELD camProcessedExp.n_astrom, 5, Nastrom
-FIELD camProcessedExp.sigma_ra, 5, sigma ra
-FIELD camProcessedExp.fwhm,     5, FHWM
+#     field                     	size  name          show   	 link to                  extras
+FIELD rawExp.exp_name,     		 5,   Exp Name,     value, 	 rawImfile.php,  ARG1
+FIELD chipRun.exp_id,	        	 5,   Exp ID,       value, 	 chipProcessedImfile.php, ARG1
+FIELD chipRun.chip_id,          	 5,   chip ID
+FIELD camRun.cam_id,            	 5,   cam ID,       value, 	 chipProcessedExp.php,    ARG1
+FIELD *,    	                	 8,   image,        image=JPEG2, camProcessedImfile.php,  ARG2
+FIELD rawExp.telescope,      		10,   Telescope
+FIELD rawExp.camera,         		10,   Camera
+FIELD rawExp.dateobs,        		20,   Date/Time
+FIELD rawExp.filter,         		10,   FILTER
+FIELD rawExp.ra,       	        	 5,   RA    
+FIELD rawExp.decl,       		 5,   Dec
+FIELD rawExp.exp_time,       		 5,   exp_time    
+FIELD rawExp.sat_pixel_frac, 		 5,   f(sat pixels)
+FIELD rawExp.airmass,        		 5,   airmass     
+FIELD camProcessedExp.bg,             	 5,   backgnd
+FIELD camProcessedExp.bg_stdev,       	 5,   stdev    
+FIELD camProcessedExp.bg_mean_stdev,  	 5,   &lt;backgnd&gt;
+FIELD camProcessedExp.n_stars,  	 5,   Nstars
+FIELD camProcessedExp.n_astrom, 	 5,   Nastrom
+FIELD camProcessedExp.sigma_ra, 	 5,   sigma ra
+FIELD camProcessedExp.fwhm,     	 5,   FHWM
+FIELD camProcessedExp.path_base,     	 5,   path_base,    none
+FIELD rawExp.exp_id,     		 5,   Exp ID,       none
Index: trunk/ippMonitor/def/camProcessedImfile.d
===================================================================
--- trunk/ippMonitor/def/camProcessedImfile.d	(revision 14113)
+++ trunk/ippMonitor/def/camProcessedImfile.d	(revision 14113)
@@ -0,0 +1,30 @@
+TABLE camRun, camProcessedExp, chipRun, rawExp, chipProcessedImfile
+TITLE Camera Processed
+FILE  camProcessedExp.php
+MENU  ipp.science.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+WHERE camRun.state = 'stop'
+WHERE camRun.chip_id = chipRun.chip_id
+WHERE chipRun.exp_id = rawExp.exp_id
+WHERE camProcessedExp.cam_id = camRun.cam_id
+WHERE camProcessedExp.chip_id = camRun.chip_id
+WHERE chipProcessedImfile.chip_id = camRun.chip_id
+
+#     field                     	size  name          show   	 link to                  extras
+FIELD camRun.cam_id,            	 5,   cam ID,       value
+FIELD chipRun.chip_id,          	 5,   chip ID
+FIELD rawExp.exp_id,	        	 5,   exposure ID,  value
+FIELD rawExp.exp_name,     		 5,   Exp Name,     value
+FIELD rawExp.telescope,      		10,   Telescope
+FIELD rawExp.camera,         		10,   Camera
+FIELD chipProcessedImfile.bg,            5,   backgnd
+FIELD chipProcessedImfile.bg_stdev,      5,   stdev    
+FIELD chipProcessedImfile.bg_mean_stdev, 5,   &lt;backgnd&gt;
+FIELD chipProcessedImfile.n_stars,  	 5,   Nstars
+FIELD chipProcessedImfile.n_astrom, 	 5,   Nastrom
+FIELD chipProcessedImfile.sigma_ra, 	 5,   sigma ra
+FIELD chipProcessedImfile.fwhm,     	 5,   FHWM
+
+TAIL PHP insert_image ('PPIMAGE.JPEG1');
+TAIL PHP insert_log ('LOG.EXP');
Index: trunk/ippMonitor/def/chipProcessedExp.d
===================================================================
--- trunk/ippMonitor/def/chipProcessedExp.d	(revision 14096)
+++ trunk/ippMonitor/def/chipProcessedExp.d	(revision 14113)
@@ -1,5 +1,5 @@
-TABLE chipRun, rawExp, chipProcessedImfile
+TABLE chipRun, rawExp
 TITLE chip Processed Exposures
-FILE  chipPendingExp.php
+FILE  chipProcessedExp.php
 MENU  ipp.science.dat
 
@@ -7,13 +7,12 @@
 WHERE chipRun.state = 'stop'
 WHERE chipRun.exp_id = rawExp.exp_id
-WHERE chipProcessedImfile.exp_id = chipRun.exp_id
-WHERE chipProcessedImfile.chip_id = chipRun.chip_id
 
 ARGS  ARG1  exp_id=$chipRun.exp_id
+ARGS  ARG2  chipRun.chip_id=$chipRun.chip_id
 
-#     field                   size  name         show    link to         extras
+#     field                   size  name         show    link to                  extras
 FIELD chipRun.chip_id,    	 7, chip ID
-FIELD chipRun.exp_id,     	 5, Exp ID
-FIELD rawExp.exp_name,     	 5, Exp Name,    value,  rawImfile.php,  ARG1
+FIELD chipRun.exp_id,     	 5, Exp ID,      value,  rawImfile.php,           ARG1
+FIELD rawExp.exp_name,     	 5, Exp Name,    value,  chipProcessedImfile.php, ARG2
 FIELD rawExp.telescope,      	10, Telescope
 FIELD rawExp.camera,         	10, Camera
@@ -29,9 +28,4 @@
 FIELD rawExp.bg_mean_stdev,  	 5, &lt;backgnd&gt;
 
-FIELD chipProcessedImfile.n_stars,  5, Nstars
-FIELD chipProcessedImfile.n_astrom, 5, Nastrom
-FIELD chipProcessedImfile.sigma_ra, 5, sigma ra
-FIELD chipProcessedImfile.fwhm,     5, FHWM
-
 # FIELD chipPendingExp.reduction,    20,   reduction
 # FIELD chipPendingExp.guide_id,     20, guide ID
Index: trunk/ippMonitor/def/chipProcessedImfile.d
===================================================================
--- trunk/ippMonitor/def/chipProcessedImfile.d	(revision 14096)
+++ trunk/ippMonitor/def/chipProcessedImfile.d	(revision 14113)
@@ -1,15 +1,37 @@
-TABLE chipProcessedImfile, chipProcessedExp
-TITLE chipProcessedImfile
+TABLE chipRun, rawExp, chipProcessedImfile
+TITLE chip Processed Imfile
 FILE  chipProcessedImfile.php
-MENU  ipp.imfiles.dat
+MENU  ipp.science.dat
 
-WHERE chipProcessedImfile.chip_id = chipProcessedExp.chip_id
+# limit this table to non-OBJECT types of images
+WHERE chipRun.state = 'stop'
+WHERE chipRun.exp_id = rawExp.exp_id
+WHERE chipProcessedImfile.exp_id = chipRun.exp_id
+WHERE chipProcessedImfile.chip_id = chipRun.chip_id
 
-#     field                          	  size  name        show  link to     extras
-FIELD chipProcessedExp.exp_id,	     	  15,   Exposure
-FIELD chipProcessedImfile.class_id,  	  8,    Chip ID
-FIELD chipProcessedImfile.bg,	     	  8,    backgnd
-FIELD chipProcessedImfile.bg_mean_stdev,  8,    [stdev]
-FIELD chipProcessedImfile.bg_stdev,	  8,    stdev
+ARGS  ARG1  exp_id=$chipRun.exp_id
 
-TAIL PHP insert_image ('PPIMAGE.JPEG1');
+#     field                   size  name         show    link to                  extras
+FIELD chipRun.chip_id,    	 7, chip ID
+FIELD chipRun.exp_id,     	 5, Exp ID,      value,  rawImfile.php,           ARG1
+FIELD rawExp.exp_name,     	 5, Exp Name,    value,  chipProcessedImfile.php, ARG2
+FIELD rawExp.telescope,      	10, Telescope
+FIELD rawExp.camera,         	10, Camera
+FIELD rawExp.dateobs,        	20, Date/Time
+FIELD rawExp.filter,         	10, FILTER
+FIELD rawExp.ra,       	         5, RA    
+FIELD rawExp.decl,       	 5, Dec
+FIELD rawExp.exp_time,       	 5, exp_time    
+FIELD rawExp.sat_pixel_frac, 	 5, f(sat pixels)
+FIELD rawExp.airmass,        	 5, airmass     
+FIELD chipProcessedImfile.bg,             	 5, backgnd
+FIELD chipProcessedImfile.bg_stdev,       	 5, stdev    
+FIELD chipProcessedImfile.bg_mean_stdev,  	 5, &lt;backgnd&gt;
+
+FIELD chipProcessedImfile.n_stars,  5, Nstars
+FIELD chipProcessedImfile.n_astrom, 5, Nastrom
+FIELD chipProcessedImfile.sigma_ra, 5, sigma ra
+FIELD chipProcessedImfile.fwhm,     5, FHWM
+
+# FIELD chipPendingExp.reduction,    20,   reduction
+# FIELD chipPendingExp.guide_id,     20, guide ID
Index: trunk/ippMonitor/def/detResidExp.d
===================================================================
--- trunk/ippMonitor/def/detResidExp.d	(revision 14096)
+++ trunk/ippMonitor/def/detResidExp.d	(revision 14113)
@@ -14,7 +14,7 @@
 ARGS  ARG1 exp_id=$detResidExp.exp_id
 
-ARGS  ARG2 det_id=$detResidExp.det_id
-ARGS  ARG2 iteration=$detResidExp.iteration
-ARGS  ARG2 exp_id=$detResidExp.exp_id
+ARGS  ARG2 detResidImfile.det_id=$detResidExp.det_id
+ARGS  ARG2 detResidImfile.iteration=$detResidExp.iteration
+ARGS  ARG2 detResidImfile.exp_id=$detResidExp.exp_id
 ARGS  ARG2 camera=$rawExp.camera
 ARGS  ARG2 basename=$detResidExp.path_base
Index: trunk/ippMonitor/def/detResidImfile.d
===================================================================
--- trunk/ippMonitor/def/detResidImfile.d	(revision 14096)
+++ trunk/ippMonitor/def/detResidImfile.d	(revision 14113)
@@ -5,5 +5,5 @@
 
 # the following WHERE clauses are added to all queries joined by AND
-WHERE detResidExp.exp_id = rawExp.exp_id
+WHERE detResidImfile.exp_id = rawExp.exp_id
 
 #     field                         size   name        show  link to     extras
Index: trunk/ippMonitor/raw/ipp.science.dat
===================================================================
--- trunk/ippMonitor/raw/ipp.science.dat	(revision 14096)
+++ trunk/ippMonitor/raw/ipp.science.dat	(revision 14113)
@@ -29,4 +29,5 @@
 menutop   | menuselect 	 | plain   | Guide Processed Exp          | 
 menulink  | menuselect 	 | link    | Chip Processed Exp           | chipProcessedExp.php            
+menulink  | menuselect 	 | link    | Chip Processed Imfiles       | chipProcessedImfile.php            
 menulink  | menuselect 	 | link    | Cam Processed Exp            | camProcessedExp.php            
 menutop   | menutop      | plain   | &nbsp;                       | 
