NAME

EDR_Stats

Create a channel image ISIS cube and place HiRISE EDR image statistics into HiCat's EDR_Products table. The ISIS cube is placed in the directory tree: $HiRISE_ROOT/Data/EDR_Stats

SYNOPSIS

EDR_Stats -File <pathname> -Table <catalog.table> -Configuration <conf_file> -id <id for /tmp files>

-File <pathname>

The full pathname of the HiRISE EDR product for which image statistics are to be acquired.

-Table <catalog.table>

Specify the catalog and table to update with EDR image statistics. If this parameter is not specified then the HiRISE.EDR_Products table is assumed. The user of this application must have the necessary MySQL user name and password to be able to access and update the catalog with access information provided in the EDR_Stats.conf file.

-Configuration <conf_file>

Optionally specify the name of the configuration file such as EDR_Stats.conf

DESCRIPTION

EDR_Stats creates an ISIS cube file in the $HiRISE_ROOT/Data/EDR_Stats directory area for subsequent processing and display.

Additionally, EDR_Statscalculates image statistics of a HiRISE EDR image product and place the results into HiCat's HiRISE.EDR_Products table.

The image statistics are placed in the catalog.table as specified in the -Catalog parameter on the command line. This will be the HiRISE.EDR_Products table for normal HiRISE operations.

Statistics added to the HiRISE.EDR_Products table:

The statistics contains information before and after the application of the onboard lookup table (LUT). If an image has gone through the onboard LUT then the 8-bit LUTed image is reverse mapped back into the 14-bit pixel unLUTed image. Of course there will not be a perfect back mapping into the original 14-bit pixel.

An EDR product contains the observation image and the calibibration image (containing 20 lines). Additionally there are supporting meta image pixels (dark reference pixels and buffer pixels) at the start and end of an image line. These meta image pixels are used in the calibration correction. See the HiRISE EDR Software Interface Speification for more information on the calibration image, dark refence pixels, and buffer pixels.

The fields updated in the EDR_Products table are described below.

Statistics for observation image:

 GAP_PIXELS - Number of missing pixels due to data gap
 GAP_PIXELS_PERCENT - Percent missing pixels
 HIGH_SATURATED_PIXELS - Number of high-end saturated pixels
 LOW_SATURATED_PIXELS - Number of low-end saturated pixels

 IMAGE_MEAN - Image mean
 IMAGE_STANDARD_DEVIATION - Image standard deviation
 IMAGE_MINIMUM - Minimum DN prior
 IMAGE_MAXIMUM - Maximum DN prior

Statistics for calibration image:

 CAL_REVERSE_MEAN - Mean of calibration reverse-readout lines
 CAL_REVERSE_STANDARD_DEVIATION - Standard deviation of reverse-readout lines
 CAL_REVERSE_MINIMUM - Minimum DN of reverse-readout lines
 CAL_REVERSE_MAXIMUM - Maximum DN or reverse-readout lines
 CAL_MASK_MEAN - Mean of calibration mask lines
 CAL_MASK_STANDARD_DEVIATION - Standard deviation or mask lines
 CAL_MASK_MINIMUM - Minimum of mask lines
 CAL_MASK_MAXIMUM - Maximum of mask lines
 CAL_RAMP_MEAN - Mean of calibration ramp lines
 CAL_RAMP_STANDARD_DEVIATION - Standard Deviation of ramp lines
 CAL_RAMP_MINIMUM - Minimum of ramp lines
 CAL_RAMP_MAXIMUM - Maximum of ramp lines

The observation image and calibration image buffer and dark reference statistics:

 IMAGE_SIGNAL_TO_NOISE_RATION - signal to noise ratio of image
 IMAGE_BUFFER_MEAN - Image area buffer pixel mean
 IMAGE_BUFFER_STANDARD_DEVIATION - Image area buffer pixel standard deviation
 IMAGE_BUFFER_MINIMUM - Image area buffer pixel minimum
 IMAGE_BUFFER_MAXIMUM - Image area buffer pixel maximum

 IMAGE_DARK_MEAN - Image area dark pixel mean
 IMAGE_DARK_STANDARD_DEVIATION - Image area dark pixel standard deviation
 IMAGE_DARK_MINIMUM - Image area dark pixel minimum
 IMAGE_DARK_MAXIMUM - Image area dark pixel maximum

 CAL_BUFFER_MEAN - Calibration image buffer pixel mean
 CAL_BUFFER_STANDARD_DEVIATION - Calibration image standard deviation
 CAL_BUFFER_MINIMUM - Calibration image buffer pixel minimum
 CAL_BUFFER_MAXIMUM - Calibration buffer pixel maximum

 CAL_DARK_MEAN - Calibration image dark pixel mean
 CAL_DARK_STANDARD_DEVIATION - Calibration image dark pixel standard deviation
 CAL_DARK_MINIMUM - Calibration image dark pixel minimum
 CAL_DARK_MAXIMUM - Calibration image dark pixel maximum

Statistics for image post ramp and calibration dark ramp

 IMAGE_POST_RAMP_MEAN - Image post ramp pixel mean
 IMAGE_POST_RAMP_STANDARD_DEVIATION - Image post ramp pixel standard deviation
 IMAGE_POST_RAMP_MINIMUM - Image post ramp pixel minimum
 IMAGE_POST_RAMP_MAXIMUM - Image post ramp pixel maximum

 CAL_DARK_RAMP_MEAN - Calibration image dark ramp pixel mean
 CAL_DARK_RAMP_STANDARD_DEVIATION - Calibration image dark ramp pixel standard deviation
 CAL_DARK_RAMP_MINIMUM - Calibration image dark ramp pixel minimum
 CAL_DARK_RAMP_MAXIMUM - Calibration image dark ramp pixel maximum

EDR_Stats uses the ISIS3 system to compute the image statistics. The EDR product is converted to ISIS3 format with the program EDR_Stats then histat calculates the image statistics. The DBI-perl interface is used to communicate with the MySQL server.

Environment Variables

EDR_Stats expects two environment variables:

HiRISE_ROOT

Specfies the root directory of the HiRISE directory tree. EDR_Stats abnormally terminates if this environment variable does not exist.

HOME

Specifies home directory, one of the places EDR_Stats looks for the EDR_Stats.conf file (see below).

Configuration file

EDR_Stats must have a configuration file. It can be optionaly specified with the -Configruation parameter. EDR_Stats extracts information about and access to the MySQL server. If not specified in the command line, EDR_Stats looks in the default directory then the HOME directory and finally the directory $HIRISE_ROOT/Configuration/EDR_Stats. If the configuration file can not be found then EDR_Stats abnormally terminates because it can not determine the host, user name, and password for access to MySQL.

The EDR_Stats.conf file must have the following PVL object:

EDR_Stats_bypass_IR10_1 = TRUE or FALSE - Should EDR_Stats bypass additional pipeline testing on IR10_1 channel files?

EDR_Stats_cube_keep = TRUE or FALSE (see -Delete flag above)

EDR_Stats_update_pipeline = TRUE or FALSE (place cube file on hical source pipeline)

EDR_Stats_next_pipeline = HiCal

Please note:

The ISIS system normally writes to the print.prt file in your default directory. Under the HiRISE operational enviroment using automated pipeline procedures it is recommend that printing to this file be disabled. The IsisPreferences file can be modified to disable printing to the logging file. This can be accomplished by indicating FileOutput = Off in the SessionLog group.

Return Codes

The following codes are returned by EDR_Stats:

 0 - EDR_Stats successfully accomplished its task
 1 - Improper command line syntax
 2 - Could not fine input EDR file
 3 - ISIS hi2isis program failed
 4 - Could not delete existing ISIS file
 5 - Bad HiRISE_ROOT definition
 6 - System related error
 7 - Could not get keyword with PvlGetKeyval subroutine
 8 - Problem in DBI-perl interace with MySQL server
 9 - Could not find configuration file or it's bad
 10 - ISIS histat program failed
 11 - ISIS hist program failed
 12 - Could not create/delete histogram file
 13 - Could not update hical pipeline

Author

Eric Eliason UA/LPL Audrie Fennema UA/LPL

Copyright

Copyright (C) 2004-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.51 2024/04/10 22:59:16