HiBeautify
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
The name of the database catalog to use.
The Configuration file used to control some aspects of the cosmetic enhancement and JP2/JPG creation.
Provides the Conductor ID, to use in temporary files. If unset, the process ID of the script will be used.
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.
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.
Zero on success, see HiColor.pm for definitions of the other exit codes.
Guy McArthur, UA/HiROC
Copyright (C) 2007-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.
1.110 2024/09/26 23:35:09