Wavelet_Distance

class turbustat.statistics.Wavelet_Distance(dataset1, dataset2, scales=None, num=50, xlow=None, xhigh=None, fiducial_model=None)[source] [edit on github]

Bases: object

Compute the distance between the two cubes using the Wavelet transform. We fit a linear model to the two wavelet transforms. The distance is the t-statistic of the interaction term describing the difference in the slopes.

Parameters:

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

2D image.

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

2D image.

scales : numpy.ndarray or list

The scales where the transform is calculated.

num : int

Number of scales to calculate the transform at.

fiducial_model : wt2D

Computed wt2D object. use to avoid recomputing.

xlow : float or np.ndarray, optional

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

xhigh : float or np.ndarray, optional

The upper lag fitting limit. See xlow above.

Methods Summary

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

Methods Documentation

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

Implements the distance metric for 2 wavelet transforms. We fit the linear portion of the transform to represent the powerlaw

Parameters:

verbose : bool, optional

Enables plotting.

label1 : str, optional

Object or region name for dataset1

label2 : str, optional

Object or region name for dataset2

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.