
Equal band counts can hide different measurements
Two tensors can have the same shape while representing different physical measurements. A model trained on one hundred bands cannot safely consume a different one hundred bands merely because the dimensions agree. Wavelength positions, response widths, units, missing regions and radiometric processing determine what each channel means.
NEON’s hyperspectral introduction distinguishes band-centre metadata from spectral width and FWHM. NASA’s PRISM documentation likewise reports sampling interval and spectral resolution separately. These are useful reminders that the gap between neighbouring centres is not a universal measurement of bandwidth. [1] [2]
This guide concerns a measurement-preserving input transformation, not evidence that cross-sensor transfer will work. After spectral alignment, illumination, atmosphere, spatial response and scene composition can still differ. Use the sensor-adaptation guide for the wider evaluation problem.
Write the quantity being averaged
For a sufficiently resolved spectral quantity x(lambda) and a non-negative response r_b(lambda), a simple band average is x_b = integral x(lambda) r_b(lambda) d lambda / integral r_b(lambda) d lambda. The denominator normalises the response; a zero or negligible denominator means the band is not supported.
NASA’s Ocean Biology Processing Group documents this normalised integration with an optional weighting function. That extra weighting matters because radiance, irradiance and derived reflectance quantities are not interchangeable. A ratio formed after integrating numerator and denominator is generally different from an unweighted average of their pointwise ratio. [3]
For an introductory material-reflectance exercise, averaging a high-resolution reflectance spectrum under a normalised response can be a useful declared approximation. For sensor intercalibration or a precise radiometric simulation, follow the product’s measurement definition and account for the appropriate irradiance or other weighting. Do not label a convenient interpolation routine a complete radiative-transfer model.
Make wavelength metadata executable
Before touching the cube, check that the wavelength vector has exactly one entry per retained band. Convert units explicitly, sort only with the matching data-axis permutation, and check for duplicates or non-finite entries. A wavelength of 0.85 micrometres and one of 850 nanometres refer to the same position; an unrecorded unit mismatch can destroy an otherwise plausible resampling matrix.
Keep the bad-band mask alongside the original indexing. Removing an atmospheric absorption region from the cube while retaining its wavelengths shifts every later channel. Store original band identifiers, retained identifiers, wavelength units, response provenance and the calibration version in the output manifest.
Also establish whether metadata describe one common spectral axis or a response that varies across the field. A single response matrix assumes that its spectral contract applies to every processed sample. If field-dependent calibration is available and relevant, use it or declare the approximation. A successful tensor operation cannot verify this assumption.
A weighted example exposes the interpolation difference
Consider three illustrative narrow source bins with values 0.2, 0.8 and 0.4, and target response weights 1, 2 and 1. With equal bin widths, the normalised result is (1 × 0.2 + 2 × 0.8 + 1 × 0.4) / 4 = 0.55. Selecting the central source value would return 0.8, which answers a different question.
On an irregular wavelength grid, include quadrature weights representing wavelength intervals. Treating every sample as equally wide gives densely sampled regions disproportionate influence. Check the integration convention near endpoints and ensure that units used for widths match those used for centres.
This example assumes that source values adequately represent narrow bins. Real source bands have finite responses of their own. Their measurements may not determine the fine spectral structure needed for a narrower target band. Interpolation can fill an array with numbers without creating the missing information.
| Source bin | Value | Target weight | Weighted contribution |
|---|---|---|---|
| 1 | 0.2 | 1 | 0.2 |
| 2 | 0.8 | 2 | 1.6 |
| 3 | 0.4 | 1 | 0.4 |
| Normalised result | 0.55 | Total 4 | Total 2.2 / 4 |
Choose an approximation that matches available metadata
A measured response curve is preferable when it represents the relevant instrument and processing version. If only centres and FWHM are available, a Gaussian model can provide a transparent approximation. It is still a model of the response, not a measured replacement for the missing curve.
Spectral Python’s BandResampler assumes source values are constant over their FWHM and uses a Gaussian destination response over overlapping regions. Its documentation makes those assumptions explicit. ENVI also documents different behaviour when given centres alone, centres with FWHM, or a filter function. A centres-only workflow can therefore introduce an implicit bandwidth assumption. [4] [5]
Record the implementation version and the exact inputs that created the resampling weights. If a checkpoint’s preprocessing contract is unavailable, preserve that uncertainty rather than choosing arbitrary equally spaced bands and claiming compatibility. The checkpoint-input audit explains how this mistake can occur before any neural-network layer runs.
Do not hide gaps with renormalisation
Suppose a target response extends beyond the source sensor’s range, or crosses a removed absorption region. Renormalising the remaining weights produces an average over a truncated response. That may be useful for a deliberately redefined feature, but it no longer represents the requested target band.
Calculate and retain a coverage indicator under a declared integration convention. Decide in advance whether unsupported bands are rejected, marked missing or accepted under a documented coverage threshold. The threshold depends on the error tolerance and spectral behaviour; there is no universal value that makes all materials safe.
Keep missingness separate from physical zero reflectance. A zero-filled channel can look like an absorption feature to a model. If a model requires a fixed input width, use a missing-data strategy it was designed or evaluated to handle, and document the mask or imputation. Test-set performance should not determine how much missing support is considered acceptable.
Test the transformation before training
A practical verification set contains a constant spectrum, a smooth ramp, a narrow synthetic feature and a deliberately unsupported band. Under normalised averaging with complete support, a constant must remain constant within numerical tolerance. Positive weights should not produce a value outside the sampled range for the assumed piecewise representation.
Check that changing wavelength units consistently leaves the result unchanged, permuting centres and channels together preserves the result, and modifying only the data order triggers a detectable mismatch in a known fixture. Visualise a few original and transformed spectra with wavelength-labelled axes. An index-labelled plot can conceal a unit or ordering error.
For a real transfer study, inspect several materials and acquisition conditions rather than only a mean spectrum. Compare results under plausible response-width or centre uncertainty if those quantities are not exact. This measures sensitivity to metadata uncertainty; it does not estimate all sources of domain shift.
Save the matrix and its meaning
If the operation is linear and shared across samples, preserve its matrix with the input and output wavelength records, normalisation convention and invalid-band policy. Hash both the matrix and metadata. Store the transformation before training so that inference uses precisely the same mapping.
Finally, fit any subsequent learned scaling or dimensionality reduction using the permitted training data. Physical spectral alignment and statistical normalisation are different steps. The preprocessing guide and reproducible pipeline show where fitted state belongs in a complete experiment.
Frequently asked questions
Can I resample a broad-band sensor into narrow hyperspectral bands?
You can define an estimated representation, but the source measurements generally do not identify the missing fine spectral structure. Such reconstruction needs assumptions and independent validation.
Is interpolation at band centres enough?
It may be an explicitly chosen approximation when responses and sampling justify it. It does not generally reproduce a target instrument’s band-integrated measurement.
Should a truncated target band be renormalised?
Only if you intentionally accept a different effective response and disclose it. Otherwise mark the target band unsupported or apply a predeclared coverage policy.
References and further reading
Reader feedback
Reads since 1 October 2026: at least 15 seconds with the article visible, counted once per browser per day. Reactions are anonymous and can be changed.
Loading reader feedback…
Discuss this article
Ask a technical question, challenge an assumption or share evidence from your own work.