NAME

set_Channel_ID

SUMMARY

Obtains a Channel ID from an observation data file to update the Source_ID field in a pipeline sources table for a selected source record; or splits a multi-channel observation data file into individual channel files and adds the channel file pathnames to the pipeline sources table.

SYNOPSIS

set_Channel_ID -File <observation filename> [-Database <catalog>] [-Pipeline <pipeline>] -Number <Source_Number> [-Configuration <configuration filename>]

OPTIONS

-File <observation filename>

The pathname for the observation data file to be processed.

-Database <catalog>

The database catalog containing the pipeline tables. Default: HiRISE

-Pipeline <pipeline>

The name of the pipeline. Default: EDRgen

-Number <Source_Number>

The value of the Source_Number field in the pipeline Sources table that selects the source record to update.

-Configuration <configuration filename>

The pathname for the configuration with database access parameters. Default: /HiRISE/Configuration/<pipeline>/<pipeline>.conf

-Help

Provides the usage description.

DESCRIPTION

The HiRISE_Observation procedure is used to obtain a list of channel IDs from the specified observation file.

If only one channel ID is obtained then the Source_ID field of the EDRgen pipeline's Sources table is updated with the channel ID in the record having the specified Source_Number field value.

If multiple channel IDs are obtained then HiRISE_Observation is used to split the observation file into individual channel data files, with line data mirroring disabled, which will be written to the same directory where the observation file is located. Each channel file will be named with the channel ID plus the ".DAT" extension. Then, after confirming that each channel file was written successfully, each channel file absolute pathname is added to the pipeline Sources table in the Source_Pathname field of a new record and its Source_ID field is set to the channel ID provided for the channel by HiRISE_Observation. In addition, each channel file base filename is added to the Raw_Products_map table in the SOURCE_FILE_NAME field of a new record and its Source_Pathname field is set to the absolute pathname of the original observation file; this provides a relational mapping between the original observation raw product pathname and the new channel filename that is expected to be recorded in the EDR_Products SOURCE_FILE_NAME field, as well as the basename of the new channel pathname entered into the Sources table.

Exit Status

0 - Success

One channel in the observation file and the Source_ID field was updated.

1 - Bad command line syntax

A command line syntax usage message will be provided.

2 - No channel IDs

The channel IDs were not obtained from the observation file.

3 - Multiple channels

The observation file contained multiple channels and new Sources records for them were added to the pipeline.

4 - Channel files failed

The channel files were not successfully written.

5 - Sources update failed

A Sources table update operation failed.

Author

Bradford Castalia, UA/PIRL

Copyright

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

1.16 2020/04/29 04:58:44