Документ взят из кэша поисковой машины. Адрес
оригинального документа
: http://xmm.vilspa.esa.es/sas/7.0.0/documentation/threads/sas_startup_thread.html
Дата изменения: Mon Aug 21 18:29:24 2006 Дата индексирования: Sat Dec 22 14:51:53 2007 Кодировка: Поисковые слова: vallis |
Let
us assume we are working in /home/user/my_work
and have our XMM observation data files in
/home/user/sasdata/<my_obs>,
where
<my_obs> identifies a specific XMM
observation. We do not need to have our XMM data in the working
directory.
To start working with SAS, we need to answer
three questions:
1)
Where is the SAS software in my system?
2)
Where are stored all the Calibration files?
3)
Where are my XMM observation data?
To
answer the first question, we need to define two environment
variables, SAS_DIR
and SAS_PATH.
To do it you need to know where in your system you (or somebody) have
installed SAS. Let us assume that your favorite SAS release is in
/some_dir/xmmsas_20040318_1831
so
we could define SAS_DIR
as follows
setenv
SAS_DIR /some_dir/xmmsas_20040318_1831
and
the SAS_PATH
variable as follows
setenv
SAS_PATH $SAS_DIR
that is, the same than
SAS_DIR.
In these definitions we have used the proper syntax for the C-Shell
(tcsh as well). Finally:
source $SAS_DIR/sas-setup.csh
For
Bourne or Bash shells, the proper syntax is
export
SAS_DIR=/some_dir/xmmsas_20040318_1831
export
SAS_PATH=$SAS_DIR
.
$SAS_DIR/sas-setup.sh
For the remaining of this
text we will continue using the C-Shell/tcsh syntax.
To answer the second question we need to know where in the system are stored all the calibration data or Current Calibration Files (CCF). Usually this is a common place for everybody since they will be of utility for all users of XMM data. Let us assume this is /ccf/pub. Then we need to define SAS_CCFPATH as follows
setenv SAS_CCFPATH /ccf/pub
Later, we will need to define which calibration files must be used during the data analysis and reduction. However, there is something more we have to do, before we reach this point.
The third question seems at first sight the easiest to answer and in fact we have already answered it when we have set our XMM data directory /home/user/sasdata/<my_obs>. But the complete answer needs a little of work.
XMM-Newton data are provided in the form of a bundle of files called Observation Data Files (ODF). We call such a bundle of files, an ODF. All the files of an ODF contain information for a single XMM-Newton observation, concerning the different science exposures, which instrument were used, the exposure modes, the exposure filters, etc.
In order to work with our ODF we need first to identify which calibration files (CCF) we need to use. That is done by creating a Calibration Index File (CIF) which will tell our reduction processes which CCFs we need to use out of all available in SAS_CCFPATH, for the specific date of our observation data.
Let us start setting the SAS_ODF variable as
setenv SAS_ODF /home/user/sasdata/<my_obs>
pointing to the place where we have our data. To create the CIF, we need to run the first pure SAS command,
cifbuild
without options. The output will be the file ccf.cif, in our working directory /home/user/my_work. The ccf.cif is a FITS file which can be viewed with fv (FITSIO), containing the references to all the required CCFs, without specifying their directory paths (withccfpath=no, default option).
Once
the CIF is created we can set SAS_CCF
as follows
setenv
SAS_CCF ccf.cif
The last step is to update the summary file coming with the ODF bundle (*SUM.ASC) with all the observational information required to process the data. This is done with another SAS command, odfingest, which will take such information from all the ODF components and produce a 7.0.0 detailed summary file *SUM.SAS. So then,
odfingest
and now we re-define the SAS_ODF variable to point to the 7.0.0 summary file, as follows
setenv SAS_ODF `ls -1 *SUM.SAS`
The summary file has ASCII format. It is interesting to view this file with any text editor and to notice the value assigned for the PATH tag at the beginning of the file. If everything has been done as indicated in this document, such value should be
PATH /home/user/sasdata/<my_obs>
Last Update: June 8th, 2004