MVC_Distance

class turbustat.statistics.MVC_Distance(data1, data2, fiducial_model=None, weight_by_error=False, low_cut=None, high_cut=None, logspacing=False)[source] [edit on github]

Bases: object

Distance metric for MVC.

Parameters:

data1 : dict

A dictionary containing the centroid, moment 0, and linewidth arrays of a spectral cube. This output is created by Mask_and_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.

data2 : dict

See data1.

fiducial_model : MVC

Computed MVC object. use to avoid recomputing.

weight_by_error : bool, optional

When enabled, the property arrays are weighted by the inverse squared of the error arrays.

low_cut : int or float, optional

Set the cut-off for low spatial frequencies. Visually, below ~2 deviates from the power law (for the simulation set).

high_cut : int or float, optional

Set the cut-off for high spatial frequencies. Values beyond the size of the root grid are found to have no meaningful contribution

logspacing : bool, optional

Use logarithmically spaced bins in the 1D power spectrum.

Methods Summary

distance_metric([verbose, label1, label2, ...]) Implements the distance metric for 2 MVC transforms.

Methods Documentation

distance_metric(verbose=False, label1=None, label2=None, ang_units=False, unit=Unit("deg"), save_name=None, 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.

label1 : str, optional

Object or region name for dataset1

label2 : str, optional

Object or region name for dataset2

ang_units : bool, optional

Convert frequencies to angular units using the given header.

unit : u.Unit, optional

Choose the angular unit to convert to when ang_units is enabled.

save_name : str,optional

Save the figure when a file name is given.

use_wavenumber : bool, optional

Plot the x-axis as the wavenumber rather than spatial frequency.