OGIP Calibration Memo CAL/GEN/92-015
How to Manage a Calibration Database
Lorraine Breedon
Code 668,
Version: 1997 Jun 20
NASA/GSFC,
Greenbelt, MD 20771
|
This document is intended to provide instructions for `local Caldb managers' wishing to manage their local Calibration database (Caldb). What is meant by managing? This basically means that (periodically) when new calibration files are made available, the `local Caldb manager' needs to include these new files in their local Caldb and to update the associated caldb.indx files such that the new calibration files are indexed (and thus made accessible to the software). This is obviously necessary, whether the mission is HEASARC-supported or non-HEASARC-supported. It is expected however, that the great majority of sites/institutions will possess Caldb set-ups containing only missions/instruments which are HEASARC-supported.
At the HEASARC, scripts automatically produce compressed tar files of all the good quality calibration files and the appropriate caldb.indx file for a given mission/instrument (i.e., goodfiles_asca_sis.tar.Z for the asca sis). Upon the delivery of a new calibration file to the HEASARC Caldb by the various instrument teams, the latest calibration file and the updated caldb.indx file is automatically included in the HEASARC compressed tar file. It is then obviously recommended that the `local Caldb Manager' updates their local Caldb as soon as possible (by obtaining this new compressed tar file from the HEASARC, either by perl script or `by hand', see Sections 3 and 4). For information as to how you, the astronomical community, are notified of new calibration file deliveries to the HEASARC, please see Appendix II.
It is assumed that the FTOOLS software package is already available at your site since you presumably already possess a Caldb which has been successfully installed and is operable. The FTOOLS package of course, contains the installation, management & access software for your local Caldb, and your Caldb is of little use without it. Details of the latest version of FTOOLS, are in Section 6.
If your Caldb contains only missions/instruments which are exact copies of the HEASARC, and you wish to manage your Caldb in the simplest and easiest way, you can use the Perl script (manage_caldb_hcopy.perl) available from ???? (SCRIPT IN PROGRESS). Since the script uses file transfer protocol to download files from the HEASARC, your system manager will also need to install the package libnet-1.05_01.tar.gz from the Comprehensive Perl Archive Network (CPAN).
See http://www.perl.com/CPAN.
This package requires that Perl 5.002 or better be installed on your machine (Perl 5.002 however, does not contain libnet-1.05_01.tar.gz as part of its default distribution). For additional instructions please see APPENDIX I.
If your Caldb contains missions/instruments which are HEASARC-supported, but personal/locally produced datasets have been added, to manage these missions you will require FTOOLS from the !NEXT! FTOOLS release version 4.1. Furthermore, a perl script (manage_caldb_local.perl) is available from ????..SCRIPT IN PROGRESS.... which automates the management process (see above paragraph for installation procedures).
Advice on the management of non-HEASARC-supported missions/instruments is detailed in Section 5.
All questions, comments and suggestions
should be directed to:
caldbhelp@athena.gsfc.nasa.gov
or to a member of
Team Caldb listed at the URL:
/docs/heasarc/caldb/caldb_team.html
A postscript file of the latest version of
this document can be obtained from the anonymous ftp account on:
legacy.gsfc.nasa.gov as
/caldb/docs/manuals/management/management_guide.ps
At the HEASARC, scripts are running which automatically produce :
Such information is held on :
goodfiles_miss_inst_size.new and
goodfiles_miss_inst.tar.Z
available from the HEASARC
via
either
the WWW at the URL:
/docs/heasarc/caldb/caldb_goodsize.html
the WWW
or
anonymous ftp from heasarc.gsfc.nasa.gov
in the directory
/caldb/data/miss/inst
i.e. /caldb/data/asca/gis
anonymous ftp
(from within the appropriate sub-directory)
The mission/instruments currently available at the HEASARC are:
TABLE I
Mission | Instrument | Approx diskspace requirement |
(Mbytes) | ||
ASCA | GIS | 98 |
SIS | 85 | |
XRT | 4 | |
ROSAT | HRI | 1 |
PSPC | 11 | |
XRT | 0.2 | |
XTE | PCA | 14 |
However for the most up-to-date diskspace requirements please examine:
N.B. If you don't have Perl on your machine, please see Appendix I.
The script will prompt you for the following information :
- If NO the program will terminate
Self-explanatory messages are issued to the screen to indicate the success/failure of each stage of your Caldb update.
What happens if manage_caldb_hcopy.perl informs that:
This message will be undoubtedly due to disk space problems. Simply
What does the manage_caldb_hcopy.perl script actually do?
(i) Checks the full path given to your Caldb i.e. dirtop = /abc/def/caldbtop already exists. Also checks that your Caldb actually
exists.
What happens if Perl version 5.002 or better is not installed on my system?
Unfortunately you will have to resort to the more long-winded installation
method given below :
available from the HEASARC
via
either
the WWW at the URL:
*** Then for each compressed tar file *** :
If you are updating this mission in your Caldb for the first time : whether you are including new calibration files from the HEASARC or new calibration files produced locally, you must intially
- run the FTOOL cifcadd (to add an extra column, CAL_ORIGIN, to the
caldb.indx file, whilst retaining all the caldb.indx information
therein).
- run the FTOOL caldbflag (to flag all the locally produced
calibration files as `LOCAL' in the CAL_ORIGIN
column of the caldb.indx file)
N.B. If you don't have Perl on your machine, please see Appendix I.
The script will prompt you for the following information :
- If NO the program will terminate
Self-explanatory messages are issued to the screen to indicate the success/failure of each stage of your Caldb update.
What happens if manage_caldb_local.perl informs that:
This message will be undoubtedly due to disk space problems. Simply
What does the manage_caldb_local.perl script actually do?
(i) Checks the full path given to your Caldb i.e. dirtop = /abc/def/caldbtop already exists. Also checks that your Caldb actually
exists.
What happens if Perl version 5.002 or better is not installed on my system?
Unfortunately you will have to resort to the more long-winded installation
method given below :
available from the HEASARC
via
either
the WWW at the URL:
*** Then for each compressed tar file *** :
Upon delivery of a new calibration file by the (non-HEASARC) mission/instrument teams to the `local' Caldb, you will need to intially examine the file to check that it conforms to OGIP-approved standards, and then (if correct), index the file into your Caldb. Overall, you will need to perform :
*** If the above FTOOLS reveal problems with the file, you should contact the instrument team who should then rectify them as necessary. Once
the file is checked as `correct', you may continue with the following : ***
The latest FTOOLS software package
is available from the
HEASARC via
either
the WWW at the URL:
Send e-mail to:
Your system manager should then replace the 1st line of the perl script
#!/usr1/local/bin/perl5
with the location of perl on your system. For example if perl is located
in /usr/local/bin/perl then the 1st line should of the perl script should read
#!/usr/local/bin/perl
subscribe <list> <your name>
where <list> is either
ascacaldb or rosatcaldb or xtecaldb and <your name> is your surname.
also on the web !!
The following useful links are available (in the HTML version of this
document only):
goodfiles_miss_inst_size.new
3 MANAGING HEASARC-SUPPORTED MISSIONS - exact copies
3.1 Using Perl Script
i.e., manage_caldb_hcopy.perl (dspace_check)
- The parameter ``dspace_check" is optional (can simply type ``d");
if included
the user will be engaged in INTERACTIVE checking of available
diskspace prior to the uncompression and untarring of each data file.
If omitted the script will just go ahead and attempt to uncompress
and untar the files NON-INTERACTIVELY.
- If YES the program will continue
``Some requested *.tar.Z files have NOT been successfully un-tarred ...
please see
/abc/def/caldbtop/caldb_err.log."
(i) Consult your systems manager regarding the aquisition
of more diskspace.
(ii) Examine /abc/def/caldbtop/caldb_err.log to determine which mission/instrument(s)
failed.
i.e. goodfiles_rosat_pspc.tar.Z
(iii) Run manage_caldb_hcopy.perl again, requesting the tar.Z file for the appropriate mission and instrument
i.e.,
rosat pspc.
(ii) Changes the current working directory to dirtop
(iii) Obtains compressed tar files for the selected mission and instruments via anonymous ftp from heasarc.gsfc.nasa.gov.
(iv) Uncompresses and untars the files.
(v) Creates the appropriate directory structures (if necessary)
(vi) Populates the directory tree with calibration files
(vii) If the calibration information for a given mission/instrument is being updated, the local copy of the caldb.indx is replaced with the HEASARC copy. If the mission/instrument is being included in the Caldb for the first time the HEASARC copy of the caldb.indx is placed in /dirtop/data/missn/instr.
3.2 NOT Using Perl Script
i.e. goodfiles_asca_gis.tar.Z
/docs/heasarc/caldb/caldb_goodsize.html
the WWW
or
anonymous ftp from heasarc.gsfc.nasa.gov
in the directory
/caldb/data/miss/inst
i.e. /caldb/data/asca/gis
- thus creating the same directory structure as at
HEASARC Calibration Database
and populating your local Caldb file-system.
i.e. if the tar file was goodfiles_asca_gis.tar then
mv the file data/tarredcif to data/asca/gis/caldb.indx.
Thus replacing your local copy of data/asca/gis/caldb.indx with
the new HEASARC copy.
4 MANAGING HEASARC-SUPPORTED MISSIONS - but with personal/locally
produced datasets added
4.1 Inclusion of New Datasets from the HEASARC (Using Perl Script)
i.e., manage_caldb_local.perl (dspace_check)
- The parameter ``dspace_check" is optional (can simply type ``d");
if included
the user will be engaged in INTERACTIVE checking of available
diskspace prior to the uncompression and untarring of each data file.
If omitted the script will just go ahead and attempt to uncompress
and untar the files NON-INTERACTIVELY.
- If YES the program will continue
``Some requested *.tar.Z files have NOT been successfully un-tarred ...
please see /abc/def/caldbtop/caldb_err.log."
(i) Consult your systems manager regarding the aquisition
of more diskspace.
(ii) Examine /abc/def/caldbtop/caldb_err.log to determine which mission/instrument(s)
failed.
i.e. goodfiles_rosat_pspc.tar.Z
(iii) Run manage_caldb_local.perl again, requesting the tar.Z file for the appropriate mission and instrument
i.e.,
rosat pspc.
(ii) Changes the current working directory to dirtop
(iii) Obtains compressed tar files for the selected mission and instruments via anonymous ftp from heasarc.gsfc.nasa.gov.
(iv) Uncompresses and untars the files.
(v) Creates the appropriate directory structures (if necessary)
(vi) Populates the directory tree with calibration files
(vii) Updates the local copy of the caldb.indx for a given
mission/instrument using the FTOOL mudcif (Many Updates to a Caldb.Indx File). mudcif indexes the (new) calibration files provided by the HEASARC appropriately, and flags the older versions of the new datasets as `bad' (whilst ignoring personal/locally produced datasets, hence ensuring these datasets are still accessible to the s/w).
4.2 Inclusion of New Datasets from the HEASARC (NOT Using Perl Script)
i.e. goodfiles_asca_gis.tar.Z
/docs/heasarc/caldb/caldb_goodsize.html
the WWW
or
anonymous ftp from heasarc.gsfc.nasa.gov
in the directory
/caldb/data/miss/inst
i.e. /caldb/data/asca/gis
- thus creating the same directory structure as at
HEASARC Calibration Database
and populating your local Caldb file-system.
i.e. run the FTOOL mudcif (Many Updates to a Caldb.Indx File), with the file
/abc/def/caldbtop/data/input.ASCII as input. mudcif indexes the (new) calibration files provided by the HEASARC appropriately, and flags the older versions of the new datasets as `bad' (whilst ignoring personal/locally produced datasets, hence ensuring these datasets are still accessible to the s/w).
4.3 Inclusion of New Personal/Local Datasets
i.e. /caldb_topdirectory/data/xte/pca/cpf/responses/95apr03/local.rmf
- input calibration filename
- input name (& location) of the index file
- input quality value of dataset being entered (0 ..for 'good' quality
hopefully!)
5 MANAGING NON-HEASARC-SUPPORTED MISSIONS and/or INSTRUMENTS
i.e. mv non_heasarc_stuff.rmf /caldbtop_directory/data/mission/instr/matrices
i.e. /caldbtop_directory/data/mission/instr/caldb.indx by running the FTOOL udcif. Run udcif from the sub-directory which contains the cal file since the
tool looks at the cwd to determine the path to the file and then writes
the path to the CAL_DIR column in the caldb.indx and the filename to the
CAL_FILE column.
- input filename
- input name (& location) of the index file to be updated
- input quality value of dataset being entered (0 ..for 'good' quality
hopefully!)
6 How do I get FTOOLS?
/docs/software/ftools/ftools_release.html
the WWW
or
anonymous ftp from heasarc.gsfc.nasa.gov
in the directory
software/ftools/release
anonymous ftp
Both areas contain the necessary
release notes and
the installation instructions.
7 IF ALL ELSE FAILS ...
caldbhelp@athena.gsfc.nasa.gov
or contact a member of
Team Caldb listed at the URL:
/docs/heasarc/caldb/caldb_team.html
8 APPENDIX I
Since the Caldb management scripts manage_caldb_*.perl use file transfer protocol to download files from the HEASARC, your system manager will need to install the package libnet-1.05_01.tar.gz from the Comprehensive Perl Archive Network (CPAN).
See http://www.perl.com/CPAN.
This package requires that Perl 5.002 or better be installed on your machine (Perl 5.002 however, does not contain libnet-1.05_01.tar.gz as part of its default distribution).
9 APPENDIX II
You will be notified that new
calibration files are available through an e-mail distribution list. Three such
distribution lists are currently available for the ASCA, ROSAT and XTE missions.
They are called ascacaldb, rosatcaldb and xtecaldb respectively. You can subscribe to
these lists by sending a one-line e-mail message to
listserv@athena.gsfc.nasa.gov. The body of the message should be:
USEFUL LINKS TO OTHER HTML PAGES