[ ESO ]
QC1 database:
forms
 

QC1 database:
Project
Tech Guide
Users Guide

The following forms exist:

qc1_cgi

This form is used for the interface to the QC1 database. It knows two actions,

action=qc1_browse_table

and

action=qc1_plot_table

These actions are referred to the qc1_browser and the qc1_plotter in this guide.

qc1_trend

This form is used in the general QC1 database GUI which is used in the public QC pages, e.g. for UVES . It connects the general QC interface to the QC1 database. This interface is called 'general' because it offers a non-technical, user-oriented view of the QC1 database, in contrast to the more flexible but also more technical interfaces described here.

The implementation of qc1_trend within the public QC1 pages is done in the following way.

qc1_trend uses three hidden fields to pass the following specific information. They can be placed anywhere within the form but it makes sense to insert them right after the initial 'form' statement.

Hidden fields have the HTML syntax

<input type="hidden" name="a_name" value="a_value">

The first one is "item2table" and contains the mapping of QC item names into QC1 database table names.

General syntax: value="{'item1':'table1','item2':'table2',etc}"

<input type="hidden" name="item2table" value="{
'bias':'uves_bias',
'disp':'uves_wave',
'resol':'uves_wave',
'struct':'uves_flat',
'effic':'uves_flat',
'fmt':'uves_fmtchk',
'stdeffic':'uves_std',
'stdnight':'uves_std'
}">

The item names are used in the form and are visible to the user, while the database tables are internally used.


The second hidden field is "item2columns" and passes the columns (keys) to be displayed in the result page (civil_date is always implicit).

General syntax: value="{'item1' : ('col1','col2',etc), 'item2' : ('col1','col2',etc), etc }"

<input type="hidden" name="item2columns" value="{ 'bias':('mjd_obs','median_master','sigma_raw','sigma_master','struct_row','struct_col','det_out1_conad','bin','chip'),
'disp':('mjd_obs','lambda_central','resid_avg','resid_rms','nlin_tot','nlin_res','nlin_sel','slit_width','bin','chip','ins_mode'),
'resol':('mjd_obs','lambda_central','slit_width','bin','chip','ins_mode','resol_med','resol_rms'), 'struct':('mjd_obs','lambda_central','sigma_ph','sigma_dx','sigma_dy','mean_master','slit_width','bin','chip','ins_mode','lamp'), 'effic':('mjd_obs','lambda_central','mean_master','slit_width', 'bin','chip','ins_mode','lamp'), 'fmt':('mjd_obs','lambda_central','mean_dx','mean_dy','sigma_dx', 'sigma_dy','nlin_all','nlin_sel','ins_temp4_mean', 'ins_press_mean','bin','chip','ins_mode'),
'stdeffic':('mjd_obs','lambda_central','max_effic','wave_c','slit_width', 'airmass','obs_targ_name','bin','chip','ins_mode'), 'stdnight':('mjd_obs','lambda_central','max_effic','wave_c', 'slit_width','airmass','obs_targ_name','bin', 'chip','ins_mode')
}">


The third hidden field is "item2filters" and has the names of the filter keys used for the selection. The filter names are the same as the names in the HTML page and must be consistent with the database names.

Syntax: value="{'item1' : ('filt1','filt2',etc), 'item2' : ('filt1','filt2',etc), etc }"

input type="hidden" name="item2filters" value="{
'bias':('chip','bin'),
'disp':('lambda_central','chip','bin'),
'resol':('lambda_central','chip','bin'),
'struct':('lambda_central','chip','bin'),
'effic':('lambda_central','chip','bin'),
'fmt':('lambda_central','chip','bin'),
'stdeffic':('lambda_central','chip','bin'),
'stdnight':('lambda_central','chip','bin')
}">


It is important that each of these hidden fields contains all the information needed in the form it is wrapped. This implies on the other side that the hidden fields can have different content in different forms.

E.g., the form for the bias QC1 values on the main QC1 page does not need to have the identical content as the one linked to the bias_qc1.html page. This gives you the chance to filter for more detail, or retrieve more keys, than on the more general main page.

There is also no need to embed the hidden fields identically in all forms. E.g., the bias related entries can readily be dropped in a form related to wave QC1 parameters.

 


[ Internal QC Home page ]