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]¶
Bases:
objectDistance metric for MVC.
- Parameters:
- data1dict 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
MVCclass may also be passed which may be pre-computed.- data2dict or
MVC See
data1above.- weight_by_errorbool, optional
When enabled, the property arrays are weighted by the inverse squared of the error arrays.
- 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.- 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_kwargsdict, optional
Passed to
radial_pspec_kwargsinrun.- pspec2_kwargsdict or None, optional
Passed to
radial_pspec_kwargsinrunfordata2. WhenNoneis given, setting frompspec_kwargsare used fordata2.
- data1dict or
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]¶
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:
- 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.