Common Trending and QC tools:
|
tqs = Trending and Quality Control System |
make printable | new: | see also: | ||||||||
v1.1:
|
|
This tool helps the QC scientist to maintain the documentation of the QC procedures. These procedures are designed to extract quality information from pipeline products. They produce graphical reports, and QC1 parameters (in addition to those extracted by the pipeline). They also call the tool scoreQC which creates scores. That information is then reviewed in the certifyProducts step of the daily workflow and helps to certify, or reject, the pipeline products. The reports are stored under $DFO_PLT_DIR by moveProducts. The QC1 parameters are ingested by the QC procedures, using the DFS tool qc1Ingest.
The set of QC procedures is conceptually quite similar to the pipeline recipes: for each raw data type, there is one dedicated procedure. Their call is controlled by processQC and is scheduled right after the pipeline processing.
The qcDocu tool is designed for documentation of the QC procedures. It creates, per QC procedure, one HTML page which is transferred to the QC documentation web site, http://www.eso.org/~qc/docu/QC1/qc1docu.html. These pages are cross-linked to, and therefore externally visible from, the exported score HTML pages.
The documentation describes the procedures, the algorithm, the graphical output, and the QC1 parameters. The content of the documentation is written into the header of the QC procedures. The qcDocu tool then extracts and reformats this information.
All QC procedures are expected under $DFO_PROC_DIR. Each procedure to be documented has a set of documentation header keywords. In addition to this content, there should be example plots to represent the graphical QC reports. These example plots go to the configuration directory dedicated for qcDocu ($DFO_CONFIG_DIR/qcDocu).
In general, the documentation should be complete enough to permit a QC colleague to understand the QC reporting procedure and the criteria for acceptance or rejection. Also, this documentation might be helpful for the SciOps astronomer, in particular daytime astronomer.
Type qcDocu -h for on-line help, qcDocu -v for the version number,
qcDocu -a
to create or refresh the complete set of documentation for your instrument,
and
qcDocu -p <qc_proc>
for creating the documentation page for the procedure <qc_prog>. The tool is called interactively. Note that usually you will call option -a which guarantees that all navigation is up-to-date. Option -p is only useful if you work on a specific documentation page and it is not a new one.
Use dfosExplorer or dfosInstall.
The tool needs a configuration file and a set of reference images (screenshots or copies of your operational QC reports). All these go to $DFO_CONFIG_DIR/qcDocu (!).
There is also a general configuration file with the information about the supported instruments. This is maintained on, and downloaded from, ${INTQC_URL}/tqs/config.qcDocu_instr. You don't need to edit it. It is loaded into your $DFO_CONFIG_DIR/qcDocu anytime the tool is called.
The tool configuration file config.qcDocu defines:
Section 1: general parameters | ||
BROWSER_URL | http://www.archive.eso.org/bin/qc1_cgi?action=qc1_browse-table | URL for QC1 browser |
QC_URL | http://www.eso.org/qc | URL of external QC web site |
Section 2: Instrument specific parameters | ||
QC_CURRENT |
GIRAFFE/reports/CURRENT | dirname of current trending plot associated to QC1 procedure |
QC1_URL | GIRAFFE/qc | dirname of associated trending html page |
Section 3: List of QC1 procedures |
||
QCPROCS |
bias.prg | |
QCPROCS | flat.prg | |
QCPROCS | wave.prg | |
QCPROCS | BREAK | enter a line break for better overview |
The documentation content is stored in the header of each QC procedure. The information is stored in the following way:
In principle the content could be stored at any place in the procedure but for obvious reasons you should place it into the header. The only strict syntax requirement is to start with the marker, followed by a blank space, followed by white space and a valid docu key. Anything after that is considered documentation text. Technically, it is interpreted as HTML code. This means: plain text is fine; any < or > is interpreted as part of HTML tags; you may enter HTML tags explicitly ( like <b> or <br> ).
The following docu keys exist:
DOCU_NAME | name of the procedure | ||
DOCU_VERSION | versioning information (just displayed, not interpreted anywhere) | ||
DOCU_SYNTAX | MIDAS or SHELL | ||
DOCU_RAWTYPE | associated raw_type | ||
DOCU_CALL | a description of how the procedure can be invoked from the command line | ||
DOCU_PURPOSE | description of what the procedure does | ||
DOCU_PROCINPUT | input to the procedure: list the products and, if applicable, raw files which are analyzed by this procedure | ||
DOCU_QC1TABLE | name(s) of QC1 database table (if applicable) (multiple entries permitted) | ||
DOCU_TRENDPLOT | name(s) of trending plots (current one); if multiple trending plots exist, list them line by line | ||
DOCU_QC1PAGE | name(s) of tutorial QC page for the trending plots (multiple entries permitted) | ||
DOCU_QC1PLOTS | name(s) and description of QC1 plots created and reviewed later | ||
DOCU_QC1PLOTS | NAME | bias1.gif | user-given name (keep it simple, like bias1.gif) |
DOCU_QC1PLOTS | DESCR | bias1.gif | describe each piece of information in the plot (e.g. box 1, upper panel etc.) |
DOCU_QC1PARAM | list of QC1 parameters (extracted from product header, or created by procedure) which are ingested with qc1Ingest; list both the FITS key names and the QC1 db names; if applicable, list the ones which are calculated by the procedure | ||
DOCU_ALGORITHM | describe in short form the algorithm (if not trivially clear) for each QC1 parameter, or list a reference for it (like Pipeline User Manual) | ||
DOCU_CERTIF | describe (in free form) guidelines for rejection or acceptance of products, based on the QC reports you could also provide a link here to a related URL collecting an atlas of reference QC reports |
||
DOCU_COMMENTS | anything else |
In the following an example header is displayed. It is the one which has been transformed by the tool to the web page http://www.eso.org/~qc/docu/QC1/GIRAFFE/bias.html. This example header is distributed as GIRAFFE_bias_filled_template.prg. There is also one called GIRAFFE_bias_empty_template.prg.
! DOCU_NAME bias.prg ! ! DOCU_VERSION 1.0 -- adapted from UVES (May 2003) <br> ! DOCU_VERSION 1.1 -- P3 replaced by DISPLAY variable Y/N (2006-04-18) ! ! DOCU_SYNTAX MIDAS ! ! DOCU_RAWTYPE BIAS ! ! DOCU_CALL processQC <br> ! DOCU_CALL from $DFS_PRODUCT/BIAS/$DATE:<br> ! DOCU_CALL inmidas -P -j "@@ $DFO_PROC_DIR/bias.prg $date $primfile Y"<br> ! DOCU_CALL (the last parameter Y/N controls creation of graphics ! DOCU_CALL on the screen) ! ! DOCU_PURPOSE compares raw and product BIAS files ! DOCU_PURPOSE for FLAMES/GIRAFFE QC assessment; the plots are later reviewed ! DOCU_PURPOSE within certifyProducts. The first plot (bias1.gif) is stored ! DOCU_PURPOSE in $DFO_PLT_DIR. ! ! DOCU_PROCINPUT first raw BIAS from AB; MASTER_BIAS product; <br> ! DOCU_PROCINPUT currently not analyzed: BAD_PIXEL_MAP ! ! DOCU_QC1TABLE giraffe_bias ! ! DOCU_TRENDPLOT trend_report_BIAS.html ! ! DOCU_QC1PAGE bias_qc1.html ! ! DOCU_QC1PLOTS NAME bias1.gif ! DOCU_QC1PLOTS DESCR bias1.gif <b>box1:</b> comparison master (red) <-> raw (black); ! DOCU_QC1PLOTS DESCR bias1.gif upper panel: middle row and middle column, full pixel range, in ADU; ! DOCU_QC1PLOTS DESCR bias1.gif lower panel: middle row and middle column, central 100 pixels, in ADU <br> ! DOCU_QC1PLOTS DESCR bias1.gif <b>box 2:</b> structure description; all columns (top) and all rows (bottom) are collapsed and displayed; <br> ! DOCU_QC1PLOTS DESCR bias1.gif <b>box 3:</b> histogram: all pixel values in log frequency histogram; raw: black, master: red; there should be a dominant peak with Gaussian shape (which translates to parabola shape in this log freq diagram)<br> ! DOCU_QC1PLOTS DESCR bias1.gif <b>top panel:</b> name of analyzed master bias frame<br> ! DOCU_QC1PLOTS DESCR bias1.gif <b>bottom panel:</b> some QC1 parameters (median_master; raw RON, master RON, expected RON=raw/sqrt(5), structure parameters)<br> ! ! DOCU_QC1PLOTS NAME bias2.png ! DOCU_QC1PLOTS DESCR bias2.png full display of raw frame (box: area to be displayed in bias4.png)<br> ! DOCU_QC1PLOTS NAME bias3.png ! DOCU_QC1PLOTS DESCR bias3.png full display of master frame (box: area to be displayed in bias5.png)<br> ! DOCU_QC1PLOTS NAME bias4.png ! DOCU_QC1PLOTS DESCR bias4.png closeup display of raw frame <br> ! DOCU_QC1PLOTS NAME bias5.png ! DOCU_QC1PLOTS DESCR bias5.png closeup display of master frame <br> ! ! DOCU_QC1PARAM QC1 parameters written into QC1 table:<br> ! DOCU_QC1PARAM <b>QC1db names</b>: datancom | median_master | sigma_raw | sigma_master | struct_row | struct_col <br> ! DOCU_QC1PARAM <b>FITS key names</b>: DATANCOM | (bias.prg) | OUT1.RON.RAW | OUT1.RON.MASTER | (bias.prg) | (bias.prg) <br> ! DOCU_QC1PARAM QC1 params created by pipeline: all except for median_master, struct_row, struct_col <br> ! DOCU_QC1PARAM QC1 params created by this procedure: median_master, struct_row, struct_col (not correctly calculated by pipeline) ! ! DOCU_ALGORITHM Description of algorithms:<br> ! DOCU_ALGORITHM <b>sigma_master:</b> statistics (std_dev) in central window X1024..1124, Y1998..2098 (MIDAS: stat/ima, bins=1, outputr(4)) <br> ! DOCU_ALGORITHM <b>sigma_raw:</b> statistics (std_dev) in central window X1024..1124, Y1998..2098 (MIDAS: stat/ima, bins=1, outputr(4)) <br> ! DOCU_ALGORITHM <b>median_master:</b> statistics (median) of full frame (MIDAS: stat/ima, bins=0.1, exc=100,300) <br> ! DOCU_ALGORITHM <b>struct_row/col:</b> average/row or col; statistics with exc=mean+/-2 ADU; struct_row/col is the std_dev ! ! DOCU_CERTIF Reasons for rejection:<br> - unusually high bias level or RON level (unless representative); <br> ! DOCU_CERTIF - unusual structure (compare panel 2 plots with older/reference version);<br> ! DOCU_CERTIF - non-Gaussian shape of histogram;<br> ! DOCU_CERTIF - DATANCOM lower than usual (5), especially if N=5 version nearby in time<br> ! DOCU_CERTIF The closeup displays are useful to check for patterns (pick noise) which should not be there. ! ! DOCU_COMMENTS Some QC parameters are calculated by the pipeline but not yet used for QC1 db ingestion. TBD! |
Along with your documentation, you should provide a complete set of reference QC plots. These are then hyperlinked by the tool to the documentation web pages. Do the following, per procedure to be documented:
Operational hints.
Last update: April 26, 2021 by rhanusch |