HiBeautify creates special color products ("pretty pictures"); namely, a synthetic RGB product and an enhanced IRB product that are cosmetically improved over the raw color or normalized raw color. These special products are extras associated with an eventual COLOR (IRB) RDR. They will be placed in the RDR Extras directory for the observation. This directory will be created if needed.

It will typically be configured to use the HiColorNorm cubes as input and be invoked after the HiColorNorm pipeline.


HiBeautify [-Verbose] [-Help] [-Catalog <name>] [-Frost | -NoFrost] [-Configuration <filename>] [-Id <Conductor ID>] [-Product_Version <Number>] PVL source file


-Catalog <name>

The name of the database catalog to use.

-Configuration <filename>

The Configuration file used to control some aspects of the cosmetic enhancement and JP2/JPG creation.

-Id <Conductor ID>

Provides the Conductor ID, to use in temporary files. If unset, the process ID of the script will be used.

-Product_Version <Number>

To force the Extras to be created with a particular RDR 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 extras (defaulting to 1).


Use the frost/ice color stretch and disable the auto-detection of frost/ice.


Do not use the frost/ice color stretch and disable the autodetection of frost/ice.


Show more messages and echo ISIS commands before they are run.


Prints the command usage help.


HiBeautify uses the left & right HiColorNorm cubes (slithered, normalized, three-band IRB cubes). It creates a mosaic of these which is saved as the _IRB cub. This is used as the input source for subsequent steps.

HiBeautify consists of the following steps.

Setup, initialize variables, lookup configuration parameters, create Archiver instance

Decompress the HiColorNorm cubes if necessary

Create an IRB mosaic from the HiColorNorm halves.

If a half is missing, we create a mosaic with the proper width and place the half in it at the proper location.

Determine if Frost/ICE may be present using FrostStats module.

Tag if Frost/Ice was detected

Subtract the unaltered RED band from the high pass filtered BG for synthetic blue.

Determine the min and max DN values of each band (RED, IR, BG, B) we're working with.

Create an RGB cube using the RED from the IRB mosaic, the BG from the IRB mosaic and the synthetic B that we just made.

NOTE: cubeit is broken in 3.4.0, a workaround is added here

Create the RGB.NOMAP and COLOR.NOMAP (IRB) Extras (JP2, browse and thumb). Archive them into the proper versioned directories.

Clean up as configured

Create PVL for Extras product mapping into HiCat

Use PVL_to_DB to update (or insert) the Extras info into HiCat. Note, PVL_to_DB does not have a catalog option.

Function Definitions


Explode the stacked cube into separate band cubes.

Reduce each by the configured scale factor (adding the bin ratio if BG or IR).

Obtain the min and max DN from the reduced band cube.

Create the JP2 by converting the color mosaic with Isis2jp2, passing the min and max DN from each reduced band cube.

Create JPG browse & thumb by converting the color mosaic with Isis2jpeg using the configured stretch options.

Exit Status

Zero on success, see for definitions of the other exit codes.


Guy McArthur, UA/HiROC


Copyright (C) 2007-2010 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.90 2016/01/12 18:56:32