VCS

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

Bases: object

The VCS technique (Lazarian & Pogosyan, 2004).

Parameters:

cube : numpy.ndarray

Data cube.

header : FITS header

Corresponding FITS header.

phys_units : bool, optional

Sets whether physical scales can be used.

Attributes Summary

brk
brk_err
slope_errs
slopes

Methods Summary

Attributes Documentation

brk
brk_err
slope_errs
slopes

Methods Documentation

compute_fft()[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.

make_ps1D()[source] [edit on github]

Create a 1D power spectrum by averaging the correlation cube over all pixels.

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

Run the entire computation.

Parameters:

verbose: bool, optional

Enables plotting.

breaks : float, optional

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