Index: trunk/ippMonitor/Makefile
===================================================================
--- trunk/ippMonitor/Makefile	(revision 10963)
+++ trunk/ippMonitor/Makefile	(revision 11490)
@@ -52,7 +52,10 @@
 $(DESTBIN)/pzPendingExp.php \
 $(DESTBIN)/pzPendingImfile.php \
+$(DESTBIN)/rawUnknownExp.php \
 $(DESTBIN)/rawDetrendExp.php \
 $(DESTBIN)/rawDetrendExp_detrend.php \
 $(DESTBIN)/rawImfile.php \
+$(DESTBIN)/rawImfile_failed.php \
+$(DESTBIN)/rawExp_failed.php \
 $(DESTBIN)/rawScienceExp.php \
 $(DESTBIN)/summitExp.php
Index: trunk/ippMonitor/def/detNormalizedExp.d
===================================================================
--- trunk/ippMonitor/def/detNormalizedExp.d	(revision 10963)
+++ trunk/ippMonitor/def/detNormalizedExp.d	(revision 11490)
@@ -10,5 +10,5 @@
 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 b2_uri,        8,     image,     image=$b1_uri@PPIMAGE.JPEG2,  detNormalizedImfile.php, det_id=$det_id,iteration=$iteration,image=$b1_uri@PPIMAGE.JPEG1
 #FIELD b1_uri, 20,   b1_uri
 #FIELD recipe, 20,   recipe
Index: trunk/ippMonitor/def/detProcessedExp.d
===================================================================
--- trunk/ippMonitor/def/detProcessedExp.d	(revision 10963)
+++ trunk/ippMonitor/def/detProcessedExp.d	(revision 11490)
@@ -7,5 +7,5 @@
 FIELD det_id,     7,   Det ID,    value
 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 b2_uri, 	  8,   image,     image=$b1_uri@PPIMAGE.JPEG2,  detProcessedImfile.php, det_id=$det_id,exp_tag=$exp_tag,image=$b1_uri@PPIMAGE.JPEG1
 FIELD bg, 	  8,   backgnd,   value
 FIELD bg_mean_stdev, 8, [stdev],  value
Index: trunk/ippMonitor/def/detResidExp.d
===================================================================
--- trunk/ippMonitor/def/detResidExp.d	(revision 10963)
+++ trunk/ippMonitor/def/detResidExp.d	(revision 11490)
@@ -4,8 +4,8 @@
 MENU  ipp.detrend.dat
 
-#     field        size    name       show            link to             extras
+#     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 exp_tag, 	    15,    Exposure,  value,  rawImfile.php,       exp_tag=$exp_tag
+FIELD b2_uri, 	     8,    image,     image=$b1_uri@PPIMAGE.JPEG2, detResidImfile.php, det_id=$det_id,iteration=$iteration,exp_tag=$exp_tag,image=$b1_uri@PPIMAGE.JPEG1
 FIELD bg,            8,    backgnd,   value
 FIELD bg_mean_stdev, 8,    [stdev]
Index: trunk/ippMonitor/def/newExp.d
===================================================================
--- trunk/ippMonitor/def/newExp.d	(revision 10963)
+++ trunk/ippMonitor/def/newExp.d	(revision 11490)
@@ -9,4 +9,3 @@
 FIELD    camera,	20,   camera
 FIELD    telescope,	20,   telescope
-FIELD    exp_type,	20,   type
 FIELD    imfiles,	20,   N imfiles
Index: trunk/ippMonitor/def/p3ProcessedExp.d
===================================================================
--- trunk/ippMonitor/def/p3ProcessedExp.d	(revision 10963)
+++ trunk/ippMonitor/def/p3ProcessedExp.d	(revision 11490)
@@ -6,5 +6,5 @@
 #     field         size   name       show            link to                extras
 FIELD exp_tag, 	     15,   Exposure,  value
-FIELD b2_uri, 	      8,   image,     image=$b2_uri,  p2ProcessedImfile.php, exp_tag=$exp_tag,image=$b1_uri
+FIELD b2_uri, 	      8,   image,     image=$b1_uri@PPIMAGE.JPEG2, p2ProcessedImfile.php, exp_tag=$exp_tag,image=$b1_uri@PPIMAGE.JPEG1
 FIELD bg, 	      8,   backgnd,   value
 FIELD bg_mean_stdev,  8,   [stdev],   value
Index: trunk/ippMonitor/def/rawDetrendExp.d
===================================================================
--- trunk/ippMonitor/def/rawDetrendExp.d	(revision 10963)
+++ trunk/ippMonitor/def/rawDetrendExp.d	(revision 11490)
@@ -1,6 +1,9 @@
-TABLE rawDetrendExp
+TABLE rawExp
 TITLE Raw Detrend Exposures
 FILE  rawDetrendExp.php
 MENU  ipp.copy.dat
+
+# limit this table to non-OBJECT types of images
+WHERE rawExp.exp_type != 'OBJECT'
 
 #        field        name  show           link to  extras
Index: trunk/ippMonitor/def/rawDetrendExp_detrend.d
===================================================================
--- trunk/ippMonitor/def/rawDetrendExp_detrend.d	(revision 10963)
+++ trunk/ippMonitor/def/rawDetrendExp_detrend.d	(revision 11490)
@@ -1,13 +1,22 @@
-TABLE rawDetrendExp
+TABLE rawExp
 TITLE Raw Detrend Exposures
 FILE  rawDetrendExp.php
 MENU  ipp.detrend.dat
 
+# limit this table to non-OBJECT types of images
+WHERE rawExp.exp_type != 'OBJECT'
+
 #        field        name           show     link to         extras
-FIELD    exp_tag,      20,   exposure ID,   value,   rawImfile.php,  exp_tag=$exp_tag
-FIELD    telescope,   20,   Telescope
-FIELD    camera,      20,   Camera
-FIELD    exp_type,    20,   Type    
-FIELD    filter,      20,   FILTER
+FIELD    exp_tag,     10,   exposure ID,   value,   rawImfile.php,  exp_tag=$exp_tag
+FIELD    telescope,   10,   Telescope
+FIELD    camera,      10,   Camera
+FIELD    exp_type,    10,   Type    
+FIELD    filter,      10,   FILTER
+FIELD    dateobs,     20,   Date/Time
+FIELD    exp_time,     5,   exp_time    
+FIELD    airmass,      5,   airmass     
+FIELD    bg,           5,   backgnd
+FIELD    bg_stdev,     5,   stdev    
+FIELD    bg_mean_stdev, 5,  &lt;backgnd&gt;
 # FIELD    imfiles,   20,   imfiles     
 # FIELD    airmass,   20,   airmass     
Index: trunk/ippMonitor/def/rawImfile.d
===================================================================
--- trunk/ippMonitor/def/rawImfile.d	(revision 10963)
+++ trunk/ippMonitor/def/rawImfile.d	(revision 11490)
@@ -3,4 +3,6 @@
 FILE  rawImfile.php
 MENU  ipp.imfiles.dat
+
+HEAD PHP insert_backref ("rawUnknownExp.php", "exp_tag", $ID['link']);
 
 #        field        name   show         link to         extras
Index: trunk/ippMonitor/def/rawScienceExp.d
===================================================================
--- trunk/ippMonitor/def/rawScienceExp.d	(revision 10963)
+++ trunk/ippMonitor/def/rawScienceExp.d	(revision 11490)
@@ -1,6 +1,9 @@
-TABLE rawScienceExp
+TABLE rawExp
 TITLE Raw Science Exposures
 FILE  rawScienceExp.php
 MENU  ipp.copy.dat
+
+# limit this table to OBJECT types of images
+WHERE rawExp.exp_type = 'OBJECT'
 
 #        field        name           show          link to   extras
Index: trunk/ippMonitor/generate
===================================================================
--- trunk/ippMonitor/generate	(revision 10963)
+++ trunk/ippMonitor/generate	(revision 11490)
@@ -338,6 +338,17 @@
 		if ($field[$i] eq "*") { next; }
 		if ($value =~ m|^\$$field[$i]|) {
+		    # print "field: $field[$i]\n";
+		    ($name, $extra) = $value =~ m|^\$($field[$i])\@(\S+)|;
+		    # print "name: $name\n";
+		    # print "extra: $extra\n";
+		    # print "value: $value\n";
+
 		    $Nrow = $count[$i];
-		    $value = "\$row[$Nrow]";
+		    if ($extra) {
+			$value = "\$row[$Nrow]\@$extra";
+		    } else {
+			$value = "\$row[$Nrow]";
+		    }
+		    # print "outval: $value\n";
 		    last MATCH_LABEL;
 		}
Index: trunk/ippMonitor/raw/getimage.php
===================================================================
--- trunk/ippMonitor/raw/getimage.php	(revision 10963)
+++ trunk/ippMonitor/raw/getimage.php	(revision 11490)
@@ -13,10 +13,31 @@
 }
 
-$basename = escapeshellarg($_GET[name]);
-$basename = str_replace ('..','',$basename);
-
 putenv("PERL5LIB=$PERLLIB:");
 $PATH = getenv("PATH");
 putenv("PATH=$BINDIR:$PATH");
+
+# echo "args: $args<br>";
+
+# $basename may contain filename@filerule
+$basename = strtok($_GET[name],"@");
+$filerule = strtok("@");
+
+# echo "basename: $basename<br>";
+# echo "filerule: $filerule<br>";
+
+# need to supply the camera as well...
+# exec ("ipp_filerule.pl --site=$SITE $basename", $output, $status);
+
+if ($filerule) {
+  if ($filerule == "PPIMAGE.JPEG1") {
+    $basename = "$basename.b1.jpg";
+  }
+  if ($filerule == "PPIMAGE.JPEG2") {
+    $basename = "$basename.b2.jpg";
+  }
+}
+
+$basename = escapeshellarg($basename);
+$basename = str_replace ('..','',$basename);
 
 exec ("ipp_datapath.pl --site=$SITE $basename", $output, $status);
Index: trunk/ippMonitor/raw/ipp.copy.dat
===================================================================
--- trunk/ippMonitor/raw/ipp.copy.dat	(revision 10963)
+++ trunk/ippMonitor/raw/ipp.copy.dat	(revision 11490)
@@ -26,6 +26,10 @@
 menulink  | menuselect 	 | link    | Raw Detrend Exp              | rawDetrendExp.php             
 menulink  | menuselect 	 | link    | Raw Science Exp              | rawScienceExp.php             
+menulink  | menuselect 	 | link    | Raw Unknown Exp              | rawUnknownExp.php             
 menutop   | menutop      | plain   | &nbsp;                       | 
 menulink  | menuselect 	 | link    | Summit Exp                   | summitExp.php                         
 menulink  | menuselect 	 | link    | Copy Pending Exp             | pzPendingExp.php              
 menulink  | menuselect 	 | link    | New Exp                      | newExp.php                    
+menutop   | menutop      | plain   | &nbsp;                       | 
+menulink  | menuselect 	 | link    | Failed Raw Imfiles           | rawImfile_failed.php                         
+menulink  | menuselect 	 | link    | Failed Raw Exp               | rawExp_failed.php                    
Index: trunk/ippMonitor/raw/ipp.php
===================================================================
--- trunk/ippMonitor/raw/ipp.php	(revision 10963)
+++ trunk/ippMonitor/raw/ipp.php	(revision 11490)
@@ -200,5 +200,5 @@
   echo "<body>\n";
 
-  $root = "/phpipp";
+  $root = "/ippMonitor";
 
   if (! $project) { $project = "none"; }
@@ -307,4 +307,19 @@
 }
 
+// expect image supplied with key=name
+// this function should define matching hidden inputs in the form
+function insert_backref ($page, $key, $link) {
+
+  if ($_SERVER[REQUEST_METHOD] == 'GET') { 
+    $name = $_GET[$key]; 
+  } else {
+    $name = $_POST[$key]; 
+  }
+
+  if ($name) {
+    echo "back to <a href=\"$page?$link&$key=$name\"> $name </a><br>\n";
+  }
+}
+
 // $myPage = $_SERVER[SCRIPT_NAME] . "?pass=$pass";
 
