VCS

class turbustat.statistics.VCS(cube, header=None, vel_units=False)[source] [edit on github]

Bases: turbustat.statistics.base_statistic.BaseStatisticMixIn

The VCS technique (Lazarian & Pogosyan, 2004).

Parameters:

cube : numpy.ndarray or astropy.io.fits.PrimaryHDU or SpectralCube

Data cube.

header : FITS header, optional

Corresponding FITS header.

vel_units : bool, optional

Convert frequencies to the spectral unit in the header.

Attributes Summary

brk
brk_err
slope_errs
slopes

Methods Summary

compute_pspec() Take the FFT of each spectrum in velocity dimension.
fit_pspec([breaks, log_break, lg_scale_cut, ...]) Fit the 1D Power spectrum using a segmented linear model.
run([verbose, save_name, breaks]) Run the entire computation.

Attributes Documentation

brk
brk_err
slope_errs
slopes

Methods Documentation

compute_pspec()[source] [edit on github]

Take the FFT of each spectrum in velocity dimension.

fit_pspec(breaks=None, log_break=True, lg_scale_cut=2, 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:

breaks : 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.

verbose : bool, optional

Enables verbose mode in Lm_Seg.

run(verbose=False, save_name=None, breaks=None)[source] [edit on github]

Run the entire computation.

Parameters:

verbose: bool, optional

Enables plotting.

save_name : str,optional

Save the figure when a file name is given.

breaks : float, optional

Specify where the break point is. If None, attempts to find using spline.