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]

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:
imsizeint

Array size.

powerlawfloat, optional

Powerlaw index.

thetafloat, optional

Position angle of major axis in radians. Has no effect when ellip==1.

ellipfloat, optional

Ratio of the minor to major axis. Must be > 0 and <= 1. Defaults to the circular case (ellip=1).

return_fftbool, optional

Return the FFT instead of the image. The full FFT is returned, including the redundant negative phase phases for the RFFT.

full_fftbool, optional

When return_fft=True, the full FFT, with negative frequencies, will be returned. If full_fft=False, the RFFT is returned.

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.