VCS_Distance

class turbustat.statistics.VCS_Distance(cube1, cube2, breaks=None, fit_kwargs={}, fit_kwargs2=None)[source]

Bases: object

Calculate the distance between two cubes using VCS. The 1D power spectrum is modeled by a broked linear model to account for the density and velocity dominated scales. The distance is the sum of the t-statistics for each model.

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

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

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

See data1.

slice_sizefloat, optional

Slice to degrade the cube to.

breaksfloat, list or array, optional

Specify where the break point is. If None, attempts to find using spline.

fit_kwargsdict, optional

Passed to run.

fit_kwargs2dict or None, optional

Passed to run for cube2. When None is given, settings from fit_kwargs will be used for cube2.

Methods Summary

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

Implements the distance metric for 2 VCS transforms.

Methods Documentation

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

Implements the distance metric for 2 VCS transforms. This distance is the t-statistic of the difference in the slopes.

Parameters:
verbosebool, optional

Enables plotting.

label1str, optional

Object or region name for cube1

label2str, optional

Object or region name for cube2

save_namestr,optional

Save the figure when a file name is given.