Skip to contents

Calculate Relative Absorption Band Area (RABA), which quantifies the total absorption across a spectral feature by summing band-by-band RABD calculations. Implementation follows Butz et al. (2015) formula in HSI scanning manual.

Usage

hsi_calc_raba(
  x,
  continuum_edges,
  index_name = NULL,
  filename = "",
  overwrite = FALSE,
  ...
)

Arguments

x

A terra SpatRaster with hyperspectral data

continuum_edges

Numeric vector of length 2. Wavelength boundaries (in nm) that define the continuum for the calculation window

index_name

Character. Name of calculated RABA index. Default NULL

filename

Character. Output filename. Default "" keeps in memory

overwrite

Logical. Overwrite existing file (default: FALSE)

...

Additional arguments passed to writeRaster

Value

A terra SpatRaster with RABA values

Details

RABA extends the RABD concept from a single point to the entire absorption feature. The method calculates RABD at each wavelength between the continuum edges and sums them. The continuum is calculated using linear interpolation.

This approach:

  • Uses the same continuum concept as hsi_calc_rabd

  • Integrates across the entire absorption feature

  • Is bandwidth-independent (works with any spectral resolution)

  • Provides a measure of total absorption strength

Examples

if (FALSE) { # \dontrun{
# Load hyperspectral data
x <- terra::rast("REFLECTANCE_testdata.tif")

# Calculate RABA for chlorophyll-a (typical range 650-700 nm)
x_raba <- hsi_calc_raba(
  x,
  continuum_edges = c(650, 700)
)

# Save to file and provide a name
x_raba <- hsi_calc_raba(
  x = reflectance,
  continuum_edges = c(650, 700),
  index_name = "raba_650700",
  filename = "raba_output.tif",
  overwrite = TRUE
)
} # }