This package is to deal with structure functions of random fields with stationary increments in Julia.
The structure function of a random field φ is defined by:
Dᵩ(Δr) = ⟨[φ(r + Δr) - φ(r)]²⟩where ⟨…⟩ denotes expectation while r and Δr are absolute and relative positions. If
φ has stationary increments, its structure function does not depend on r, only on Δr.
This package let you build structure function objects, generate the associated covariance
matrix, and simulate random fields having a given structure function Dᵩ and piston
standard deviation σ. If σ > 0 holds, the covariance of φ is invertible.
This LaTeX file provides some mathematical background.
To measure empirically a structure function:
# Create structure function object with support S.
A = EmpiricalStructFunc(S)
for ϕₜ in Φ
# Integrate structure function.
push!(A, ϕₜ)
end
T = nobs(A); # get the number of observations
D_ϕ = values(A); # compute the structure functionAt any moment:
a = A.den; # get the denominator: `a = S ⊗ S`
fft_b = A.num; # get the numerator in the frequency domainIt is also possible to define theoretical structure functions. For example, Kolmogorov
structure function for Fried's parameter r0 is built by:
D = KolmogorovStructFunc(r0);which yields a callable object D such that D(r) returns the value of the structure
function at position r. Note that r and r0 are assumed to have the same units if
r0 has no units; otherwise; r must have the same unit dimensions as r0.