Index: trunk/ippMonitor/raw/simplePlotcam.php
===================================================================
--- trunk/ippMonitor/raw/simplePlotcam.php	(revision 31102)
+++ trunk/ippMonitor/raw/simplePlotcam.php	(revision 34431)
@@ -28,5 +28,5 @@
 // define restrictiosn to the queries
 // ** TABLE RESTRICTIONS **
-$WHERE = "WHERE camRun.state != 'new' AND chipRun.exp_id = rawExp.exp_id AND camRun.chip_id = chipRun.chip_id";
+$WHERE = "WHERE camRun.state != 'new' AND chipRun.exp_id = rawExp.exp_id AND camRun.chip_id = chipRun.chip_id AND camProcessedExp.cam_id = camRun.cam_id";
 $WHERE = check_restrict ('rawExp.exp_name', $WHERE, 'string', 1.0);
 $WHERE = check_restrict ('rawExp.exp_id', $WHERE, 'string', 1.0);
@@ -62,4 +62,7 @@
 $WHERE = check_restrict ('rawExp.bg_stdev', $WHERE, 'max', 1.0);
 $WHERE = check_restrict ('rawExp.comment', $WHERE, 'string', 1.0);
+$WHERE = check_restrict ('camProcessedExp.fwhm_major', $WHERE, 'string', 1.0);
+$WHERE = check_restrict ('camProcessedExp.fwhm_major', $WHERE, 'min', 1.0);
+$WHERE = check_restrict ('camProcessedExp.fwhm_major', $WHERE, 'max', 1.0);
 $WHERE = check_ordering ('', $WHERE);
 
@@ -73,14 +76,14 @@
 
 // get the result table count
-$sql = "SELECT count(*) FROM camRun, chipRun, rawExp $WHERE";
+$sql = "SELECT count(*) FROM camProcessedExp, camRun, chipRun, rawExp $WHERE";
 
 $qry = $db->query($sql);
 if (dberror($qry)) {
-  echo "<b>error reading camRun, chipRun, rawExp table count</b><br>\n";
+  echo "<b>error reading camProcessedExp, camRun, chipRun, rawExp table count</b><br>\n";
   echo "<br><small><b> count query : $sql </b></small><br>\n";
   menu_end();
 }
 if (!$qry->fetchInto($row)) {
-  echo "<b>error reading camRun, chipRun, rawExp table count</b><br>\n";
+  echo "<b>error reading camProcessedExp, camRun, chipRun, rawExp table count</b><br>\n";
   echo "<br><small><b> count query : $sql </b></small><br>\n";
   menu_end();
@@ -128,5 +131,7 @@
 $buttonLink = button_restrict_max ('rawExp.bg_stdev', $buttonLink);
 $buttonLink = button_restrict_string ('rawExp.comment', $buttonLink);
-
+$buttonLink = button_restrict_string ('camProcessedExp.fwhm_major', $buttonLink);
+$buttonLink = button_restrict_min ('camProcessedExp.fwhm_major', $buttonLink);
+$buttonLink = button_restrict_max ('camProcessedExp.fwhm_major', $buttonLink);
 // set up the table
 echo "<table class=list>\n";
@@ -181,4 +186,5 @@
 write_header_cell ("list", "stdev    ");
 write_header_cell ("list", "Date/Time");
+write_header_cell ("list", "Cam FWHM_major");
 echo "</tr>\n";
 
@@ -193,4 +199,5 @@
 write_query_row ('rawExp.bg_stdev', 5, 'min');
 write_query_row ('rawExp.dateobs', 19, 'min');
+write_query_row ('camProcessedExp.fwhm_major', 5, 'min');
 echo "</tr><tr><td>&le;</td>\n";
 echo "<td> &nbsp; </td>\n";
@@ -201,4 +208,5 @@
 write_query_row ('rawExp.bg_stdev', 5, 'max');
 write_query_row ('rawExp.dateobs', 19, 'max');
+write_query_row ('camProcessedExp.fwhm_major', 5, 'max');
 echo "</tr>\n";
 
@@ -228,5 +236,5 @@
 
 // query the database
-$sql = "SELECT rawExp.ra,rawExp.decl,rawExp.filter FROM camRun, chipRun, rawExp $WHERE";
+$sql = "SELECT rawExp.ra,rawExp.decl,rawExp.filter FROM camProcessedExp, camRun, chipRun, rawExp $WHERE";
 
 $qry = $db->query($sql);
