Spectral resampling (to custom sensor)
Spectrally resample a spectral raster layer by applying spectral response function convolution.
Parameters
- Spectral raster layer [raster]
A spectral raster layer to be resampled.
- Spectral response function [string]
Python code specifying the spectral response function.
Default:
from collections import OrderedDict # Place response function definition here. Should look something like this: responses = OrderedDict() # Option 1: Use band name as dict-key, # together with fully defined list of (<wavelength>, <response>) tuples as dict-value. # Define <response> as values between 0 and 1 for each whole nanometer <wavelength>. responses['Blue'] = [(443, 0.001), (444, 0.002), ..., (509, 1.0), ..., (518, 0.002), (519, 0.001)] responses['Green'] = [(519, 0.001), (520, 0.002), ..., (550, 1.0), ..., (597, 0.003), (598, 0.001)] ... # Option 2: Use band center wavelength as dict-key, # together with band full width at half maximum (FWHM) as dict-value. # The response function is modelled as an RBF around the center wavelength with a width of FWHM / 2.355. # See https://en.wikipedia.org/wiki/Full_width_at_half_maximum for details. responses[460] = 5.8 ... responses[2409] = 9.1
Outputs
- Output spectral response function library [fileDestination]
GEOJSON file destination.
- Output raster layer [rasterDestination]
Raster file destination.
Command-line usage
>qgis_process help enmapbox:SpectralResamplingToCustomSensor
:
----------------
Arguments
----------------
raster: Spectral raster layer
Argument type: raster
Acceptable values:
- Path to a raster layer
response: Spectral response function
Default value: from collections import OrderedDict
# Place response function definition here. Should look something like this:
responses = OrderedDict()
# Option 1: Use band name as dict-key,
# together with fully defined list of (<wavelength>, <response>) tuples as dict-value.
# Define <response> as values between 0 and 1 for each whole nanometer <wavelength>.
responses['Blue'] = [(443, 0.001), (444, 0.002), ..., (509, 1.0), ..., (518, 0.002), (519, 0.001)]
responses['Green'] = [(519, 0.001), (520, 0.002), ..., (550, 1.0), ..., (597, 0.003), (598, 0.001)]
...
# Option 2: Use band center wavelength as dict-key,
# together with band full width at half maximum (FWHM) as dict-value.
# The response function is modelled as an RBF around the center wavelength with a width of FWHM / 2.355.
# See https://en.wikipedia.org/wiki/Full_width_at_half_maximum for details.
responses[460] = 5.8
...
responses[2409] = 9.1
Argument type: string
Acceptable values:
- String value
outputResponseFunctionLibrary: Output spectral response function library (optional)
Argument type: fileDestination
Acceptable values:
- Path for new file
outputResampledRaster: Output raster layer
Argument type: rasterDestination
Acceptable values:
- Path for new raster layer
----------------
Outputs
----------------
outputResponseFunctionLibrary: <outputFile>
Output spectral response function library
outputResampledRaster: <outputRaster>
Output raster layer