srw: Radial Wavelength Metrics

Description Usage Arguments Value Examples

View source: R/fourier.R

Description

Calculates the dominant radial wavelength, radial wavelength index, and mean half wavelength of the radial Fourier spectrum. See Kedron et al. (2018) for more detailed description.

Usage

1
srw(x, create_plot = FALSE, option = c(1, 2, 3))

Arguments

x

A raster or matrix.

create_plot

Logical. If TRUE, returns a plot of the amplitude spectrum with lines showing the radii at which Srw, Srwi, and Shw are calculated.

option

Numeric. Code for which output metric(s) to return. 1 = Srw, 2 = Srwi, 3 = Shw.

Value

A vector containing numeric values for the dominant radial wavelength, radial wavelength index, and mean half wavelength.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
library(raster)

# import raster image
data(normforest)

# calculate metrics
srwvals <- srw(normforest)

# extract each value
Srw <- srwvals[1]
Srwi <- srwvals[2]
Shw <- srwvals[3]

geodiv documentation built on Sept. 5, 2021, 5:26 p.m.