make_extended¶
-
turbustat.simulator.
make_extended
(imsize, powerlaw=2.0, theta=0.0, ellip=1.0, return_fft=False, full_fft=True, randomseed=32768324)[source] [edit on github]¶ Generate a 2D power-law image with a specified index and random phases.
Adapted from https://github.com/keflavich/image_registration. Added ability to make the power spectra elliptical. Also changed the random sampling so the random phases are Hermitian (and the inverse FFT gives a real-valued image).
Parameters: - imsize : int
Array size.
- powerlaw : float, optional
Powerlaw index.
- theta : float, optional
Position angle of major axis in radians. Has no effect when ellip==1.
- ellip : float, optional
Ratio of the minor to major axis. Must be > 0 and <= 1. Defaults to the circular case (ellip=1).
- return_fft : bool, optional
Return the FFT instead of the image. The full FFT is returned, including the redundant negative phase phases for the RFFT.
- full_fft : bool, optional
When
return_fft=True
, the full FFT, with negative frequencies, will be returned. Iffull_fft=False
, the RFFT is returned.- 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.