Help for GALSOS

PURPOSE:

GALSOS will radiometrically correct Galileo SSI images, converting
each raw DN value (as acquired by the camera) to units of reflectance or
radiance.  GALSOS will also remove camera blemishes, compute the image
entropy, and encode the locations of invalid pixels as bad-data records.

EXECUTION:

  GALSOS  INP=PIC  OUT=OPIC  user-parameters...
where 
  PIC  is the image to be radiometrically corrected (byte image).
  OPIC is the radiometrically corrected output image (16-bit integer).

The input image (PIC) must be an SSI REDR image containing a binary label,
on which BADLABELS has been run.  Both Phase 1 and Phase2 UDR formats are
supported.

Note that, unlike the version of this program that was used during Galileo
systematic processing, no UDR or calibration files are accepted as the 
primary input.  (For test purposes, the program was revised so as not to 
abort when the input is a UDR, but the results are unpredictable.)

The output image (OPIC) is an SSI EDR.

NOTE ON THE ACCURACY OF THE CALIBRATION

During the testing of the revived version of GALSOS in 2011, comparisons 
were made with EDRs generated by GALSOS in Feb.1998 and with EDRs produced 
by ISIS2 and ISIS3 calibration software at the SETI Institute.  It was 
found that the output of the 2011 version can differ fairly significantly 
from that of the 1998 GALSOS (typically by ~7%), but that very good agreement 
exists with the contemporary ISIS ouput.  However, even there some differences 
exist, mostly at the edges of the image (first/last line or sample), but
sometimes along (apparently random) lines or columns.  It has also been 
observed that the ISIS2 and ISIS3 outputs differ between themselves.  
Therefore, it should be concluded that the Galileo SSI calibration is still 
to some extent a 'work in progress' and that uncertainties of order 1% in 
most pixels are to be expected.

REFERENCES:

1) JPL D-4264, "MIPL Software Structural Design for the Instrument Calibration
   of GLL SSI Science Processing", by Gary Yagi, June, 1987.
2) GMY:384-94-011, "Galileo SSI Picture Label, Revision 5", April 7, 1994.
3) 625-210, "Galileo SSI Calibration Report Part 1", K. Klaasen, H. Breneman,
   November 1, 1988.
4) GLL SIS 232-04, "SSI Unprocessed Data Record for OPNAV"
5) GLL SIS 232-07, "SSI Experiment Data Record"
6) JPL IOM 384-91-3, "Tracking GLL SSI Bad-Data Values, Binary Label Design,
   Revision 2", May 14, 1991.
7) GLL SIS 232-16, "SSI Raw Experiment Data Record CDROM", April 20, 1992.
8) GLL SIS 232-12, "SSI Image Catalog (Jupiter Encounter)", 1995?.

OPERATION:

GALSOS will radiometrically correct the input image, using  a linear
light-transfer model to convert each raw DN value to units of reflectance or
radiance.  GALSOS will also remove camera blemishes.

The processing parameters and calibration files used are recorded in the VICAR
label.  This label information is sufficient to reverse the radiometric
correction process (see program GALSOSI).

Detailed information is included below under the following topic headings:

   PROCESSING OF REDRs
   REQUIRED INPUT CALIBRATION DATA
   DETERMINATION OF CAMERA PARAMETERS
   CORRECTING ERRONEOUS LABEL INFORMATION
   RATIOMETRIC CORRECTION
   CREATING THE OUTPUT IMAGE LABEL
   TIMING
   EXAMPLES
   PROGRAM HISTORY

PROCESSING OF REDRs:

A UDR is a raw SSI image containing ancillary information in the binary header
and binary prefix portion of the VICAR label (ref. 4).  An REDR is a UDR upon
which one or more of the following programs have been executed: CATLABEL,
BADLABELS, GLLBLEMCOR, GLLFILLIN, ADESPIKE (ref 7).  The order in which these
programs are executed is optional, except that BADLABELS must precede any
execution of GLLBLEMCOR, GLLFILLIN, or ADESPIKE.  This is because BADLABELS
adds the bad-data label records necessary for the proper functioning of the
other programs (ref 6).

Note that if GLLFILLIN has been run, its effect will be cancelled since GALSOS
fills all truncated or missing lines with -32768 DN (see below).  This side-
effect can be countered by re-running GLLFILLIN after executing GALSOS.

GALSOS will identify bad-data values and record their locations as bad-data
records in the binary header portion of the VICAR label (ref. 6).  The following
types of bad-data values are handled:

  (1) Data dropouts	    Line gaps or lines truncated by the data compressor.
  (2) Low-full-well pixels  Samples whose values exceed full-well (ref. 1).
  (3) Camera blemishes      Samples which cannot be calibrated.
  (4) Saturated pixels      Samples whose raw values are 0 or 255 DN.
  (5) Reed/Solomon errors   Reed/Solomon overflow records.

Data drop-outs are detected by examining the segements field in the binary
prefix of each image line.  No radiometric correction is performed on data
gaps and -32768 DN is stored in these output samples.

Low-full-well pixels and camera blemishes are identified from data retrieved
from the Blemish File.  These pixels are replaced by interpolating over
neighboring radiometrically corrected samples.

Saturated pixels are identified by scanning the pixels for 0 and 255 DN.
These pixels are radiometrically corrected unless they fall in another of the
above categories.

Reed/Solomon overflow errors can be detected in Phase 1 UDRs or REDRs by
examining the binary prefix portion of each image line.  Since it is not
possible to determine what portion of the line is effected by the overflow,
the entire line is declared to be invalid.

Data drop-outs, low-full-well pixels, saturated pixels, and Reed-Solomon
overflow records are recorded as invalid data in the bad-data value portion
of the binary header.  Note, however, that camera blemishes are not recorded
in the binary header since their positions are defined in the Blemish File.

If BADLABELS has already been executed on an input REDR, GALSOS copies the
bad-data value header records for data drop-outs, and saturated pixels from
the REDR to the output EDR (instead of creating these records as above).

Similarly, if GLLBLEMCOR has already been executed, the bad-data value header
records for low-full-well pixels are copied from the REDR.

REQUIRED INPUT CALIBRATION DATA:

In addition to the input image (PIC), GALSOS requires the following calibration
data:

  (1) a radiometric file generated from calibration data acquired at the same
      filter position as the input image.
  (2) a dark-current file acquired at the same camera gain-state, frame-rate,
      PNI, and blemish-protect mode (BPM) settings.  Note also that extended-
      exposure mode frames require an extended-exposure mode dark-current file.
  (3) a blemish file generated from calibration data acquired at the same filter
      position, gain-state, and camera mode (full-frame or summation).
  (4) a shutter-offset file.

The radiometric and dark-current files are generated by the radiometric
calibration program GALGEN.  Individual dark-current frames or PICSUMs of
multiple dark-current frames may also be used.  The blemish file is generated
by BLEMGEN and the shutter-offset file is generated by CCDRECIP (Ref. 1).

GALSOS will automatically construct
the filenames for the radiometric, dark-current, blemish, and shutter-offset
files using camera parameter information extracted from the VICAR label
(see DETERMINATION OF CAMERA PARAMETERS below).  This assumes that all
calibration filenames adhere to the naming convention documented in subroutine
GLLCALNAME.  The directory locations, however, must be specified via one or
more of the following parameters:

  DIR		Default disk directory for all calibration files.
  DIRCAL	Directory containing the radiometric file.
  DIRDC		Directory containing the dark-current file.
  DIRBLM	Directory containing the blemish file.
  DIROFF	Directory containing the shutter-offset file.

For example,

  GALSOS  INP=S1.1  OUT=S1.EDR  DIR=/gll/law/cal/  DIRDC=/gll1/gmy/

The calibration filenames constructed by GALSOS may be overridden via the 
following parameters:

  CAL		Radiometric file
  DC		Dark-current file
  BLEM		Blemish file
  OFFSETS	Shutter-offset file

For example,

  GALSOS  INP=S12345.1  OUT=S12345.EDR  DIR=GLL:[LAW]  CAL=R2D2.RC

specifies that radiometric file R2D2.RC should be used. All other calibration
files are expected to be in directory GLL:[LAW].

DETERMINATION OF CAMERA PARAMETERS

The radiometric correction process is dependent on the following camera
settings: filter position, exposure time, gain state, frame rate,
extended-exposure mode, inverted/noinverted mode (PNI), and blemish
protection mode (BPM).  These parameters effect both the calibration files
selected and the equations used to perform the correction.

GALSOS extracts the filter position, exposure time, and frame-rate
from the label of the input.

GALSOS extracts the filter position from the label of the radiometric file.

GALSOS extracts the frame-rate, extended exposure mode, PNI, and BPM settings
from the label of the dark-current file.

GALSOS compares the camera parameters for the input images with those for each
of the calibration files.  If the input calibration files are incompatible with
the input image, processing is aborted.

If the keyword 'NOCHECK is specified, a warning message is printed whenever
a parameter mismatch is detected but processing continues.

CORRECTING ERRONEOUS LABEL INFORMATION

As mentioned above, GALSOS extracts various camera parameters from the VICAR
labels of the input image and the radiometric, dark-current, and blemish
files.  In addition, label item SOLRANGE is required to convert the output
pixels into units of reflectance (see below).  When the VICAR label contains
erroneous information, it must be corrected prior to input to GALSOS using
program LABEL-REPLACE.

Since LABEL-REPLACE cannot be used to correct ground calibration labels,
because of the obsolete IBM label format, the following parameters may be used
for these files only:

  (1) Parameters FILTER, EXPOSURE, and GAIN override the input image label.
  (2) Parameters CFILTER and CGAIN override the radiometric file label.
  (3) Parameter DCGAIN overrides the dark-current file label.

Note: All ground calibration frames logged prior to November 10, 1988 contained
erroneous values for the gain-state.  Some have since been corrected manually.

RADIOMETRIC CORRECTON:

GALSOS radiometrically corrects the input image using a linear model of the
light-transfer function.  The radiometric correction is performed on a pixel-
by-pixel basis using the following steps:
 
 1. If the pixel is identified in the Blemish File as a low-full-well
    pixel, then the pixel is checked to see if its DN value exceeds
    the full-well-saturation DN for that pixel.  If so, it is flagged
    as a blemish internally to be interpolated over.

 2. The radiometric correction is applied:
                e = z(d - dc)
    where z is retrieved from the Radiometric File and dc is retrieved from
    the Dark-Current File.

 3. Pixels which have been flagged internally as blemishes are interpolated
    over.

 4. The output pixel is scaled to radiometric units R (units of reflectance
    or units of radiance). The user determines the output picture scale by 
    specifying the parameter IOF (reflectance) or CONV (radiance).  The default
    is IOF=1.  (See IOF and CONV parameters)  The scaling is as follows:

	A1 = number of 'I over F' units per DN, where 10,000 I/F units
             would be produced by normal incidence of sunlight on a 
             a Lambert disk at the planet's distance from the sun.
        A2 = number of nanowatts per cm**2 per steradian per nanometer
             wavelength per DN.
    If IOF is specified, then

                                   S1       K
                r = 10000 * e * -------- * --- (D/5.2)**2
                                A1(t-to)    Ko
    where

        S1 = filter-dependent conversion factor from ft-Lamberts to
             I/F units for a reference distance of 5.2 AU from the Sun.
        t  = commanded exposure time of the input image (msec).
        to = line-dependent shutter offset.
        K  = system gain constant for the gain-state of the image.
        Ko = system gain constant for the calibration file gain-state.
        D  = target distance from the Sun (in AU).

    The target distance from the sun is extracted from VICAR label item 
    SOLRANGE.

    Because SOLRANGE was unavailable in Phase 1 images, the solar range
    is determined using SPICE (for these images).  Note that this requires
    knowledge of the target body.  If the target body in the label is
    incorrect, it should be input via the TARGET parameter.  If the solar
    range cannot be determined via SPICE, the following constants (in AU)
    are used: Venus=0.723331, Earth=1.0, Gaspra=2.2016, Ida=2.9485,
    Jupiter=5.2. For ground calibration images, SOLRANGE=5.2.  SOLRANGE
    can be specified directly via the SOLRANGE parameter.

    If CONV is specified, then

                           S2       K
                r = e * -------- * ---
                        A2(t-to)    Ko

    where S2 is the filter-dependent conversion factor from ft-Lamberts
    to units of nanowatts/cm**2/steradian/nanometer.

 5. The output DN is converted to the output 16-bit data format.  The
    output DN range is -32768 to +32767.  Although a negative DN value
    has no physical meaning, this may occur if the dark-current frame has
    a higher dark-current level than that of the input image.

The use of the IOF parameter is to control that the range of DNs output by 
GALSOS are within the halfword range and above zero DN.  As a rule of thumb, 
a target of Jupiter should use the default IOF=1 value, satellites should 
use .1 and rings should use .01.  The user should remember to use the IOF 
value from the VICAR label when converting from DN to reflectance.

If the keyword 'UBWC is specified, the input DN values (d) will be corrected
for uneven-bit-weighting due to the Analog-To-Digital Converter (ADC).  There
are inaccuracies in the operation of the ADC that result in DN bins of unequal 
width.  A table to adjust for the uneven bin distribution is used by GALSOS to
define the correct DN value.  If the input dark-current file is in byte 
format (i.e. an individual dark-current frame), then the correction
will be applied to the dark-current as well.  The current correction table was
supplied by Herb Breneman, 2 Mar 89, and is based on 1975 calibration data.

The UBWC parameter should be used at all times but the correction is most 
effective in when no noise is introduced by compression.  In other words, UBWC
is more effective on lossless compressed images and least effective in lossy 
compressed images.  

ENTROPY CALCULATION:

GALSOS also calculates the entropy of the input (raw) image and stores the
results in the VICAR label.  The average entropy for every 50th line is
calculated and stored in the binary header portion of the VICAR label (ref. 5).
The average entropy of the entire image is stored in the visible portion of the
VICAR label.  Both sets of calculations ignore data drop-outs and Reed/Solomon
overflow lines.  Entropy is in units of bits/pixel.

If the entropy has already been calculated by BADLABELS, this information is
copied from the input image and the entropy calculation is suppressed.  Note,
however, that the user can force a recalculation of the entropy by specifying
'PENTROPY.

Keyword 'PENTROPY causes the entropy for every 50th line and the entire image
to be printed.

CREATING THE OUTPUT IMAGE LABEL:

If the input image (PIC) is a UDR or REDR, the output image will be in EDR
format (ref 5).  Otherwise, the output will contain no binary label information.

GALSOS copies all binary label information from the input REDR to the
output EDR.  Bad-data records are copied or added as described above (see
TRACKING BAD-DATA VALUES).

The following information is added to the EDR header record:
        SCALE(1)        DN-to-reflectance scale factor
        SCALE(2)        DN-to-radiance scale factor
        Slope-File      Radiometric file name
        Offset-File     Dark-current file name

The ASCII text portion of the label is copied from the UDR/REDR and the
following label items added:

        IOF             DN-to-reflectance scale factor
        CNV             DN-to-radiance scale factor
        CAL             Radiometric file name
        DC              Dark-current file name
        BLM             Blemish file name
        SO              Shutter-offset file name

Finally label item NLB is updated to reflect all binary labels added.

EXAMPLES:

  1) GALSOS  A  B  DIR=/gll/law/

     The input image A is radiometrically corrected.  Since the radiometric
     scaling is defaulted, the output image B will be in units of reflectance
     (IOF), with an IOF scaling factor of 1.0.  All calibration files are
     assumed to be located in directory /gll/law and to follow the file
     naming conventions defined by subroutine GLLCALNAME.

  2) GALSOS  A  B  DIR=/gll/law/  DIRDC=/gll2/law/  CAL=CAL.GRN  DC=DC.GRN           BLEM=BLEM.DAT  OFFSETS=OFFSETS.DAT

     All calibration files are specified.  They are found in disk directory
     /gll/law, except for the dark-current file which is in /gll2/law. 
     Processing is to continue even if the calibration files are considered
     incompatible with the input image ('NOCHECK keyword). 

PROGRAM HISTORY:

Original  Programmer of GALSOS:  Gary Yagi, 1979
Current Cognizant Programmer:  Lucas Kamp

During the Venus and Earth-1 encounters, images were taken through an optics
cover.  The cover was jettisoned prior to the Gaspra encounter.  Before the
G29 orbit, all exposures were preceded by a light flood.  Beginning with G29,
all exposures were taken without a light flood.

Because of changes to camera sensitivity, different ft-Lamberts to reflectivity
and ft-Lamberts to nanowatts conversion factors (S1 and S2 above) are used for
the following phases of the mission: (1) Venus, (2) Earth-1, (3) Gaspra,
(4) G29 and beyond.

The original conversion tables are from Ken Klaasen's memo, July 2, 1991.
The values for Gaspra are from Klaasen's memo, Nov 18, 1997.
The values for G29 are from Klaasen's memo, Feb 11, 2002.

The current system gain constants are from a memo by Klaasen dated April 1992.

Revisions:
  1984-04-20 M.E.Morrill Rewritten in VAX FORTRAN VICAR1*
  1984-10-24 G.M.Yagi Conversion to VAX VICAR*2
  1985-05-15 D.F.Stanfill New version with blemgen in VAX C
  1986-03-20 G.M.Yagi Assembler MDECAL1 & MDECAL2
  1987-05-18 G.Yagi   Do scaling in DECAL subroutine
  1987-12-10 G.Yagi   New radiometric and offset file formats
  1988-04-01 G.Yagi   Scale output DN to radiometric units
  1988-05-28 G.Yagi   Minor changes to help file (FR #36087). Add processing of double-column blemishes Add CGAIN, DCGAIN parameters
  1988-10-20 G.Yagi   Fixed EXPOSURE parameter.
  1988-10-26 G.Yagi   Fix check for summation mode offsets.
  1988-11-01 G.Yagi   Fix S1 and S2 conversion tables.
  1989-03-08 G.Yagi   Add uneven-bit-weight correction option.
  1989-03-12 G.Yagi   Delete halfword input capability.
  1989-03-28 A.Runkle Support flight data (binary headers)
  1989-07-14 A.Runkle Support Bad Data Value records
  1989-10-26 A.Runkle Corrected test script. New ABLE86 parameter structure
  1990-02-14 A.Runkle Corrected algorithm for calculating A1 & A2 values. Added entropy calculations
  1990-03-29 A.Runkle Added TARGET keyword. Corrected variable declaration and usage. Fixed GLLCALNAME parameter list
  1990-04-25 A.Runkle Added NOCAT keyword & catalog entry code. Added BADFILES keyword & bypass code. Changed QPRINTS to XVMESSAGE. Corrected GLLCALNAME call for shutter offset file
  1990-06-01 A.Runkle Added PENTROPY keyword & printing code
  1990-07-15 A.Runkle Changed locdation of closing files. Added another status check in catalog code.
  1990-08-23 A.Runkle Test script update. Replace SOLRANGE when TARGET specified.
  1990-10-04 A.Runkle Changed NOCAT parameter to CATALOG and added a new default & new values. Changed IOF and CONV parameters to SCALETYP and SCALEVAL for easier use in procs.
  1990-10-30 G.Yagi   Adjusted filter factors for optics cover
  1990-11-11 A.Runkle Changed parameters so GALSOS can run in a proceedure properly. Added assignment of RAW_VERSION in catalog update. Added Blemish file checks for filter, gain & rate. Corrects summation mode usage of shutter offset file.
  1990-11-30 A.Runkle Changed VICAR label keyword ENTRPY to ENTROPY
  1991-03-31 W. Lee   Moved ground calibration parameters to the bottom of the PDF parameter list (FR #66589)
  1991-04-01 W. Lee   Disabled Frame-Rate inconsistency check between input Image and Blemish file (FR #64617)
  1991-04-02 W. Lee   Added GASPRA to TARGET (FRs #64650 & 66673) If TARGET is NOT specified by User, pull the Target name from VICAR label
  1991-04-09 W. Lee   Added "GALSOS_DONE" in Overview Table (FR #64653)
  1991-04-25 W. Lee   Updated Filter Paramters for Venus and Earth-1 Mission (FR #64651) 
  1991-04-30 W. Lee   Implemented Independent Directories for Calibration Files (FR #68858)
  1991-05-07 W. Lee   Set Edr_Status = 1 (= On DISK) in Corrected Table (FR #68831) 
  1991-05-17 W. Lee   Added "RS_OVERFLOW" BDV in Binary Header (IOM 384-91-3 by GMY, dated May-14-91, FR #63282)
  1991-06-05 W. Lee   Changed "ON/OFF" to "UBWC/NOUBWC" for Bit-Weighting (LKW320 Mail, dated June-04-91) 
  1991-06-10 W. Lee   Added Radiometric Table Interface for Calibration Files extraction
  1991-06-24 W. Lee   Put Dark-Current file in the OFFSET location in Binary Header (FR #66503)
  1991-07-30 W. Lee   Implemented modifications to process REDR image (SCR #B071)
  1991-08-09 W. Lee   Updated Conversion Factors based on latest memo by K. Klaasen (FR #70902)
  1991-08-14 W. Lee   Fixed Ground Summation problem (FR #70904)
  1991-08-30 W. Lee   Fixed Empty Blank problem for OFFSET in binary header (FR # 70925)
  1991-08-30 W. Lee   Conversion Factors depend on Mission PHASE (FR #70924)
  1991-10-07 W. Lee   Added a preceding statement about the 'DISALLOW keyword (FR #70928)
  1991-10-28 W. Lee   All References to VIO changed to VLT (FR #70926)
  1991-10-28 W. Lee   ON-OFF changed to UBWC-NOUBWC (#70927)
  1991-11-07 W. Lee   Incorporated PCA Capability
  1991-11-14 W. Lee   Closed FR #70937 with NO software corrections 
  1991-12-16 W. Lee   Modified to correctly verify BADLABEL & GLLBLEMCOR processings for an input CDROM REDR (FR #70966)
  1991-12-27 W. Lee   Changed "BLM" Label insertion so that output EDR can be processed by BADSHOW (FR #73714)
  1992-01-24 W. Lee   Fixed DEV crash problem  (FR #73782)
  1992-02-05 W. Lee   Resolved DIR & DISK issue for CALIBRATION file in association with the RADIOMETRIC mode (FR #73800)
  1992-02-07 W. Lee   Resolved problem associated with the "GLLBLEMCOR" message (FR #73795)  
  1992-02-12 W. Lee   Updated Gain Ratios to the 1991 values (FR #66567)
  1992-02-18 W. Lee   Removed large discrepancies among EDRs generated via different "routes" (FR #73797)
  1992-02-25 W. Lee   Implemented the "Consolidated Slope" approach ONLY for the RADIOMETRIC mode (FR #68966)
  1992-02-25 W. Lee   Miscellaneous Upgrades:  (NO FRs !) Updated HELPs, Included EXT for calibration files in Label, Rejected Input if it is a BLEMished UDR etc.  
  1992-06-01 G. Yagi  Major upgrade to help file.  
  1992-06-10 W. Lee   Added informative messages about the loading of the SSI_CORRECTED catalogue (FR #75744) 
  1992-06-15 W. Lee   Restructured Input Logical Mechanism for Calibration Files (FR #75726)
  1992-06-25 W. Lee   Disabled the usage of Reed-Solomon Overflow for LFW corrections (FR #75724)
  1992-06-30 W. Lee   Removed Reed-Solomon Overflows from Entropy Calculations (FR #76878)
  1992-07-02 W. Lee   Removed Gain-Constant-Ratio dependency in Radiometric correction (FR #76877)
  1992-07-08 W. Lee   Fixed "White Spot" troubles associated with GLLBLEMCORed REDR (FR #75754 -- GLLBLEMCOR)
  1992-09-02 W. Lee   Fixed Entropy calculation for Reed-Solomon UDR (FR #76878)
  1992-09-04 W. Lee   Resolved Catalog probelm (FR #75744)
  1993-07-13 G. Yagi  Fixed low-full-well bug (FR 81855). Store FTLTORAD and FTLTOIOF in catalog (FR 81826). Get SCLK from ABLE86 (FR 81747)
  1993-08-03 G. Yagi  Added Ida and Moon as valid targets (FR 81828)
  1993-12-13 G. Yagi  Changed to accept 800x800 summation-mode dark current files (FR 81876). Changed to extract last instance of PICSCALE in the VICAR label (FR 81877). Increase blemish file size to 10,000.
  1993-12-15 G. Yagi  Skip blemish removal if line is missing (FR 81894).
  1994-05-05 G. Yagi  Recognize Ida as a target (FR 85136).
  1994-11-18 T. Truong Added PhaseII and Sybase interface. Removed support for XED telemetry format.
  1995-03-10 G. Yagi  More Phase2 changes
  1995-03-27 G. Yagi  Fix bug getting PICSCALE for halfword DC (FR 85641).
  1995-04-10 G. Yagi  Check for invalid SEGMENTS field in Ph2 UDRs (FR 85642).
  1995-05-10 G. Yagi  Update reflectivity and radiance constants as per Klaasen memo dated May 8 1995 (FR 85151).
  1995-06-21 G. Yagi  Fix badlabels (FR 85892) Modify so it compiles when Sybase is not available.
  1996-07-01 G. Yagi  Update Gaspra reflectance/radiance scale factors
  1996-08-14 G. Yagi  Add SSI readout mode to call to GLLCALNAME (FR 89118)
  1997-02-07 G. Yagi  Correct call to zlget to retrieve ENTROPY from label (FR 89917)
  1997-04-30 R.R.Patel Removed the check for history label entropy and added check to see if badlabels has been run on input.
  1997-12-07 G. Yagi  Update radiance scale to Nov 18 memo
  1998-03-30 R.R.Patel Updated to work with summation mode flight-images with no binary header.
  1998-08-13 R.R.Patel Removed trans_blem since it was causing problem on VMS. It is now replaced with zvread (refer to AR-100482).
  1998-10-26 GMY      Extract solar range from label or SPICE.
  1999-05-19 HBM      Update help for UBWC and IOF
  2002-02-22 GMY      Add reflectance and radiance coversion tables for G29.
  2010-12-13 LWK      Revised pgm to work on PDS REDRs only.
  2016-02-13 WLB      Added test logs for 32 and 64-bit Linux.


PARAMETERS:


INP

STRING--REQUIRED INP=raw image

OUT

STRING--REQUIRED Output radiometrically corrected image.

DIR

STRING--OPTIONAL Default directory for calibration files.

DIRCAL

STRING--Optional Directory containing Radiometric File

DIRDC

STRING--Optional Directory containing Dark Current File

DIRBLM

STRING--Optional Directory containing Blemish File

DIROFF

STRING--Optional Directory containing Shutter OFFset File

CAL

STRING--Optional Input Radiometric File.

DC

STRING--optional Input Dark-Current File.

BLEM

STRING--optional Input Blemish File.

OFFSETS

STRING--optional Input Shutter-Offset File.

SCALETYP

KEYWORD--OPTIONAL IOF or CONV

SCALEVAL

Real--optional IOF per DN or Radiance per DN

BITWT

KEYWORD--OPTIONAL Uneven-bit-weighting correction ('UBWC /'NOUBWC)

SOLRANGE

KEYWORD--OPTIONAL Solar range (km)

NOCHECK

KEYWORD--OPTIONAL Suppresses checking for parameter mismatches.

PENTROPY

KEYWORD--OPTIONAL Print entropy values

FILTER

INTEGER--OPTIONAL Filter position for input image (0-7)

GAIN

INTEGER--OPTIONAL Gain state for input image (1-4)

EXPOSURE

INTEGER--OPTIONAL Exposure time for input image (msec).

CFILTER

INTEGER--OPTIONAL Filter position for Radiometric file (0-7)

CGAIN

INTEGER--OPTIONAL GAIN state for Radiometric file (1-4).

DCGAIN

INTEGER--OPTIONAL Gain state for Dark-Current File (1-4)

TARGET

Optional 12-char string Target name (planet, satellite, or asteroid)

SPICEMODE

Optional keyword Location of SPICE kernels (LOCAL or REMOTE)

CKNAME

Optional 4-char string C-kernel name

CKID

Optional 4-char string C-kernel ID

DEBUG

Optional keyword Print diagnostic messages

See Examples:


Cognizant Programmer: