TABLE camRun, camProcessedExp, chipRun, rawExp
TITLE Camera Processed
FILE  camProcessedExp_Images.php
MENU  ipp.science.dat

# the following WHERE clauses are added to all queries joined by AND
WHERE camRun.state = 'full'
WHERE camRun.chip_id = chipRun.chip_id
WHERE chipRun.exp_id = rawExp.exp_id
WHERE camProcessedExp.cam_id  = camRun.cam_id
WHERE camProcessedExp.fault = 0

# define image names to be used below
# IMAGE VAR basename filerule camera class_id
IMAGE JPEG2 $camProcessedExp.path_base PPIMAGE.JPEG2 $rawExp.camera NONE

# define the arguments supplied to the links below (if any)
ARGS  ARG1  rawImfile.exp_id=$rawExp.exp_id
ARGS  ARG2  chipRun.chip_id=$chipRun.chip_id
ARGS  ARG3  camRun.cam_id=$camRun.cam_id

ARGS  ARG4 camRun.cam_id=$camRun.cam_id
ARGS  ARG4 camera=$rawExp.camera
ARGS  ARG4 basename=$camProcessedExp.path_base

OP   OP1  $rawExp.ra * 57.295783
OP   OP2  $rawExp.decl * 57.295783

#     field                     	size  format  name          show   	 link to                  extras
FIELD rawExp.exp_name,     	 	10,   %s,     Exp Name
FIELD rawExp.exp_id,	         	 5,   %d,     Exp ID,       value,  	 rawImfile.php,           ARG1
FIELD chipRun.chip_id,           	 5,   %d,     Chip ID,      value,  	 chipProcessedImfile.php, ARG2
FIELD camRun.cam_id,             	 5,   %d,     Cam ID,       value,  	 camProcessedExp_Images.php,     ARG3
FIELD camRun.label,             	 5,   %s,     Label
FIELD *,    	                	 8,   %s,     image,        image=JPEG2, camProcessedImfile.php,  ARG4
FIELD rawExp.telescope,      		10,   %s,     Telescope
FIELD rawExp.camera,         		10,   %s,     Camera
FIELD rawExp.dateobs,        		19,   %T,     Date/Time
FIELD rawExp.ra,           		 8,   %C, RA,           op=OP1      
FIELD rawExp.decl,         		 8,   %C, DEC,          op=OP2
FIELD rawExp.object,         		10,   %s,     Object
FIELD rawExp.filter,         		10,   %s,     FILTER
FIELD rawExp.exp_time,       		 5,   %.2f,     exp_time    
FIELD rawExp.airmass,        		 5,   %.4f,     airmass     
FIELD camProcessedExp.bg,             	 5,   %.2f,     backgnd
FIELD camProcessedExp.bg_stdev,       	 5,   %.2f,     stdev    
FIELD camProcessedExp.n_stars,  	 5,   %d,     Nstars
FIELD camProcessedExp.n_astrom, 	 5,   %d,     Nastrom
FIELD camProcessedExp.sigma_ra, 	 5,   %f,     sigma ra
FIELD camProcessedExp.fwhm_major,     	 5,   %f,     FHWM (major)
FIELD rawExp.comment,  	                65, %s,     Comment

FIELD camProcessedExp.path_base,     	 5,   %s,     path_base,    none
FIELD rawExp.exp_id,     		 5,   %s,     Exp ID,       none

# the last two are used as arguments elsewhere, thus needed in the list, even if not displayed
# FIELD camRun.reduction,       	         5,   %s,     reduction
# FIELD camProcessedExp.bg_mean_stdev,  	 5,   %.2f,     &lt;backgnd&gt;
