Home
About ISIS
Support
Download

ISIS 3

Documentation
Tutorials
Technical Documents

ISIS 2

Documentation
Tutorials
Technical Documents

Search

USGS

ISIS 3 Application Documentation


lrowaccal

Printer Friendly View | TOC | Home

This program calibrates LRO WAC images

Overview Parameters

Description

This program applies dark, flat-field, radiometric, and temperature corrections for each framelet based on the band's filter number. There is also an optional mask to replace special pixels in the calibrated image. In order to output in I/F units, the cube must have spice data.

Corrections are applied in the following order: Dark, Flat-field, Radiometric, Special pixel mask, and Temperature.

Dark Correction:

If the DarkFile parameter is set, the given file(s) will be used for calibration. If DarkFile is set to "Default" or not set at all, the dark files will be looked up based on the time and temperature in the WAC being calibrated. The parameter,MiddleTemperatureFpa, is used for temperature and StartTime for time. This program, lrowaccal, will attempt to find the 2 dark files with closest time/temperature and interpolate/extrapolate from them. The method for finding dark files is as follows:

  • Create filename template based on WAC image offset and type (UV, BW, etc). Example: WAC_UV_Offset68_*C_*T_Dark.????.cub
  • Look in $lro/calibration/wac_darks for matching files.
  • Sort files on two factors:
    1. abs(dark temp - WAC temp)
    2. abs(dark time - WAC time)
  • Example:
    WAC Temp = 23.33 and WAC Time = 314264519.932493

    WAC_UV_Offset68_-10C_319412928T_Dark.0005.cub
    WAC_UV_Offset68_-15C_319412928T_Dark.0005.cub
    WAC_UV_Offset68_-20C_311632116T_Dark.0005.cub
    WAC_UV_Offset68_-20C_319412928T_Dark.0005.cub
    WAC_UV_Offset68_-25C_319412928T_Dark.0005.cub
    WAC_UV_Offset68_-30C_311632116T_Dark.0005.cub

    becomes

    WAC_UV_Offset68_-25C_319412928T_Dark.0005.cub
    WAC_UV_Offset68_-20C_311632116T_Dark.0005.cub
    WAC_UV_Offset68_-20C_319412928T_Dark.0005.cub
    WAC_UV_Offset68_-30C_311632116T_Dark.0005.cub
    WAC_UV_Offset68_-15C_319412928T_Dark.0005.cub
    WAC_UV_Offset68_-10C_319412928T_Dark.0005.cub
  • Take the 2 closest temperatures (-25C and -20C in the example).
  • Select the closest time for each temperature.
    Example result:

    WAC_UV_Offset68_-25C_319412928T_Dark.0005.cub
    WAC_UV_Offset68_-20C_311632116T_Dark.0005.cub
  • If only one temperature is available, the 2 times that are closest to the WAC time will be chosen. This will allow WACs to always be calibrated against something, instead of just failing.
    Example result:

    WAC_UV_Offset68_-20C_311632116T_Dark.0005.cub
    WAC_UV_Offset68_-20C_319412928T_Dark.0005.cub

Once the dark files are found, the correction is applied:

        output[pixel] -= (dark1[pixel] - dark2[pixel])/(dark1Temp - dark2Temp)*(frameTemp-dark2Temp) + dark2[pixel]
      
where
        dark1, dark2 = dark file cubes
        dark1Temp, dark2Temp = temperature of dark1 file and dark2 file
        frameTemp = (WAC EndTemperatureFpa - WAC BeginTemperatureFpa)/WAC NumFramelets * frame + WAC BeginTemperatureFpa
      

Flat-field Correction:

        output[pixel] /= flatfield[pixel]
      
If FlatfieldFile is not set, flat-field cube is loaded from $lro/calibration/wac_flats/WAC_<wac mode>_Flatfield.????.cub

Radiometric Correction:

      output[pixel] /= WAC ExposureDuration
      if radiometricType == iof
        output[pixel] *= solarDistance2 / iofResponsivity[band]
      else
        output[pixel] /= radianceResponsivity[band]
      
where
        solarDistance is distance from the Moon to the Sun
      
If RadiometricFile is not set, radiometric responsivity is loaded from $lro/calibration/WAC_RadiometricResponsivity.????.pvl

Special Pixel Mask:

      for each framelet in the output cube
        if specialPixelMask[pixel] is special
          outputFramelet[pixel] = specialPixelMask[pixel]
      
If SpecialPixelsFile is not set, special pixel mask is loaded from $lro/calibration/wac_masks/WAC_<wac mode>_<temp>C_SpecialPixels.????.cub. temp is closest temperature to WAC MiddleTemperatureFpa.

Temperature Correction:

        for each framlet in the output cube
          if output[pixel] is special- leave it alone
          else preform the correction
        
Correction:

                inputPixel
            --------------------
             a*(frameTemp) + b

             Where: 
               'a' and 'b' are band dependent constants, read in from a file.
             AND
               frameTemp = (WAC EndTemperatureFpa - WAC BeginTemperatureFpa)/WAC NumFramelets * frame + WAC BeginTemperatureFpa
      
If TEMPRATUREFILE is not set, the constants are loaded from $lro/calibration/WAC_TempratureConstants.????.pvl


Categories


History

Jacob Danton2009-07-01 Original version
Dan Clarke2012-08-13 Updated use of deprecated methods (use ProcessCube instead of Start/EndProcess). Updated documentation/comments. Optimized/cleaned up code in Calibrate, GetDark, and GetMask. Changed the algorithm for finding dark files in GetDark. GetDark will now find the two closest available dark file temperatures matching the input WAC cube. Then, it will find the dark file at each temperature with the time closest to the WAC time. This should prevent failed calibrations from missing darks.
Adam Licht2012-12-18 Fixed an error which would apply band 1 corrections to a single passed in band, even if that band was not band 1.
Adam Licht2013-04-16 Implemented a temperature based correction to lrowaccal. This correction requires constants which are read from a pvl file. A file other than the default can be passed in via an argument. The correction may also be turned off via an argument.

Parameter Groups

Files

Name Description
FROM Input Image
TO Output Image

Dark Options

Name Description
Dark Calibrate using a dark file.
DarkFile Dark file used for calibration.

Flatfield Options

Name Description
Flatfield Calibrate using a flatfield file.
FlatfieldFile Flatfield file used for calibration.

Radiometric Options

Name Description
Radiometric Do radiometric calibration.
RadiometricType Calibrated output cube units.
RadiometricFile Radiometric constants file used for calibration.

Special Pixels Options

Name Description
SpecialPixels
SpecialPixelsFile This option will apply a special pixel mask to the cub. The default is to use the system defined mask file with the matching WAC mode and closest Temperature to the input cub. Please see the main documentation for a detailed description of the Special Pixel Mask correction.

Temperature Options

Name Description
Temperature Calibrate using temperature base correction.
TemperatureFile Temperature gain and offset file.
X

Files: FROM


Description

This is the non-calibrated, unprojected WAC cube

Type cube
File Mode input
Filter *.cub
Close Window
X

Files: TO


Description

This is the calibrated WAC cube

Type cube
File Mode output
Pixel Type real
Filter *.cub
Close Window
X

Dark Options: Dark


Description

Calibrate using a correction based off of a dark file. Please see the Dark Correction section at the beginning of this document for a detailed explanation of how the correction is applied

Type boolean
Default True
Inclusions
  • DarkFile
Close Window
X

Dark Options: DarkFile


Description

Dark file used for calibration. The default is to use the dark file with the closest time and temperature to the WAC image being calibrated. See the Dark Correction section at the beginning of this document for a detailed explanation of how dark files are chosen.

Type filename
Default Default
Close Window
X

Flatfield Options: Flatfield


Description

Calibrate using a flatfield file.

Type boolean
Default True
Inclusions
  • FlatfieldFile
Close Window
X

Flatfield Options: FlatfieldFile


Description

Flatfield file used for calibration. The default is to use the system defined dark file with the highest version number.

Type filename
Default Default
Close Window
X

Radiometric Options: Radiometric


Description

Perform a radiometric calibration on the input cub. This type of this correction is defined by the RadiometricType parameter.

Type boolean
Default True
Inclusions
  • RadiometricType
  • RadiometricFile
Close Window
X

Radiometric Options: RadiometricType


Description

Calibrated output cube units. I/F or radiance.

Type string
Default IOF
Option List:
Option Brief Description
IOFI/F
RADIANCERadiance
Close Window
X

Radiometric Options: RadiometricFile


Description

Radiometric constants file used for calibration. The default is to use the system defined file with the highest version.

Type filename
Default Default
Close Window
X

Special Pixels Options: SpecialPixels


Description

This option will apply a special pixel mask to the input cub. The default is to use the system defined mask file with the matching WAC mode and closest Temperature to the input cub. Please see the main documentation for a detailed description of the Special Pixel Mask correction.

Type boolean
Default True
Inclusions
  • SpecialPixelsFile
Close Window
X

Special Pixels Options: SpecialPixelsFile


Description

Type filename
Default Default
Close Window
X

Temperature Options: Temperature


Description

Calibrate using temperature gain and offset. Please see this document, which outlines how the correction was derived.

Type boolean
Default True
Inclusions
  • TemperatureFile
Close Window
X

Temperature Options: TemperatureFile


Description

Temperature gain and offset file. The default is to use the system defined temperature gain and offset file with the highest version number.

Type filename
Default Default
Close Window