brownian_field#
- anri.phantom.brownian_field(xy, step, scale, rms_deg, rng)[source]#
Sample a 2D Brownian random field of rotation vectors: increments grow like a random walk with distance.
Each of the 3 components is an independent Gaussian field whose increments have variance proportional to distance (spectrum ~ 1 / k^3), made by FFT on a grid of spacing
step(twice the points’ extent, so it does not wrap) and scaled so that pointsscaleapart differ byrms_degrms per component.- Parameters:
- Returns:
np.ndarray– [N, 3] rotation vectors at the points (nearest grid node), degrees