make_3dfield¶
-
turbustat.simulator.
make_3dfield
(imsize, powerlaw=2.0, amp=1.0, return_fft=False, randomseed=32768324)[source] [edit on github]¶ Generate a 3D power-law field with a specified index and random phases.
Heavily adapted from https://github.com/keflavich/image_registration.
Parameters: - imsize : int
Array size.
- powerlaw : float, optional
Powerlaw index.
- return_fft : bool, 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: - newmap : np.ndarray
Two-dimensional array with the given power-law properties.
- full_powermap : np.ndarray
The 2D array in Fourier space. The zero-frequency is shifted to the centre.