Wavelet_Distance

class turbustat.statistics.Wavelet_Distance(dataset1, dataset2, scales=None, num=50, xlow=None, xhigh=None, fit_kwargs={}, fit_kwargs2=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 astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice

2D image.

dataset2 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice

2D image.

scales : numpy.ndarray or list

The scales where the transform is calculated.

num : int

Number of scales to calculate the transform at.

xlow : astropy.units.Quantity, optional

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

xhigh : astropy.units.Quantity, optional

The upper lag fitting limit. See xlow above.

fit_kwargs : dict, optional

Passed to run.

fit_kwargs2 : dict, optional

Passed to run for dataset2. When None is given, fit_kwargs is used for dataset2.

Methods Summary

distance_metric([verbose, xunit, save_name, …]) Implements the distance metric for 2 wavelet transforms.

Methods Documentation

distance_metric(verbose=False, xunit=Unit("pix"), save_name=None, plot_kwargs1={}, plot_kwargs2={})[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.

xunit : Unit, optional

Unit of the x-axis in the plot in pixel, angular, or physical units.

save_name : str, optional

Name of the save file. Enables saving the figure.

plot_kwargs1 : dict, optional

Pass kwargs to plot_transform for dataset1.

plot_kwargs2 : dict, optional

Pass kwargs to plot_transform for dataset2.