PowerSpectrum

class turbustat.statistics.PowerSpectrum(img, header=None, weights=None)[source] [edit on github]

Bases: turbustat.statistics.base_statistic.BaseStatisticMixIn, turbustat.statistics.base_pspec2.StatisticBase_PSpec2D

Compute the power spectrum of a given image. (e.g., Burkhart et al., 2010)

Parameters:

img : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject

2D image.

header : FITS header, optional

The image header. Needed for the pixel scale.

weights : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject

Weights to be applied to the image.

Methods Summary

compute_pspec() Compute the 2D power spectrum.
run([verbose, logspacing, return_stddev, ...]) Full computation of the spatial power spectrum.

Methods Documentation

compute_pspec()[source] [edit on github]

Compute the 2D power spectrum.

run(verbose=False, logspacing=False, return_stddev=True, low_cut=None, high_cut=0.5, ang_units=False, unit=Unit("deg"), save_name=None, use_wavenumber=False)[source] [edit on github]

Full computation of the spatial power spectrum.

Parameters:

verbose: bool, optional

Enables plotting.

logspacing : bool, optional

Return logarithmically spaced bins for the lags.

return_stddev : bool, optional

Return the standard deviation in the 1D bins.

low_cut : float, optional

Low frequency cut off in frequencies used in the fitting.

high_cut : float, optional

High frequency cut off in frequencies used in the fitting.

ang_units : bool, optional

Convert frequencies to angular units using the given header.

unit : u.Unit, optional

Choose the angular unit to convert to when ang_units is enabled.

save_name : str,optional

Save the figure when a file name is given.

use_wavenumber : bool, optional

Plot the x-axis as the wavenumber rather than spatial frequency.