make_3dfield¶
- turbustat.simulator.make_3dfield(imsize, powerlaw=2.0, amp=1.0, return_fft=False, randomseed=32768324)[source]¶
Generate a 3D power-law field with a specified index and random phases.
Heavily adapted from https://github.com/keflavich/image_registration.
- Parameters:
- imsizeint
Array size.
- powerlawfloat, optional
Powerlaw index.
- return_fftbool, optional
Return the power-map instead of the image. The full powermap is returned, including the redundant negative phase phases for the RFFT.
- randomseed: int, optional
Seed for random number generator.
- Returns:
- newmapnp.ndarray
Two-dimensional array with the given power-law properties.
- full_powermapnp.ndarray
The 2D array in Fourier space. The zero-frequency is shifted to the centre.