EDRgen
EDRgen is a wrapper script for HiRISE_Observation which encapsulates the functionality of EDR creation and updating the EDR_Products table.
It does archiving the the HiArch Archiver module, and can make use of an existing EDR.
EDRgen [-Configuration <filename>] [-Catalog <name>] [-Data_Version <Number>] [-Description "Brief text description"] [-Help] [-Force] [-Quiet] [-Target <Target ID>] [-Product_Version <Number>] [-Verbose] File
Path to the configuration file used for Product_Version and PVL_to_DB.
Name of the database catalog. Will default to 'HiRISE' if not specified.
Name of the target. This should be one of the PDS approved target IDs:
MOON, SKY, MARS, CAL, DEIMOS, PHOBOS
If not provided, it will default to "MARS".
Text for the rationale description. This should be a short (75 character) text description using only alphanumeric characters, spaces or the underscore.
The data set version number. If not specified, it will default to 1.0.
To force the EDR to be created with a particular product version number, provide it with the -Product_Version option.
If not specified, the Product_Version utility will be used to obtain the next version number for the product (defaulting to 1).
Clobber any existing data products (actual files and links).
Show help info
Display less output
Display more output.
Name of the next pipeline. If blank, output source will not be submitted to a pipeline.
EDRgen performs the following steps.
If we are given an existing EDR, re-use it, otherwise create an EDR from the source file.
Set the Product version if we are are given a version number to use. This will tell Archiver to use that version, though it will still check with HiCat to make sure it is OK.
Go ahead and force overwrite if we're working with an unreleased product.
Archive the EDR and update HiCat with PVL_to_DB.
Call Next_Pipeline (as configured) to pass the thing along.
HiRISE_Observation is first run with -i to determine the product IDs present in the file (presumed to be a channelized source file).
This script does not currently handle multiple product IDs, so will exit with a failure in that case, or if the product ID could not be determined.
Otherwise, the Archiver is initialized with Product ID, determining the next, max and proffered version numbers.
The EDR will be created in the temp directory. If it already exists there, an attempt will be made to remove it.
HiRISE_Observation is run to create the EDR. If this script has been called with the options for Description, Target, Data_Version, and Product_Version, they will be passed along as arguments to HiRISE_Observation.
Finally, the temp directory is checked to make sure the EDR was created.
The PRODUCT_VERSION_ID in the EDR label is checked against the Product_Version option; if it was given, it must match. If it was not given, the PRODUCT_VERSION_ID will be passed on to the Archiver.
The PRODUCT_ID from the label is checked against the basename of the file, they must match.
Archiver is initialized with the Product_ID.
The HiArch Archiver module is used to move the EDR into position, and update the link (if it is the greatest version), etc.
PVL_to_EDR is called to update or insert a record in HiCat. If this script was given a map file to work with it is used, otherwise we go with the default.
Invalid input
Successfully created EDR and updated the EDR_Products table.
The input file is corrupt or otherwise could not be processed.
The EDR could not be created.
An error occurred with an external application or file.
An internal unrecoverable error occurred.
Guy McArthur, UA/HiROC
Copyright (C) 2007-2020 Arizona Board of Regents on behalf of the Lunar and Planetary Laboratory at the University of Arizona.
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in compliance with the License. You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
2.46 2020/04/29 04:58:44
Hey! The above document had some coding errors, which are explained below:
Expected text after =item, not a number
Expected text after =item, not a number
Expected text after =item, not a number
Expected text after =item, not a number
Expected text after =item, not a number