
Gaussian field with a prescribed power spectrum by FFT filtering
Source:R/SpectralTools.R
PowerLawField.RdWhite noise on the nx x ny grid (Philox stream 0 of seed,
row-major) is transformed, multiplied by the amplitude filter
\(H(k) = \sqrt{P(|k|)}\) and transformed back; the real part is the
field. The default spectrum is the power law \(P(|k|) = |k|^{-\beta}\)
(Peitgen and Saupe 1988) with the zero frequency removed; any
spectrum(k) of the radial frequency designs another filter.
Identical to the Python arm.
References
Peitgen, H.-O. and Saupe, D. (eds) (1988). The Science of Fractal Images. Springer, New York.
Examples
sum(PowerLawField(8, 8, beta = 2, seed = 3)$field)
#> [1] 2.664535e-15