TABLE chipRun, rawExp, chipProcessedImfile
TITLE chip Processed Imfile
FILE  chipProcessedImfile.php
MENU  ipp.science.dat

# limit this table to non-OBJECT types of images
WHERE chipRun.state = 'stop'
WHERE chipRun.exp_id = rawExp.exp_id
WHERE chipProcessedImfile.exp_id = chipRun.exp_id
WHERE chipProcessedImfile.chip_id = chipRun.chip_id

ARGS  ARG1 exp_id=$chipRun.exp_id

ARGS  ARG2 chipRun.chip_id=$chipRun.chip_id
ARGS  ARG2 camera=$rawExp.camera
ARGS  ARG2 basename=$chipProcessedImfile.path_base
ARGS  ARG2 class=$chipProcessedImfile.class_id

#     field                            size  name         show    link to                  extras
FIELD chipRun.chip_id,        	   	  7, chip ID
FIELD chipRun.exp_id,         	   	  5, Exp ID,      value,  rawImfile.php,           ARG1
FIELD chipProcessedImfile.class_id,	  5, Class ID
FIELD rawExp.exp_name,     	   	  5, Exp Name,    value,  chipProcessedImfile.php, ARG2
FIELD rawExp.telescope,      	   	 10, Telescope
FIELD rawExp.camera,         	   	 10, Camera
FIELD rawExp.dateobs,        	   	 20, Date/Time
FIELD rawExp.filter,         	   	 10, FILTER
FIELD rawExp.ra,       	           	  5, RA    
FIELD rawExp.decl,       	   	  5, Dec
FIELD rawExp.exp_time,       	   	  5, exp_time    
FIELD rawExp.sat_pixel_frac, 	   	  5, f(sat pixels)
FIELD rawExp.airmass,        	   	  5, airmass     
FIELD chipProcessedImfile.bg,             5, backgnd
FIELD chipProcessedImfile.bg_stdev,       5, stdev    
FIELD chipProcessedImfile.bg_mean_stdev,  5, &lt;backgnd&gt;

FIELD chipProcessedImfile.n_stars,  	  5, Nstars
FIELD chipProcessedImfile.n_astrom, 	  5, Nastrom
FIELD chipProcessedImfile.sigma_ra, 	  5, sigma ra
FIELD chipProcessedImfile.fwhm,     	  5, FHWM
FIELD chipProcessedImfile.path_base,      5, path_base, none

# FIELD chipPendingExp.reduction,    20,   reduction
# FIELD chipPendingExp.guide_id,     20, guide ID

TAIL PHP insert_log ('LOG.IMFILE');
