Документ взят из кэша поисковой машины. Адрес оригинального документа : http://xmm.vilspa.esa.es/sas/6.5.0/doc/dscheck.ps.gz
Дата изменения: Tue Aug 16 04:22:37 2005
Дата индексирования: Tue Oct 2 09:02:02 2012
Кодировка:

Поисковые слова: п п п п п п п п п
XMM-Newton Science Analysis System Page: 1
dscheck
August 16, 2005
Abstract
Table-driven check of dataset contents
1 Instruments/Modes
Instrument Mode
2 Use
pipeline processing yes
interactive analysis no
3 Description
This task performs a range of low-level checks on the contents of datasets (FITS les). Examples are:
 Ensuring a FITS le contains an extension of a given name
 Ensuring a FITS HDU (primary or extension) contains a keyword of a given name
 Ensuring a FITS binary table contains a column of a given name
 Checking that a FITS keyword falls in a speci ed range
 Checking that the values in a column of a FITS table fall within a speci ed range
The checking process it table-driven, ie. the checks to be performed are de ned in an ASCII le. The
format of this le is best demonstrated by example:
xmmsas 20050815 1803-6.5.0

XMM-Newton Science Analysis System Page: 2
# This is a comment
1 EXISTS PRIMARY.CONTENT Check existence of a keyword in primary header
(Blank lines are ignored)
2 EXISTS SRCLIST Check existence of extension named SRCLIST
3 EXISTS SRCLIST.TESTKEY Check existence of keyword in extension named SRCLIST
4 EXISTS SRCLIST.SRC NUM[] Check existence of column in a table named SRCLIST
5 RANGE PRIMARY.RA PNT 0 360 Check range of keyword in primary header
6 RANGE PRIMARY.DEC PNT -90 90
7 RANGE SRCLIST.TESTKEY -500 100 Check range of keyword in extension named SRCLIST
8 RANGE SRCLIST.SCTS[] 0 1000 Check range of values in column SCTS of table named SRCLIST
There is some implicit checking performed behind the scenes, eg. checking the range of a keyword
implicitly checks for it's existence, and checking the existence of a keyword implicitly checks for the
existence of the header it is in. Thus in the table above check 3 implies check 2, and check 7 implies
check 3 which implies check 2 (ie. checks 2 and 3 are redundant).
When anomalies are found they are written to STDOUT. All checks will be performed before the task exits.
If any checks fail the task will exit with an error, otherwise it will exit normally (this is the mechanism
for communicating with the pipeline control system).
4 Parameters
This section documents the parameters recognized by this task (if any).
Parameter Mand Type Default Constraints
set yes dataset
De nes the dataset to be checked
check le yes lename
Name of the le de ning the checks to be performed
5 Errors
This section documents warnings and errors generated by this task (if any). Note that warnings and
errors can also be generated in the SAS infrastructure libraries, in which case they would not be docu-
mented here. Refer to the index of all errors and warnings available in the HTML version of the SAS
documentation.
primaryColumn (fatal)
Attempt to refer to a column in the FITS primary extension
xmmsas 20050815 1803-6.5.0

XMM-Newton Science Analysis System Page: 3
6 Input Files
1. Dataset to be checks
2. Check le de ning checks to be performed
7 Output Files
1.
8 Algorithm
subroutine dscheck
open dataset
read check file
foreach (check)
do check
end
print output
raise error if any check fails
end subroutine dscheck
9 Comments

10 Future developments
 Currently range checks only really make sense for numeric keywords and table columns.
The task doesn't do any checking to verify that the keyword/column being checked is in fact
numeric, and almost certainly it should do.
 Limits for range checks are restricted to numeric constants. It would be possible to extend
the checks to be arithmetic expressions, etc.
 The task does not do much checking on the validity of the check le (eg. invalid ranges like
200 < x < 100 are not trapped).
 Further checking functions can be added quite simply, eg. a function name can be imple-
mented by adding a perl subroutine called check name to the dscheck.pl script.
xmmsas 20050815 1803-6.5.0

XMM-Newton Science Analysis System Page: 4
References
xmmsas 20050815 1803-6.5.0