VCA_Distance

class turbustat.statistics.VCA_Distance(cube1, cube2, channel_width=None, breaks=None, low_cut=None, high_cut=None, radial_pspec_kwargs={}, radial_pspec_kwargs2=None)[source]

Bases: object

Calculate the distance between two cubes using VCA. The 1D power spectrum is modeled by a linear model. The distance is the t-statistic of the interaction between the two slopes.

Note

When a pre-computed VCA class is given for cube1 or cube2, if the channel widths are not equal to channel_width given to VCA_Distance, a ValueError will be raised.

Parameters:
cube1numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or SpectralCube or VCA

Data cube. Or a VCA class can be passed which may be pre-computed.

cube2numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or SpectralCube or VCA

See cube1.

channel_widthQuantity, optional

Spectral resolution to degrade the cube to.

breaksQuantity, list or array, optional

Specify where the break point is with appropriate units. If none is given, no break point will be used in the fit.

low_cutQuantity 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_cutQuantity or np.ndarray, optional

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

pspec_kwargsdict, optional

Passed to radial_pspec_kwargs in run.

pspec2_kwargsdict or None, optional

Passed to radial_pspec_kwargs in run for cube2. When None is given, setting from pspec_kwargs are used for cube2.

phys_distanceQuantity, optional

Physical distance to the region in the data.

Methods Summary

distance_metric([verbose, xunit, save_name, ...])

Implements the distance metric for 2 VCA transforms, each with the same channel width.

Methods Documentation

distance_metric(verbose=False, xunit=Unit('1 / pix'), save_name=None, plot_kwargs1={}, plot_kwargs2={}, use_wavenumber=False)[source]

Implements the distance metric for 2 VCA transforms, each with the same channel width. 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_fit for data1.

plot_kwargs2dict, optional

Pass kwargs to plot_fit for data2.

use_wavenumberbool, optional

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