MVC_Distance¶
-
class
turbustat.statistics.
MVC_Distance
(data1, data2, weight_by_error=False, low_cut=None, high_cut=<Quantity 0.5 1 / pix>, breaks=None, pspec_kwargs={}, pspec2_kwargs=None)[source] [edit on github]¶ Bases:
object
Distance metric for MVC.
Parameters: - data1 : dict or
MVC
A dictionary containing the centroid, moment 0, and linewidth arrays of a spectral cube. This output is created by Moments.to_dict. The minimum expected keys are ‘centroid’, ‘moment0’ and ‘linewidth’. If weight_by_error is enabled, the dictionary should also contain the error arrays, where the keys are the three above with ‘_error’ appended to the end. An
MVC
class may also be passed which may be pre-computed.- data2 : dict or
MVC
See
data1
above.- weight_by_error : bool, optional
When enabled, the property arrays are weighted by the inverse squared of the error arrays.
- low_cut :
Quantity
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_cut :
Quantity
or np.ndarray, optional The upper frequency fitting limit. See
low_cut
above. Defaults to 0.5.- 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.
- pspec_kwargs : dict, optional
Passed to
radial_pspec_kwargs
inrun
.- pspec2_kwargs : dict or None, optional
Passed to
radial_pspec_kwargs
inrun
fordata2
. WhenNone
is given, setting frompspec_kwargs
are used fordata2
.
Methods Summary
distance_metric
([verbose, xunit, save_name, …])Implements the distance metric for 2 MVC transforms. Methods Documentation
-
distance_metric
(verbose=False, xunit=Unit("1 / pix"), save_name=None, plot_kwargs1={}, plot_kwargs2={}, use_wavenumber=False)[source] [edit on github]¶ Implements the distance metric for 2 MVC transforms. We fit the linear portion of the transform to represent the powerlaw A linear model with an interaction term is fit to the two powerlaws. The distance is the t-statistic of the interaction.
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_fit
fordata1
.- plot_kwargs2 : dict, optional
Pass kwargs to
plot_fit
fordata2
.- use_wavenumber : bool, optional
Plot the x-axis as the wavenumber rather than spatial frequency.
- data1 : dict or