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 points scale apart differ by rms_deg rms per component.

Parameters:
Returns:

np.ndarray – [N, 3] rotation vectors at the points (nearest grid node), degrees