CDBDSK
Summary
This command installs calibration reference files and tables, listed by
rootname in a release catalog, in the reference file directories if there
is sufficient disk space. The installation can consist of converting
incoming files from FITS to GEIS format when necessary and moving new files
to the reference file directories.
Description
Reads each release catalog identified by the first command line argument,
and verifies that reference files/tables listed in the catalog can be found
on disk in either the incoming (CDB_RETRIEVAL_DIR) or reference file directories.
The reference file directories are defined by environment variables (logicals) in
opus_login (e.g. uref, nref, mtab, ttab, etc.)
If files are found for every catalog entry, then a disk check is performed
to ensure that there is sufficient disk space in each of the reference
file directories to hold the files in the catalog installation. If
all file checks and disk space checks succeed, the files are copied and/or
converted from the incoming directory to the reference file directories.
Resource items (CDB_PIPELINE_CAL_*) indicate the file type required
by the pipeline for each reference file/table type. If the pipeline
file type needed is GEIS and the incoming file is FITS, then the STSDAS
task strfits is run to perform the conversion. If the pipeline
requires FITS format and the incoming file is FITS, then the file
is just moved into the reference file directory.
Usage
cdbdsk release_name path_name
[-localfiles] [-checkonly] [-nofitscheck]
The flags (preceded by a dash '-') are optional and can be specified in
any order by any number of unique characters (e.g. -localfiles, -loc, -l
are treated equally). The positional parameters 'release_name' and 'path_name'
are required and MUST occur in the order listed.
Input
CDBS catalog file(s).
OPUS path file.
OPUS resource file.
Output
The Qualifiers in this command and the contents of the resource file
determine which of the following activities are performed.
- Convert the retrieved CDBS files from FITS format to GEIS format if
necessary.
- Move the CDBS reference files from the retrieval directory to an OPUS
instrument-specific reference file directory (as defined by environment
variables in opus_login).
Constraint
The FITS-to-GEIS conversion
task strfits will not overwrite an existing file with the
same name in a reference file directory. A mangled name is used for
the resulting file (usually a numeric string like "_01" is appended to
the filename). This is done by the IRAF software that
runs under strfits. Existing files with the same name
will not occur under normal pipeline operation, but if you are attempting
to install a catalog that might have been attempted before, carefully check
the output messages for indications that file renaming occurred.
Resource File
Required Command-Line Arguments
release_catalog_mask (required)
A newly released catalog file name. Wild card names are permitted.
Will be searched for in CDB_CATALOG_IN_DIR unless the -localfiles flag
is set on the command line, in which case the current directory is used.
path_file_name (required)
An OPUS path file providing resource values. The full path name is
required (OPUS_DEFINITIONS_DIR is not automatically prepended).
Optional Command-Line Arguments
-c[heck_only]
Optional flag specifying that only catalog verification is performed.
This consists of locating the files listed in the catalog on disk and verifying
that sufficient free disk space exists to perform the installation. No
disk changes are made in this mode.
-l[ocalfiles]
Optional flag specifying that CDBDSK will look in the current working
directory for the release catalogs. If no catalogs are found, no processing
will be performed.
-nof[itscheck]
Optional flag specifying that verification of the success of FITS to
GEIS conversion will NOT be performed. That is, any FITS to GEIS conversions
required will be performed but no check of the success of the operation
will be made. This option was created to address a problem with certain
table files violating standard FITS format. The violation causes this command
to fail, and this option can be invoked as a work-around. The user should
verify that successful FITS to GEIS conversion did occur by inspecting
the files installed in the reference directories.
Examples
$ cdbdsk opus_101_z.cat OPUS_DEFINITIONS_DIR:blue.path -check
Verifies that the files listed in the catalog OPUS_101_Z.CAT exist on
disk in either the incoming (CDB_RETRIEVAL_IN_DIR) or reference file directories.
If found in the incoming directory, disk space checks are made to verify
that the installation can be performed. No file installations or conversions
are performed in "check" mode.
$ cdbdsk opus_242_y.cat OPUS_DEFINITIONS_DIR:blue.path -local
Updates the reference file directories for all released files mentioned
in the catalog OPUS_242_Y.CAT. The release catalog should reside in the
current working directory.