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.


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


-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


Provides the usage 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.


Bradford Castalia, UA/PIRL


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


1.14 2006/03/13 22:05:20