VCA

class turbustat.statistics.VCA(cube, header, slice_size=None, phys_units=False)[source] [edit on github]

Bases: object

The VCA technique (Lazarian & Pogosyan, 2004).

Parameters:

cube : numpy.ndarray

Data cube.

header : FITS header

Corresponding FITS header.

slice_sizes : float or int, optional

Slices to degrade the cube to.

phys_units : bool, optional

Sets whether physical scales can be used.

Attributes Summary

slope
slope_err

Methods Summary

Attributes Documentation

slope
slope_err

Methods Documentation

compute_pspec()[source] [edit on github]

Compute the 2D power spectrum.

compute_radial_pspec(return_index=True, wavenumber=False, return_stddev=False, azbins=1, binsize=1.0, view=False, **kwargs)[source] [edit on github]

Computes the radially averaged power spectrum This uses Adam Ginsburg’s code (see https://github.com/keflavich/agpy). See the above url for parameter explanations.

fit_pspec(brk=None, log_break=True, low_cut=<Mock name='mock.sqrt()' id='139806636391440'>, min_fits_pts=10, verbose=False)[source] [edit on github]

Fit the 1D Power spectrum using a segmented linear model. Note that the current implementation allows for only 1 break point in the model. If the break point is estimated via a spline, the breaks are tested, starting from the largest, until the model finds a good fit.

Parameters:

brk : float or None, optional

Guesses for the break points. If given as a list, the length of the list sets the number of break points to be fit. If a choice is outside of the allowed range from the data, Lm_Seg will raise an error. If None, a spline is used to estimate the breaks.

log_break : bool, optional

Sets whether the provided break estimates are log-ed values.

lg_scale_cut : int, optional

Cuts off largest scales, which deviate from the powerlaw.

min_fits_pts : int, optional

Sets the minimum number of points needed to fit. If not met, the break found is rejected.

verbose : bool, optional

Enables verbose mode in Lm_Seg.

plot_fit(show=True, show_2D=False, color='r', label=None)[source] [edit on github]

Plot the fitted model.

run(verbose=False, brk=None, **kwargs)[source] [edit on github]

Full computation of VCA.

Parameters:

verbose: bool, optional

Enables plotting.

kwargs : passed to pspec.