TABLE detProcessedExp, rawExp
TITLE detProcessedExp
FILE  detProcessedExp.php
MENU  ipp.detrend.dat

# the following WHERE clauses are added to all queries joined by AND
WHERE detProcessedExp.exp_tag = rawExp.exp_tag

# 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 det_id=$detProcessedExp.det_id
ARGS  ARG1 exp_tag=$detProcessedExp.exp_tag
ARGS  ARG1 camera=$rawExp.camera
ARGS  ARG1 basename=$detProcessedExp.path_base

OP    OP1  $detProcessedExp.bg / $detProcessedExp.bg_stdev

#     field                    size    	name       show          link to                 extras
FIELD detProcessedExp.det_id,     7,   	Det ID,    value
FIELD rawExp.camera,             10,    camera,    value
FIELD detProcessedExp.exp_tag, 	 15,   	Exposure,  value
FIELD *, 	  		  8,   	image,     image=JPEG2,  detProcessedImfile.php, ARG1
FIELD detProcessedExp.bg, 	  8,   	backgnd,   value
FIELD detProcessedExp.bg_mean_stdev, 8,	[stdev],   value
FIELD detProcessedExp.bg_stdev,   8,   	stdev,     value
FIELD *,                          8,    S/N,       op=OP1
FIELD rawExp.dateobs,             8,   	obs date,  value
FIELD rawExp.filter,              8,   	filter,    value
FIELD rawExp.exp_time,            8,   	exptime,   value
FIELD rawExp.ccd_temp,            8,   	ccd temp,  value
FIELD rawExp.airmass,             8,   	airmass,   value
FIELD detProcessedExp.path_base, 20,   	path_base, none

# note: you must include all desired fields, where ever they are used,
# in FIELD
