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:
objectCalculate 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
VCAclass is given forcube1orcube2, if the channel widths are not equal tochannel_widthgiven toVCA_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
VCAclass 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_width
Quantity, optional Spectral resolution to degrade the cube to.
- breaks
Quantity, 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_cut
Quantityor 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_cut
Quantityor np.ndarray, optional The upper frequency fitting limit. See
low_cutabove. Defaults to 0.5.- pspec_kwargsdict, optional
Passed to
radial_pspec_kwargsinrun.- pspec2_kwargsdict or None, optional
Passed to
radial_pspec_kwargsinrunforcube2. WhenNoneis given, setting frompspec_kwargsare used forcube2.- phys_distance
Quantity, optional Physical distance to the region in the data.
- cube1numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or SpectralCube or
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.
- xunit
Unit, 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_fitfordata1.- plot_kwargs2dict, optional
Pass kwargs to
plot_fitfordata2.- use_wavenumberbool, optional
Plot the x-axis as the wavenumber rather than spatial frequency.