| Label | Explanation | Data Type |
Input Library Spectra | An Esri spectral library or ENVI spectral library file with wavelength information. | File; String |
Output Library Spectra | The output Esri spectral library file with the resampled wavelength information. | File |
Target sensor | Specifies the target spectra, or a custom spectra library file or image, that contains the target spectra.
| String |
Custom Target Image or Spectra (Optional) | A custom spectral library file or image with wavelength information that contains the target spectra. This parameter is enabled when the Target sensor parameter value is Custom target image or spectra. | Raster Dataset; Mosaic Dataset; Mosaic Layer; Raster Layer; File; Image Service; String |
Resampling Method (Optional) | Specifies the resampling method that will be used for the Output Library Spectra parameter value.
| String |
Available with Image Analyst license.
Summary
Resamples the bands of a spectral library to match the bands of a target spectral library or image, producing a new spectral library file. The target spectral library or image can be predefined from a list of common sensors, or it can be based on a custom image or spectra.
Usage
The Output Library Spectra parameter value will be a spectra with the same number of bands and wavelength range as the Target sensor parameter value.
The operation is performed on bands with overlapping wavelengths. If the input has a greater range than the target, the excess bands will be discarded. If the target has a greater range than the input, the bands outside of the input range will not be included and will be designated with a negative value that can be defined as NoData.
For the Resampling Method parameter's Band averaging option, an input band will be included in the calculation based on whether its center wavelength falls within the target band’s minimum and maximum wavelength range.
For the Resampling Method parameter's Gaussian convolution option, whether an input band will be included in the calculation is based on whether its center wavelength falls within the target’s center wavelength ± 3σ as follows:

where FWHM = WavelengthMax – WavelengthMin.
Parameters
ResampleLibrarySpectra(in_library_spectra, out_library_spectra, target_sensor, {custom_target_image_or_spectra}, {resampling_method})| Name | Explanation | Data Type |
in_library_spectra | An Esri spectral library or ENVI spectral library file with wavelength information. | File; String |
out_library_spectra | The output Esri spectral library file with the resampled wavelength information. | File |
target_sensor | Specifies the target spectra, or a custom spectra library file or image, that contains the target spectra.
| String |
custom_target_image_or_spectra (Optional) | A custom spectral library file or image with wavelength information that contains the target spectra. This parameter is active when the target_sensor parameter value is CUSTOM_TARGET_IMAGE_OR_SPECTRA. | Raster Dataset; Mosaic Dataset; Mosaic Layer; Raster Layer; File; Image Service; String |
resampling_method (Optional) | Specifies the resampling method that will be used for the out_library_spectra parameter value.
| String |
Code sample
This example uses the LANDSAT-8 option for the target_spectra parameter.
# Import system modules
import arcpy
from arcpy.ia import *
# Check out the ArcGIS Image Analyst extension license arcpy.CheckOutExtension("ImageAnalyst")
# Execute
arcpy.ia.ResampleLibrarySpectra(r“c:\library\aspen.esl”, r”C:\library\aspen_resampled.esl, “LANDSAT-8”, “BAND_AVERAGING”)This example uses the CUSTOM_TARGET_IMAGE_OR_SPECTRA option for the target_spectra parameter.
# Import system modules
import arcpy
from arcpy.ia import *
# Check out the ArcGIS Image Analyst extension license arcpy.CheckOutExtension("ImageAnalyst") # Execute
#Define variables
input_library = r“c:\library\hematite.sli”
out_library = r”c:\library\hematite_resampled.esl”
target_sensor = “CUSTOM_TARGET_IMAGE_OR_SPECTRA”
custom_target_image_or_spectra= r”c\image\landsat_7_bands.tif”
method = “GAUSSIAN_CONVOLUTION”
#Execute
arcpy.ia.ResampleLibrarySpectra(
in_library_spectra = input_library,
out_library_spectra = out_library,
target_sensor = target_sensor,
custom_target_image_or_spectra = custom_target_image_or_spectra,
resampling_method = method
)Environments
Licensing information
- Basic: Requires Image Analyst
- Standard: Requires Image Analyst
- Advanced: Requires Image Analyst