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:
object
Distance 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
MVC
class may also be passed which may be pre-computed.- data2dict or
MVC
See
data1
above.- weight_by_errorbool, 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_kwargsdict, optional
Passed to
radial_pspec_kwargs
inrun
.- pspec2_kwargsdict or None, optional
Passed to
radial_pspec_kwargs
inrun
fordata2
. WhenNone
is given, setting frompspec_kwargs
are 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_fit
fordata1
.- plot_kwargs2dict, optional
Pass kwargs to
plot_fit
fordata2
.- use_wavenumberbool, optional
Plot the x-axis as the wavenumber rather than spatial frequency.