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.

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.

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

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


  • Author

    Guy McArthur, UA/HiROC


    Copyright

    Copyright (C) 2007 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

    2.44 2011/04/15 18:02:33