NAME

HiSPICE

SPICE kernel file management.


SYNOPSIS

HiSPICE [-Source] [<source name> [...]]
[-Local_directory <pathname>]
[-Configuration <pathname>]
[-SErver <server>]
[-CAtalog <catalog>]
[-LSK_kernel <pathname>]
[-SCLK_kernel <pathname>]
[-Add_arguments <argument> [...]]
[-[No_]Replace]
[-No_Fetch]
[-No_Check]
[-No_op]
[-[Very_]Verbose | -Quiet]
[-Help]


OPTIONS

-Source <source name> [...]

The names of one or more configuration file groups containing FTP source parameters. Multiple source names may be separated by commas or whitespace. The option may be specified more than once on the command line; all source names will be accumulated. Duplicate source names are ignored. The special source name ``DEFAULT'' (or anything starting with this name, case insensitive) will cause the source name(s) to be obtained from the FTP_Source_Default configuration parameter.

If the configuration file does not contain an FTP source parameter group the source name is expected to be the name of the FTP server and all other parameters will have their default values.

-Local_directory <pathname>

The pathname to the local directory where the fetched files will be copied. A relative pathname is relative to the current working directory. The default is ``/tmp/HiSPICE.$$'', where ``$$'' is the process ID of the HiSPICE procedure. If the pathname does not exist an attempt is made to create the directory. N.B.: The procedure will fail if the directory is not empty. The directory will emptied of all files before the procedure exits, and will be removed if the default directory is used.

-Configuration <pathname>

The configuration file provides the FTP_Fetch sources definitions, database access information, and any SPICE group parameters. The configuration file must provide the necessary information needed to identify and connect with the database server where the SPICE, EDR_Products, and Pregeometry_Check_Sources tables will be found. If the pathname is a simple filename and it is not found in the current working directory it will be looked for in the user's home directory, and failing that, in the $HiRISE_ROOT/Configuration/HiSPICE directory where $HiRISE_ROOT is the value of the ``HiRISE_ROOT'' environment variable or ``/HiRISE'' if the environment variable is not present. Default: HiSPICE.conf.

-SErver <server>

The configuration file may contain connection information for more than one database. The information for each database is organized by Server name. A Server name corresponds to a parameter group in the confinguration file, with the same name, that contains access information for a database server. Default: The first name in the Server list specified in the configuration.

-CAtalog <catalog>

The database catalog on the server contains that contains the SPICE, EDR_Products, and Pregeometry_Check_Sources tables. Default: HiRISE.

-LSK_kernel <pathname>

For time conversion operations a leap seconds kernel (LSK) file and a spacecraft clock kernel (SCLK) file are required. The default pathname to the LSK kernel file is /HiRISE/Data/NAIF/LSK.kernel unless the configuration file contains a SPICE/LSK_Kernel parameter.

-SCLK_kernel <pathname>

For time conversion operations a leap seconds kernel (LSK) file and a spacecraft clock kernel (SCLK) file are required. The default pathname to the SCLK kernel file is /HiRISE/Data/NAIF/SCLK.kernel unless the configuration file contains a SPICE/SCLK_Kernel parameter.

-Add_arguments <argument> [...]

Addes the specified arguments to the observation data product processing command line. Arguments that are to begin with a dash character ('-') must be specified starting with an equals character ('=') instead to distinguish them from the HiSPICE option arguments. The command line that is used will always contain the -Observation_id argument followed by the Observation ID value; the -Catalog argument followed by the catalog name if the -CAtalog option was specified; the -Verbose argument if verbose mode is in effect; and the -Nopipe argument if -No-op mode has been set.

-[No_]Replace

Normally when the SPICE table is found to contain a record for the same type of kernel being updated and with a matching coverage range, or filename with the same data content, the update is not done. When -replace is specified the matching record will be replaced with a record containing the information for the kernel file and the file will replace any existing file. By default replace is enabled.

-No_Fetch

Do not fetch any kernel files; use whatever is found in the local kernel file staging directory if a non-default local directory was specified. By default this mode is not enabled.

-No_Check

Normally, the Pregeometry_Check_Sources is checked for observations ready for further processing as the final phase of HiSPICE processing. The -No_Check option prevents the checking from being done. By default this mode is not enabled.

-No_op

Do not apply any update operations, just list what would be done. The -no_op option does NOT imply the -no_fetch option. By default this mode is not enabled.

-[Very_]Verbose | -Quiet

Verbose operation reports procedure details. The -very_verbose option adds listings of the kernel report utilities programs and time coversion utilities that are used. By default a brief summary reporting (verbose) will be listed. Quiet operation minimizes messages.

-Help

Print this manual page.


Description

SPICE kernel management is provided from fetching kernel files from their remote repository through SPICE table updates to checking for observation data products pending the arrival of needed SPICE coverage that can proceed forward with their processing.

The first step in SPICE kernel management is fetching the kernel files from their remote repository to a local kernel files staging directory. The FTP_Fetch utility is used to accomplish this (see FTP_Fetch -help for details). The kernel file(s) to be fetched are determined by one or more source definition names corresponding to the names of a groups of FTP source specification parameters in the configuration file. If no source name is provided, or the special source name ``DEFAULT'' (or anything starting with this name, case insensitive) is used, the source name(s) are obtained from the FTP_Source_Default configuration parameter.

If no local kernel files staging directory is specified one will be provided in /tmp/HiSPICE.$$ (where $$ is the runtime process ID of this procedure) and removed after the disposition of the fetched kernel files has been completed. A user specified local kernel file directory must be empty of files (it may have subdirectories) and will be emptied of files (subdirectories remain), but not removed, after kernel file disposition, unless -no_fetch or -no_op is specified. The idea with -no_fetch combined with a -local directory is to process the contents of the directory (but not any subdirectories), including moving kernel files to their repository destination if they update the SPICE table, but otherwise leave the contents of the local directory untouched. If -no-fetch is specified without a -local directory provided then only the check of observation data products ready for processing will be done. Note that -no-op will run the FTP_Fetch procedure to see what is available to be fetched but not fetch the files, while -no_fetch will not run the FTP_Fetch procedure at all.

Note: If no kernel files are fetched, or -no_ftech is in effect and the kernel files staging directory is empty, the procedure will stop.

The disposition of the files in the staging directory is determined by running Update_SPICE on each file (see Update_SPICE -help for details) to determine if it is suitable for updating the SPICE table. The LSK and SCLK files - selected as having .tls and .tsc extensions, respectively - are used first, if present. Kernel files that update the table are moved to their destination directory. The kernel destination directory is /HiRISE/Data/NAIF unless the configuration file contains a SPICE/Destination parameter specifying another location. Files that do not update the table are removed unless -no_fetch or -no_op is in effect.

Note: If no kernel files update the SPICE table the procedure will stop unless -no_op is in effect.

Having updated the SPICE table with one or more new kernel files the Pregeometry_Check_Sources table is queried for records. The Source_ID field is expected to contain the Observation ID of data products waiting for the arrival of SPICE kernels that contain the coverage they need. Each unique Observation ID is checked to see if it has complete SPICE coverage using Check_SPICE (see Check_SPICE -help for details). Those that do are then run with the Launch_HiGeom command (this command may be overriden by the HiSPICE_OBSERVATION_OP_COMMAND environment variable, but the command must accept the -Verbose, -Nopipe, -Catalog and -Observation_id command line switches), with -Nopipe set on the command line if -no_op has been specified. Those arguments specified with the -Add_arguments option are also passed on the command line. If this command returns a zero exit status Pregeometry_Check_Sources table records with the corresponding Observation ID are removed from the table, unless -no_op is in effect. A report of the total number of observations ready for processing and that were processed because they have full SPICE coverage is reported.


Exit Status

  1. - Success

    All operations that were applied succeeded.

  2. - Bad command line syntax

    A command line syntax usage message will be provided.

  3. - Invalid configuration

    The configuration file could not be found.

  4. - System error

    A system operation - such as running a helper utility - failed.

  5. - Database query failed

    A database query failed.

  6. - Database update failed

    The Pregeometry_Check_Sources table could not be updated to remove an observation ID record.

  7. - The FTP_Fetch operation failed.

    The FTP_Fetch utility will report the reason for the failure.

  8. - The Update_SPICE operation failed.

    The Update_SPICE utility will report the reason for the failure.

  9. - The Check_SPICE operation failed.

    The Check_SPICE utility will report the reason for the failure.

  10. - The observation processing operation failed.

    The procedure to process an observation failed.


Author

Bradford Castalia, UA/HiROC


Copyright

Copyright (C) 2009 Arizona Board of Regents on behalf of the Planetary Image Research Laboratory, Lunar and Planetary Laboratory at the University of Arizona.

This program is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License, version 2, as published by the Free Software Foundation.

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program; if not, write to the Free Software Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.


Version

1.18