PSpec_Distance

class turbustat.statistics.PSpec_Distance(data1, data2, weights1=None, weights2=None, fiducial_model=None, ang_units=False, low_cut=None, high_cut=0.5, logspacing=False)[source] [edit on github]

Bases: object

Distance metric for the spatial power spectrum. A linear model with an interaction term is fit to the powerlaws. The distance is the t-statistic of the interaction term.

Parameters:

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

Data with an associated header.

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

See data1.

weights1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject, optional

Weights to apply to data1

weights2 : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject, optional

Weights to apply to data2

fiducial_model : PowerSpectrum

Computed PowerSpectrum object. use to avoid recomputing.

ang_units : bool, optional

Convert the frequencies to angular units using the header.

low_cut : float or np.ndarray, optional

The lower frequency fitting limit. An array with 2 elements can be passed to give separate lower limits for the datasets.

high_cut : float or np.ndarray, optional

The upper frequency fitting limit. See low_cut above. Defaults to 0.5.

logspacing : bool, optional

Enable to use logarithmically-spaced bins.

Methods Summary

distance_metric([verbose, label1, label2, ...]) Implements the distance metric for 2 Power Spectrum transforms.

Methods Documentation

distance_metric(verbose=False, label1=None, label2=None, ang_units=False, unit=Unit("deg"), save_name=None, use_wavenumber=False)[source] [edit on github]

Implements the distance metric for 2 Power Spectrum transforms. We fit the linear portion of the transform to represent the powerlaw A linear model with an interaction term is fit to the two powerlaws. The distance is the t-statistic of the interaction.

Parameters:

verbose : bool, optional

Enables plotting.

label1 : str, optional

Object or region name for data1

label2 : str, optional

Object or region name for data2

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.