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
