Index: trunk/ippMonitor/Makefile.in
===================================================================
--- trunk/ippMonitor/Makefile.in	(revision 19524)
+++ trunk/ippMonitor/Makefile.in	(revision 19726)
@@ -63,9 +63,19 @@
 $(DESTWWW)/detProcessedImfile.php \
 $(DESTWWW)/detProcessedExp.php \
+$(DESTWWW)/detProcessedExp_noimage.php \
 $(DESTWWW)/detResidExp.php \
+$(DESTWWW)/detResidExp_noimage.php \
 $(DESTWWW)/detResidImfile.php \
+$(DESTWWW)/detStackedImfile.php \
+$(DESTWWW)/detNormalizedExp_failure.php \
+$(DESTWWW)/detNormalizedImfile_failure.php \
+$(DESTWWW)/detNormalizedStatImfile_failure.php \
+$(DESTWWW)/detProcessedImfile_failure.php \
+$(DESTWWW)/detProcessedExp_failure.php \
+$(DESTWWW)/detResidExp_failure.php \
+$(DESTWWW)/detResidImfile_failure.php \
+$(DESTWWW)/detStackedImfile_failure.php \
 $(DESTWWW)/detRun.php \
 $(DESTWWW)/detRunSummary.php \
-$(DESTWWW)/detStackedImfile.php \
 $(DESTWWW)/newExp.php \
 $(DESTWWW)/newImfile.php \
Index: trunk/ippMonitor/def/detNormalizedExp_failure.d
===================================================================
--- trunk/ippMonitor/def/detNormalizedExp_failure.d	(revision 19726)
+++ trunk/ippMonitor/def/detNormalizedExp_failure.d	(revision 19726)
@@ -0,0 +1,22 @@
+TABLE detNormalizedExp, detRun
+TITLE detNormalizedExp Failures
+FILE  detNormalizedExp_failure.php
+MENU  ipp.detrend.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+WHERE detNormalizedExp.det_id = detRun.det_id
+WHERE detNormalizedExp.fault  > 0
+
+ARGS  ARG2 det_id=$detNormalizedExp.det_id
+ARGS  ARG2 iteration=$detNormalizedExp.iteration
+ARGS  ARG2 basename=$detNormalizedExp.path_base
+ARGS  ARG2 camera=$detRun.camera
+
+#     field        		      size   format  name     show          link to                  extras
+FIELD detNormalizedExp.det_id,        7,     %s,     det_id
+FIELD detNormalizedExp.bg,            8,     %s,     backgnd
+FIELD detNormalizedExp.bg_mean_stdev, 8,     %s,     [stdev]
+FIELD detNormalizedExp.bg_stdev,      8,     %s,     stdev
+FIELD detNormalizedExp.iteration,     5,     %s,     iteration
+FIELD detNormalizedExp.path_base,     20,    %s,     path_base, none
+FIELD detRun.camera,                  20,    %s,     camera,    none
Index: trunk/ippMonitor/def/detNormalizedImfile_failure.d
===================================================================
--- trunk/ippMonitor/def/detNormalizedImfile_failure.d	(revision 19726)
+++ trunk/ippMonitor/def/detNormalizedImfile_failure.d	(revision 19726)
@@ -0,0 +1,19 @@
+TABLE detNormalizedImfile
+TITLE detNormalizedImfile Failures
+FILE  detNormalizedImfile_failure.php
+MENU  ipp.detrend.dat
+
+WHERE fault > 0
+
+#     field         size  format  name     show   link to     extras
+FIELD det_id,          7, %s,     det_id
+FIELD class_id,        8, %s,     class_id
+FIELD bg,              8, %s,     backgnd
+FIELD bg_stdev,        8, %s,     stdev
+FIELD bg_mean_stdev,   8, %s,     [stdev]
+FIELD iteration,       5, %s,     iteration
+#FIELD uri,           20, %s,     uri
+#FIELD path_base,     20, %s,     path_base
+
+TAIL PHP insert_image ('PPIMAGE.JPEG1');
+TAIL PHP insert_log ('LOG.EXP');
Index: trunk/ippMonitor/def/detNormalizedStatImfile_failure.d
===================================================================
--- trunk/ippMonitor/def/detNormalizedStatImfile_failure.d	(revision 19726)
+++ trunk/ippMonitor/def/detNormalizedStatImfile_failure.d	(revision 19726)
@@ -0,0 +1,12 @@
+TABLE detNormalizedStatImfile
+TITLE detNormalizedStatImfile Failures
+FILE  detNormalizedStatImfile_failure.php
+MENU  ipp.detrend.dat
+
+where fault > 0
+
+#     field    size  format  name   show   link to     extras
+FIELD det_id,     7, %s,     det_id
+FIELD class_id,   8, %s,     class_id
+FIELD iteration,  5, %s,     iteration
+FIELD norm,       5, %s,     norm
Index: trunk/ippMonitor/def/detProcessedExp.d
===================================================================
--- trunk/ippMonitor/def/detProcessedExp.d	(revision 19524)
+++ trunk/ippMonitor/def/detProcessedExp.d	(revision 19726)
@@ -16,5 +16,5 @@
 ARGS  ARG1 basename=$detProcessedExp.path_base
 
-OP    OP1  $detProcessedExp.bg / $detProcessedExp.bg_stdev
+# OP    OP1  $detProcessedExp.bg_stdev > 0.0 ? $detProcessedExp.bg / $detProcessedExp.bg_stdev : NAN
 
 #     field                    size    	format  name       show          link to                 extras
@@ -28,5 +28,6 @@
 FIELD detProcessedExp.bg_mean_stdev, 8,	%.3f,   [stdev],   value
 FIELD detProcessedExp.bg_stdev,   8,   	%.3f,   stdev,     value
-FIELD *,                          8,    %.3f,   S/N,       op=OP1
+FIELD (detProcessedExp.bg/detProcessedExp.bg_stdev), 8, %.3f,   S/N,     value
+# FIELD *,                          8,    %.3f,   S/N,       op=OP1
 FIELD rawExp.dateobs,            19,   	%T,     obs date,  value
 FIELD rawExp.filter,             10,   	%s,     filter,    value
Index: trunk/ippMonitor/def/detProcessedExp_failure.d
===================================================================
--- trunk/ippMonitor/def/detProcessedExp_failure.d	(revision 19726)
+++ trunk/ippMonitor/def/detProcessedExp_failure.d	(revision 19726)
@@ -0,0 +1,37 @@
+TABLE detProcessedExp, rawExp
+TITLE detProcessedExp Failures
+FILE  detProcessedExp_failure.php
+MENU  ipp.detrend.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+WHERE detProcessedExp.exp_id = rawExp.exp_id
+WHERE detProcessedExp.fault > 0
+
+ARGS  ARG1 detProcessedImfile.det_id=$detProcessedExp.det_id
+ARGS  ARG1 detProcessedImfile.exp_id=$detProcessedExp.exp_id
+ARGS  ARG1 camera=$rawExp.camera
+ARGS  ARG1 basename=$detProcessedExp.path_base
+
+OP    OP1  $detProcessedExp.bg / $detProcessedExp.bg_stdev
+
+#     field                    size    	format  name       show          link to                 extras
+FIELD detProcessedExp.det_id,     7,   	%d,     Det ID,    value
+FIELD rawExp.camera,             10,    %s,     camera,    value
+FIELD detProcessedExp.exp_id, 	  5,   	%d,     Exp ID,    value
+FIELD rawExp.exp_name, 	          5,   	%s,     Exp Name,  value
+FIELD detProcessedExp.fault,      5,   	%d,     Fault,     value
+FIELD detProcessedExp.bg, 	  8,   	%.3f,   backgnd,   value
+FIELD detProcessedExp.bg_mean_stdev, 8,	%.3f,   [stdev],   value
+FIELD detProcessedExp.bg_stdev,   8,   	%.3f,   stdev,     value
+FIELD *,                          8,    %.3f,   S/N,       op=OP1
+FIELD rawExp.dateobs,            19,   	%T,     obs date,  value
+FIELD rawExp.filter,             10,   	%s,     filter,    value
+FIELD rawExp.exp_time,            8,   	%.2f,    exptime,   value
+FIELD rawExp.ccd_temp,            8,   	%.2f,    ccd temp,  value
+FIELD rawExp.airmass,             8,   	%.4f,    airmass,   value
+FIELD detProcessedExp.path_base, 20,   	%s,     path_base, none
+
+# TD_CLASS det_off $detProcessedExp.fault > 0
+
+# note: you must include all desired fields, where ever they are used,
+# in FIELD
Index: trunk/ippMonitor/def/detProcessedExp_noimage.d
===================================================================
--- trunk/ippMonitor/def/detProcessedExp_noimage.d	(revision 19726)
+++ trunk/ippMonitor/def/detProcessedExp_noimage.d	(revision 19726)
@@ -0,0 +1,42 @@
+TABLE detProcessedExp, rawExp
+TITLE detProcessedExp
+FILE  detProcessedExp_noimage.php
+MENU  ipp.detrend.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+WHERE detProcessedExp.exp_id = rawExp.exp_id
+
+# define image names to be used below
+# IMAGE VAR basename filerule camera class_id
+# IMAGE JPEG2 $detProcessedExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE
+
+ARGS  ARG1 detProcessedImfile.det_id=$detProcessedExp.det_id
+ARGS  ARG1 detProcessedImfile.exp_id=$detProcessedExp.exp_id
+ARGS  ARG1 camera=$rawExp.camera
+ARGS  ARG1 basename=$detProcessedExp.path_base
+
+# OP    OP1  $detProcessedExp.bg_stdev > 0.0 ? $detProcessedExp.bg / $detProcessedExp.bg_stdev : NAN
+
+#     field                    size    	format  name       show          link to                 extras
+FIELD detProcessedExp.det_id,     7,   	%d,     Det ID,    value
+FIELD rawExp.camera,             10,    %s,     camera,    value
+FIELD detProcessedExp.exp_id, 	  5,   	%d,     Exp ID,    value
+FIELD rawExp.exp_name, 	          5,   	%s,     Exp Name,  value
+FIELD detProcessedExp.fault,      5,   	%d,     Fault,     value
+# FIELD *, 	  		  8,   	%s,     image,     image=JPEG2,  detProcessedImfile.php, ARG1
+FIELD detProcessedExp.bg, 	  8,   	%.3f,   backgnd,   value
+FIELD detProcessedExp.bg_mean_stdev, 8,	%.3f,   [stdev],   value
+FIELD detProcessedExp.bg_stdev,   8,   	%.3f,   stdev,     value
+FIELD (detProcessedExp.bg/detProcessedExp.bg_stdev), 8, %.3f,   S/N,     value
+# FIELD *,                          8,    %.3f,   S/N,       op=OP1
+FIELD rawExp.dateobs,            19,   	%T,     obs date,  value
+FIELD rawExp.filter,             10,   	%s,     filter,    value
+FIELD rawExp.exp_time,            8,   	%.2f,    exptime,   value
+FIELD rawExp.ccd_temp,            8,   	%.2f,    ccd temp,  value
+FIELD rawExp.airmass,             8,   	%.4f,    airmass,   value
+FIELD detProcessedExp.path_base, 20,   	%s,     path_base, none
+
+# TD_CLASS det_off $detProcessedExp.fault > 0
+
+# note: you must include all desired fields, where ever they are used,
+# in FIELD
Index: trunk/ippMonitor/def/detProcessedImfile_failure.d
===================================================================
--- trunk/ippMonitor/def/detProcessedImfile_failure.d	(revision 19726)
+++ trunk/ippMonitor/def/detProcessedImfile_failure.d	(revision 19726)
@@ -0,0 +1,35 @@
+TABLE detProcessedImfile, rawExp, rawImfile
+TITLE detProcessedImfile Failures
+FILE  detProcessedImfile_failure.php
+MENU  ipp.detrend.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+WHERE detProcessedImfile.exp_id = rawExp.exp_id
+WHERE detProcessedImfile.exp_id = rawImfile.exp_id
+WHERE detProcessedImfile.class_id = rawImfile.class_id
+WHERE detProcessedImfile.fault > 0
+
+ARGS  ARG1 detProcessedImfile.det_id=$detProcessedImfile.det_id
+ARGS  ARG1 detProcessedImfile.exp_id=$detProcessedImfile.exp_id
+ARGS  ARG1 detProcessedImfile.class_id=$detProcessedImfile.class_id
+ARGS  ARG1 camera=$rawExp.camera
+ARGS  ARG1 basename=$detProcessedImfile.path_base
+ARGS  ARG1 class=$detProcessedImfile.class_id
+
+#     field                          size  format  name      show   link to     extras
+FIELD detProcessedImfile.det_id,       12, %d,     Det ID
+FIELD detProcessedImfile.exp_id,        5, %d,     Exp ID
+FIELD rawExp.exp_name,                  5, %s,     Exp Name
+FIELD detProcessedImfile.class_id,      8, %s,     Chip ID,  value,  detProcessedImfile_failure.php, ARG1
+FIELD detProcessedImfile.fault,         5, %d,     fault
+FIELD detProcessedImfile.bg, 	        8, %.2f,   backgnd
+FIELD detProcessedImfile.bg_stdev,      8, %.2f,   stdev
+FIELD detProcessedImfile.bg_mean_stdev, 8, %.2f,   [stdev]
+FIELD rawImfile.ccd_temp,               5, %.2f,   CCD Temp
+FIELD detProcessedImfile.path_base,    20, %s,     path_base
+
+FIELD rawExp.camera,                    5, %s,     Exp Name, none
+
+# TD_CLASS det_off $detProcessedImfile.fault > 0
+
+TAIL PHP insert_log ('LOG.IMFILE');
Index: trunk/ippMonitor/def/detResidExp.d
===================================================================
--- trunk/ippMonitor/def/detResidExp.d	(revision 19524)
+++ trunk/ippMonitor/def/detResidExp.d	(revision 19726)
@@ -22,5 +22,5 @@
 ARGS  ARG2 basename=$detResidExp.path_base
 
-OP    OP1  $detResidExp.bin_stdev > 0.0 ? $detResidExp.bg / $detResidExp.bin_stdev : NAN
+# OP    OP1  $detResidExp.bin_stdev > 0.0 ? $detResidExp.bg / $detResidExp.bin_stdev : NAN
 
 #     field                   size  format  name       show         link to              linkargs
@@ -38,5 +38,6 @@
 FIELD detResidExp.bg_stdev,      8, %.3f,   stdev,     value
 FIELD detResidExp.bin_stdev,     8, %.3f,   bin stdev, value
-FIELD *,                         8, %s,     S/N,       op=OP1
+FIELD (detResidExp.bg/detResidExp.bin_stdev), 8, %.3f, S/N, value
+# FIELD *,                         8, %s,     S/N,       op=OP1
 FIELD detResidExp.fringe_0,      8, %.3f,   fringe,    value
 FIELD detResidExp.fringe_1,      8, %.3f,   fringe err, value
Index: trunk/ippMonitor/def/detResidExp_failure.d
===================================================================
--- trunk/ippMonitor/def/detResidExp_failure.d	(revision 19726)
+++ trunk/ippMonitor/def/detResidExp_failure.d	(revision 19726)
@@ -0,0 +1,52 @@
+TABLE detResidExp, rawExp, detInputExp
+TITLE detResidExp Failures
+FILE  detResidExp_failure.php
+MENU  ipp.detrend.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+WHERE detResidExp.exp_id = rawExp.exp_id
+WHERE detResidExp.exp_id = detInputExp.exp_id
+WHERE detResidExp.iteration = detInputExp.iteration
+WHERE detResidExp.fault > 0
+
+# define the arguments supplied to the links below (if any)
+ARGS  ARG1 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
+
+OP    OP1  $detResidExp.bin_stdev > 0.0 ? $detResidExp.bg / $detResidExp.bin_stdev : NAN
+
+#     field                   size  format  name       show         link to              linkargs
+FIELD detResidExp.det_id,        7, %s,     Det ID,    value
+FIELD rawExp.camera,            10, %s,     camera,    value
+FIELD detResidExp.exp_id, 	 5, %s,     Exp ID,    value,       rawImfile.php,       ARG1
+FIELD rawExp.exp_name, 	         5, %s,     Exp Name,  value,       rawImfile.php,       ARG1
+FIELD detResidExp.iteration,     5, %s,     iter,      value
+FIELD detInputExp.include,       3, %t,     used,      value
+FIELD detResidExp.accept,        3, %t,     keep,      value
+FIELD detResidExp.fault,         4, %d,     fault,     value
+FIELD detResidExp.bg,            8, %.3f,   backgnd,   value
+FIELD detResidExp.bg_mean_stdev, 8, %.3f,   [stdev],   value
+FIELD detResidExp.bg_stdev,      8, %.3f,   stdev,     value
+FIELD detResidExp.bin_stdev,     8, %.3f,   bin stdev, value
+FIELD *,                         8, %s,     S/N,       op=OP1
+FIELD detResidExp.fringe_0,      8, %.3f,   fringe,    value
+FIELD detResidExp.fringe_1,      8, %.3f,   fringe err, value
+FIELD detResidExp.fringe_2,      8, %.3f,   fringe stdev, value
+FIELD detResidExp.user_1,        8, %.3f,   dfringe,    value
+FIELD detResidExp.user_2,        8, %.3f,   dfringe err, value
+FIELD detResidExp.user_3,        8, %.3f,   dfringe stdev, value
+FIELD rawExp.dateobs,           19, %T,     obs date,  value
+FIELD rawExp.filter,            10, %s,     filter,    value
+FIELD rawExp.exp_time,           8, %.2f,   exptime,   value
+FIELD rawExp.ccd_temp,           8, %.2f,   ccd temp,  value
+FIELD rawExp.airmass,            8, %.4f,   airmass,   value
+FIELD detResidExp.path_base,    20, %s,     path_base, none
+
+TD_CLASS det_drop $detInputExp.include == 1 && $detResidExp.accept == 0
+TD_CLASS det_off  $detInputExp.include == 0 && $detResidExp.accept == 0
+TD_CLASS det_add  $detInputExp.include == 0 && $detResidExp.accept == 1
Index: trunk/ippMonitor/def/detResidExp_noimage.d
===================================================================
--- trunk/ippMonitor/def/detResidExp_noimage.d	(revision 19726)
+++ trunk/ippMonitor/def/detResidExp_noimage.d	(revision 19726)
@@ -0,0 +1,57 @@
+TABLE detResidExp, rawExp, detInputExp
+TITLE detResidExp
+FILE  detResidExp_noimage.php
+MENU  ipp.detrend.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+WHERE detResidExp.exp_id = rawExp.exp_id
+WHERE detResidExp.exp_id = detInputExp.exp_id
+WHERE detResidExp.iteration = detInputExp.iteration
+
+# define image names to be used below
+# IMAGE VAR basename filerule camera class_id
+# IMAGE JPEG2 $detResidExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE
+
+# define the arguments supplied to the links below (if any)
+ARGS  ARG1 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
+
+# OP    OP1  $detResidExp.bin_stdev > 0.0 ? $detResidExp.bg / $detResidExp.bin_stdev : NAN
+
+#     field                   size  format  name       show         link to              linkargs
+FIELD detResidExp.det_id,        7, %s,     Det ID,    value
+FIELD rawExp.camera,            10, %s,     camera,    value
+FIELD detResidExp.exp_id, 	 5, %s,     Exp ID,    value,       rawImfile.php,       ARG1
+FIELD rawExp.exp_name, 	         5, %s,     Exp Name,  value,       rawImfile.php,       ARG1
+FIELD detResidExp.iteration,     5, %s,     iter,      value
+FIELD detInputExp.include,       3, %t,     used,      value
+FIELD detResidExp.accept,        3, %t,     keep,      value
+FIELD detResidExp.fault,         4, %d,     fault,     value
+# FIELD *,    	                 8, %s,     image,     image=JPEG2, detResidImfile.php,  ARG2
+FIELD detResidExp.bg,            8, %.3f,   backgnd,   value
+FIELD detResidExp.bg_mean_stdev, 8, %.3f,   [stdev],   value
+FIELD detResidExp.bg_stdev,      8, %.3f,   stdev,     value
+FIELD detResidExp.bin_stdev,     8, %.3f,   bin stdev, value
+FIELD (detResidExp.bg/detResidExp.bin_stdev), 8, %.3f, S/N, value
+# FIELD *,                         8, %s,     S/N,       op=OP1
+FIELD detResidExp.fringe_0,      8, %.3f,   fringe,    value
+FIELD detResidExp.fringe_1,      8, %.3f,   fringe err, value
+FIELD detResidExp.fringe_2,      8, %.3f,   fringe stdev, value
+FIELD detResidExp.user_1,        8, %.3f,   dfringe,    value
+FIELD detResidExp.user_2,        8, %.3f,   dfringe err, value
+FIELD detResidExp.user_3,        8, %.3f,   dfringe stdev, value
+FIELD rawExp.dateobs,           19, %T,     obs date,  value
+FIELD rawExp.filter,            10, %s,     filter,    value
+FIELD rawExp.exp_time,           8, %.2f,   exptime,   value
+FIELD rawExp.ccd_temp,           8, %.2f,   ccd temp,  value
+FIELD rawExp.airmass,            8, %.4f,   airmass,   value
+FIELD detResidExp.path_base,    20, %s,     path_base, none
+
+TD_CLASS det_drop $detInputExp.include == 1 && $detResidExp.accept == 0
+TD_CLASS det_off  $detInputExp.include == 0 && $detResidExp.accept == 0
+TD_CLASS det_add  $detInputExp.include == 0 && $detResidExp.accept == 1
Index: trunk/ippMonitor/def/detResidImfile_failure.d
===================================================================
--- trunk/ippMonitor/def/detResidImfile_failure.d	(revision 19726)
+++ trunk/ippMonitor/def/detResidImfile_failure.d	(revision 19726)
@@ -0,0 +1,35 @@
+TABLE detResidImfile, rawExp, rawImfile
+TITLE detResidImfile Failures
+FILE  detResidImfile_failure.php
+MENU  ipp.detrend.dat
+
+# the following WHERE clauses are added to all queries joined by AND
+WHERE detResidImfile.exp_id = rawExp.exp_id
+WHERE detResidImfile.exp_id = rawImfile.exp_id
+WHERE detResidImfile.class_id = rawImfile.class_id
+WHERE detResidImfile.fault > 0
+
+ARGS  ARG1 detResidImfile.det_id=$detResidImfile.det_id
+ARGS  ARG1 detResidImfile.iteration=$detResidImfile.iteration
+ARGS  ARG1 detResidImfile.exp_id=$detResidImfile.exp_id
+ARGS  ARG1 detResidImfile.class_id=$detResidImfile.class_id
+ARGS  ARG1 camera=$rawExp.camera
+ARGS  ARG1 basename=$detResidImfile.path_base
+ARGS  ARG1 class=$detResidImfile.class_id
+
+#     field                      size  format  name        show  link to     extras
+FIELD detResidImfile.det_id,        5, %d,      Det ID
+FIELD detResidImfile.iteration,     3, %d,      iter
+FIELD detResidImfile.exp_id,        5, %d,      Exp ID
+FIELD rawImfile.exp_name,           5, %s,      Exp Name
+FIELD detResidImfile.class_id,      8, %s,      Chip ID,  value,  detResidImfile_failure.php, ARG1
+FIELD detResidImfile.fault,         5, %d,      fault
+FIELD detResidImfile.bg,            8, %.2f,    backgnd
+FIELD detResidImfile.bg_stdev,      8, %.2f,    bg stdev
+FIELD detResidImfile.bg_mean_stdev, 8, %.2f,    [stdev]
+FIELD rawImfile.ccd_temp,           5, %.2f,    CCD Temp
+FIELD detResidImfile.path_base,    20, %s,      path_base
+
+FIELD rawExp.camera,                    5, %s,     Exp Name, none
+
+TAIL PHP insert_log ('LOG.IMFILE');
Index: trunk/ippMonitor/def/detRun.d
===================================================================
--- trunk/ippMonitor/def/detRun.d	(revision 19524)
+++ trunk/ippMonitor/def/detRun.d	(revision 19726)
@@ -19,5 +19,5 @@
 FIELD det_id,        5, %s,     det ID,       value,       detRunSummary.php,     ARG1
 FIELD iteration,     3, %s,     iter
-FIELD det_type,      5, %s,     type
+FIELD det_type,     12, %s,     type
 FIELD state,         5, %s,     state
 FIELD *,             5, %s,     choose,       value=input, detInputExp.php,       ARG2
@@ -27,15 +27,15 @@
 FIELD mode,          5, %s,     mode
 FIELD filter,       10, %s,     filter     
-FIELD airmass_min,  10, %s,     min airmass    
-FIELD airmass_max,   5, %s,     max     
-FIELD exp_time_min, 10, %s,     min exp_time   
-FIELD exp_time_max,  5, %s,     max 
-FIELD ccd_temp_min, 10, %s,     min ccd_temp   
-FIELD ccd_temp_max,  5, %s,     max    
-FIELD posang_min,   10, %s,     min posang     
+FIELD registered,   19, %s,     registered 
+FIELD use_begin,    19, %s,     use_begin  
+FIELD use_end,      19, %s,     use_end    
+FIELD airmass_min,   5, %.2f,   min_airmass    
+FIELD airmass_max,   5, %.2f,   max     
+FIELD exp_time_min,  5, %.2f,   min_exp_time   
+FIELD exp_time_max,  5, %.2f,   max 
+FIELD ccd_temp_min,  5, %.2f,   min_ccd_temp   
+FIELD ccd_temp_max,  5, %.2f,   max    
+FIELD posang_min,    5, %.2f,   min_posang     
 FIELD posang_max,    5, %s,     max      
-FIELD registered,   10, %s,     registered 
-FIELD use_begin,    10, %s,     use_begin  
-FIELD use_end,      10, %s,     use_end    
 
 TD_CLASS list_off $state == 'drop'
Index: trunk/ippMonitor/def/detRunSummary.d
===================================================================
--- trunk/ippMonitor/def/detRunSummary.d	(revision 19524)
+++ trunk/ippMonitor/def/detRunSummary.d	(revision 19726)
@@ -1,4 +1,4 @@
 TABLE detRunSummary, detRun
-TITLE detRunSummary
+TITLE Detrend Run Iterations (does not list registered frames)
 FILE  detRunSummary.php
 MENU  ipp.detrend.dat
Index: trunk/ippMonitor/def/detStackedImfile_failure.d
===================================================================
--- trunk/ippMonitor/def/detStackedImfile_failure.d	(revision 19726)
+++ trunk/ippMonitor/def/detStackedImfile_failure.d	(revision 19726)
@@ -0,0 +1,19 @@
+TABLE detStackedImfile Failures
+TITLE detStackedImfile
+FILE  detStackedImfile_failure.php
+MENU  ipp.detrend.dat
+
+WHERE fault > 0
+
+#     field         size  format  name                   show  link to     extras
+FIELD det_id,         7,  %s,    det_id
+FIELD iteration,      5,  %s,    iteration
+FIELD class_id,       8,  %s,    class_id
+FIELD fault,          5,  %d,    fault
+FIELD bg,             8,  %f,    backgnd
+FIELD bg_stdev,       8,  %f,    stdev
+FIELD bg_mean_stdev,  8,  %f,    [stdev]
+FIELD uri,           20,  %s,    uri
+# FIELD recipe, 20,   recipe
+
+# TD_CLASS list_off $fault > 0
Index: trunk/ippMonitor/def/masterDetrendFrames.d
===================================================================
--- trunk/ippMonitor/def/masterDetrendFrames.d	(revision 19524)
+++ trunk/ippMonitor/def/masterDetrendFrames.d	(revision 19726)
@@ -2,5 +2,5 @@
 # master detrend runs which have been accepted
 
-TABLE detRunSummary, detRun
+TABLE detRun LEFT JOIN detRunSummary ON detRun.det_id = detRunSummary.det_id
 TITLE Master Detrend Frames
 FILE  masterDetrendFrames.php
@@ -8,7 +8,6 @@
 
 # the following WHERE clauses are added to all queries joined by AND
-WHERE detRunSummary.accept = 1
-WHERE detRun.det_id = detRunSummary.det_id
-WHERE detRun.iteration = detRunSummary.iteration
+WHERE (detRunSummary.accept = 1 or detRun.mode = 'register')
+WHERE detRun.state = 'stop'
 
 ARGS  ARG1 detRunSummary.det_id=$detRunSummary.det_id
@@ -22,14 +21,32 @@
 ARGS  ARG4 detResidExp.iteration=$detRunSummary.iteration
 
+ARGS  ARG5 det_id=$det_id
+
 #     field                    width format  name          show         link to                   extras
-FIELD detRunSummary.det_id,    5,    %s,     det ID,       value,       detRunSummary.php,        ARG1
+FIELD detRun.det_id,           5,    %s,     det ID,       value,       detRunSummary.php,        ARG1
 FIELD detRunSummary.iteration, 3,    %s,     iter
-FIELD detRun.det_type,         5,    %s,     type
+FIELD detRun.det_type,        12,    %s,     type
 FIELD detRun.state,            5,    %s,     state
-FIELD *,                       20,   %s,     choose,       value=input, detInputExp.php,          ARG2
-FIELD *,                       20,   %s,     choose,       value=proc,  detProcessedExp.php,      ARG3
-FIELD *,                       20,   %s,     choose,       value=resid, detResidExp.php,          ARG4
-FIELD detRunSummary.bg,        20,   %s,     bg
-FIELD detRunSummary.bg_stdev,  20,   %s,     bg_stdev
+# FIELD detRun.mode,             5,    %s,     mode
+# FIELD detRunSummary.accept,    5,    %s,     accept
+FIELD *,                       5,    %s,     choose,       value=input, detInputExp.php,          ARG2
+FIELD *,                       5,    %s,     choose,       value=proc,  detProcessedExp.php,      ARG3
+FIELD *,                       5,    %s,     choose,       value=stack, detStackedImfile.php,  ARG5
+FIELD *,                       5,    %s,     choose,       value=resid, detResidExp.php,          ARG4
+FIELD mode,         	       5,    %s,     mode
+FIELD filter,       	      10,    %s,     filter     
+FIELD registered,             19,   %s,      registered 
+FIELD use_begin,              19,   %s,      use_begin  
+FIELD use_end,                19,   %s,      use_end    
+FIELD detRunSummary.bg,        8,   %.2f,    bg
+FIELD detRunSummary.bg_stdev,  8,   %.2f,    bg_stdev
+# FIELD airmass_min,             5,   %.2f,    min_airmass    
+# FIELD airmass_max,             5,   %.2f,    max     
+# FIELD exp_time_min,            5,   %.2f,    min_exp_time   
+# FIELD exp_time_max,            5,   %.2f,    max 
+# FIELD ccd_temp_min,            5,   %.2f,    min_ccd_temp   
+# FIELD ccd_temp_max,            5,   %.2f,    max    
+# FIELD posang_min,              5,   %.2f,    min_posang     
+# FIELD posang_max,              5,   %.2f,    max      
 # FIELD bg_mean_stdev, 20,   bg_mean_stdev
 
Index: trunk/ippMonitor/raw/ipp.detrend.dat
===================================================================
--- trunk/ippMonitor/raw/ipp.detrend.dat	(revision 19524)
+++ trunk/ippMonitor/raw/ipp.detrend.dat	(revision 19726)
@@ -26,5 +26,4 @@
 
 menutop   | menutop      | plain   | &nbsp;                       | 
-menulink  | menuselect 	 | link    | Detrend Kept                 | keptDetrendFrames.php
 menulink  | menuselect 	 | link    | Detrend Frames               | masterDetrendFrames.php
 menulink  | menuselect 	 | link    | Detrend Runs                 | detRun.php             
@@ -35,6 +34,19 @@
 menulink  | menuselect 	 | link    | Input Detrend Exp            | detInputExp.php
 menulink  | menuselect 	 | link    | Proc Detrend Exp             | detProcessedExp.php
+menulink  | menuselect 	 | link    | Proc Detrend Exp<br>(no image)  | detProcessedExp_noimage.php
 menulink  | menuselect 	 | link    | Norm Detrend Exp             | detNormalizedExp.php
 menulink  | menuselect 	 | link    | Resid Detrend Exp            | detResidExp.php
+menulink  | menuselect 	 | link    | Resid Detrend Exp<br>(no images)| detResidExp_noimage.php
+
+menutop   | menutop      | plain   | &nbsp;                       | 
+menutop   | menutop      | plain   | Failures                     | 
+menulink  | menuselect 	 | link    | DetProc Fail Imfiles         | detProcessedImfile_failure.php
+menulink  | menuselect 	 | link    | DetProc Fail Exp             | detProcessedExp_failure.php
+menulink  | menuselect 	 | link    | DetStack Fail Imfile         | detStackedImfile_failure.php
+menulink  | menuselect 	 | link    | DetNormStat Fail Imfile      | detNormalizedStatImfile_failure.php
+menulink  | menuselect 	 | link    | DetNorm Fail Imfile          | detNormalizedImfile_failure.php
+menulink  | menuselect 	 | link    | DetNorm Fail Exp             | detNormalizedExp_failure.php
+menulink  | menuselect 	 | link    | DetResid Fail Imfile         | detResidImfile_failure.php
+menulink  | menuselect 	 | link    | DetResid Fail Exp            | detResidExp_failure.php
 
 menutop   | menutop      | plain   | Flat Correction              | 
