tabulate_sigmas

randomfield.powertools.tabulate_sigmas(data, power, spacing, packed=True)[source] [edit on github]

Replace an array of log10(k) values with the corresponding sigmas.

Note that the scaling from P(k) to variance depends on convention for normalizing the inverse FFT. Since we divide the inverse FFT by nx * ny * nz, the appropriate scaling here is:

sigma**2 = (nx * ny * nz) * P(k) / (2 * Vbox)
         = P(k) / (2 * spacing**3)