Wavelet_Distance

class turbustat.statistics.Wavelet_Distance(dataset1, dataset2, scales=None, num=50, xlow=None, xhigh=None, fit_kwargs={}, fit_kwargs2=None)[source]

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:
dataset1numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice

2D image.

dataset2numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice

2D image.

scalesnumpy.ndarray or list

The scales where the transform is calculated.

numint

Number of scales to calculate the transform at.

xlowastropy.units.Quantity, optional

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

xhighastropy.units.Quantity, optional

The upper lag fitting limit. See xlow above.

fit_kwargsdict, optional

Passed to run.

fit_kwargs2dict, 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]

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

Parameters:
verbosebool, optional

Enables plotting.

xunitUnit, optional

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

save_namestr, optional

Name of the save file. Enables saving the figure.

plot_kwargs1dict, optional

Pass kwargs to plot_transform for dataset1.

plot_kwargs2dict, optional

Pass kwargs to plot_transform for dataset2.