SP2RT

Convert a spectrum to a radiometric transformation


EnvironmentsPYTHON :: EASI :: MODELER
Quick linksDescription :: Parameters :: Parameter descriptions :: Details :: Example :: Related

Back to top

Description


SP2RT reads one spectrum from any type of GDB-supported file as a spectral library file, and uses the spectrum measurement values to evaluate the gains or offsets of a multiband radiometric transformation that is part of an image data set's metadata.
Back to top

Parameters


Name Type Caption Length Value range
FILE * String Input file name 1 - 192  
SPECFILE * String Spectral library file name 1 - 192  
SPREC Integer Spectrum record number 0 - 1 Default: 1
RTLEVEL Integer Radiometric transformation level 0 - 1  
RTCOMP * String Radiometric transformation component 4 - 6 GAIN | OFFSET
Default: GAIN
RTQUANT String Radiometric transformation output quantity 0 - 3 ADJ | RAD | REF
Default: ADJ
EXPONEN Float Exponent 0 - 1 Default: 1
MFACTOR Float Multiplication factor 0 - 1 Default: 1
MONITOR String Monitor mode 0 - 3 ON, OFF
Default: ON

* Required parameter
Back to top

Parameter descriptions

FILE

Specifies the name of the file that contains the image data set to receive the radiometric transformation.

SPECFILE

Specifies the spectral library file that contains the spectrum with which to evaluate the gain or offset component of a multiband radiometric transformation.

SPREC

Specifies the number of the spectrum in the input spectral library with which to evaluate the gain or offset component of a multiband radiometric transformation. If this parameter is not specified, the defaults value of 1 is used, specifying the number of the first spectrum record in the file.

RTLEVEL

Specifies whether to create and add a new radiometric transformation to the end of the existing transformation sequence, or to modify an existing transformation in the sequence.

For example:

The specified value must be greater than zero.

RTCOMP

Specifies which component of the specified radiometric transformation (RTLEVEL) to calculate.

Available options are:

RTQUANT

Specifies the quantity represented by the radiometric transformation output.

Available options are:

EXPONEN

Specifies the power to which all spectrum measurement values are to be raised before using the measurements to calculate gain or offset. If this parameter is not specified, the default value of 1 is used.

MFACTOR

Specifies the factor by which all spectrum measurement values are to be multiplied (after the application of the specified exponent (EXPONEN)) before using the measurements to calculate gain or offset. If this parameter is not specified, the default value of 1 is used.

MONITOR

The program progress can be monitored by printing the percentage of processing completed. A system parameter, MONITOR, controls this activity.

Available options are:

Back to top

Details

Each spectrum measurement value for which the wavelength coordinate matches the center wavelength of a data set band (that is, 'corresponds' to a data set band) is used to calculate a radiometric transformation gain or offset for that band, depending on the user specification. Spectrum measurement values are not required to correspond to a data set band, nor are all data set bands required to correspond to a spectrum measurement value.

The radiometric transformation gain or offset for a data set band that has no corresponding spectrum measurement value is evaluated to 1.0 or 0.0, respectively.

Two separate applications of this program are required to define a single radiometric transformation with both a gain and an offset component. If the first application creates a new transformation (default value for RTLEVEL), RTLEVEL must be explictly set in the second application to the level of the new transformation. An appropriate value for RTQUANT (Radiometric Transformation Output Quantity) for the first application (partial definition of the transformation) is ADJ.

A gain or offset value for a band with a corresponding measurement value m is evaluated to:

mfactor * m^exponen
where:
Back to top

Example

This example demonstrates the use of SP2RT to create a flat spectrum transformation for cuprad.pix.

Create a radiometric transformation for cuprad.pix from the mean flat image-derived spectrum. This transformation will be added to the end of the existing sequence.

EASI>file	=	"cuprad.pix"	! input file
EASI>specfile	=	"mean.spl"	! input spectral library
EASI>sprec	=		! use first spectrum record in mean.spl
EASI>rtlevel	=		! default, create new RT
EASI>rtcomp	=	"gain"	! evaluate gain component of the new RT
EASI>rtquant	=	"adj"	! non-physical adjustment
EASI>exponen	=	-1	! reciprocal of spectrum values used as gains
EASI>mfactor	=		! default, no multiplication factor

EASI>run SP2RT
            

© PCI Geomatics Enterprises, Inc.®, 2026. All rights reserved.