NAME

EDRgen

SUMMARY

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.

SYNOPSIS

EDRgen [-Configuration <filename>] [-Catalog <name>] [-Data_Version <Number>] [-Description "Brief text description"] [-Help] [-Force] [-Quiet] [-Target <Target ID>] [-Product_Version <Number>] [-Verbose] File

OPTIONS

Configuration <filename>

Path to the configuration file used for Product_Version and PVL_to_DB.

Catalog <name>

Name of the database catalog. Will default to 'HiRISE' if not specified.

Target <Target ID>

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".

Description "Brief text description"

Text for the rationale description. This should be a short (75 character) text description using only alphanumeric characters, spaces or the underscore.

Data Version <Number>

The data set version number. If not specified, it will default to 1.0.

Product_Version <Number>

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).

Force

Clobber any existing data products (actual files and links).

Help

Show help info

Quiet

Display less output

Verbose

Display more output.

Next_Pipeline <name>

Name of the next pipeline. If blank, output source will not be submitted to a pipeline.

DESCRIPTION

EDRgen performs the following steps.

Creating a new EDR

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.

Re-using an existing EDR

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.

Storing the EDR

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.

Exit Status

-1

Invalid input

0

Successfully created EDR and updated the EDR_Products table.

1

The input file is corrupt or otherwise could not be processed.

2

The EDR could not be created.

3

An error occurred with an external application or file.

4

An internal unrecoverable error occurred.

Author

Guy McArthur, UA/HiROC

Copyright

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.

Version

2.46 2020/04/29 04:58:44

POD ERRORS

Hey! The above document had some coding errors, which are explained below:

Around line 679:

Expected text after =item, not a number

Around line 683:

Expected text after =item, not a number

Around line 687:

Expected text after =item, not a number

Around line 691:

Expected text after =item, not a number

Around line 695:

Expected text after =item, not a number