DeltaVariance

class turbustat.statistics.DeltaVariance(img, header=None, weights=None, diam_ratio=1.5, lags=None, nlags=25)[source] [edit on github]

Bases: turbustat.statistics.base_statistic.BaseStatisticMixIn

The delta-variance technique as described in Ossenkopf et al. (2008).

Parameters:

img : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject

The image calculate the delta-variance of.

header : FITS header, optional

Image header. Required when img is a ndarray.

weights : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject

Weights to be used.

diam_ratio : float, optional

The ratio between the kernel sizes.

lags : numpy.ndarray or list, optional

The pixel scales to compute the delta-variance at.

nlags : int, optional

Number of lags to use.

Attributes Summary

delta_var Delta Variance values.
delta_var_error 1-sigma errors on the Delta variance values.
fit_range
slope
slope_err
weights Array of weights.

Methods Summary

compute_deltavar() Computes the delta-variance values and errors.
do_convolutions([allow_huge, boundary]) Perform the convolutions at all lags.
fit_plaw([xlow, xhigh, verbose]) Fit a power-law to the SCF spectrum.
fitted_model(xvals) Computes the fitted power-law in log-log space using the given x values.
run([verbose, ang_units, unit, allow_huge, ...]) Compute the delta-variance.

Attributes Documentation

delta_var

Delta Variance values.

delta_var_error

1-sigma errors on the Delta variance values.

fit_range
slope
slope_err
weights

Array of weights.

Methods Documentation

compute_deltavar()[source] [edit on github]

Computes the delta-variance values and errors.

do_convolutions(allow_huge=False, boundary='wrap')[source] [edit on github]

Perform the convolutions at all lags.

Parameters:

allow_huge : bool, optional

Passed to convolve_fft. Allows operations on images larger than 1 Gb.

boundary : {“wrap”, “fill”}, optional

Use “wrap” for periodic boundaries, and “fill” for non-periodic.

fit_plaw(xlow=None, xhigh=None, verbose=False)[source] [edit on github]

Fit a power-law to the SCF spectrum.

Parameters:

xlow : float, optional

Lower lag value to consider in the fit.

xhigh : float, optional

Upper lag value to consider in the fit.

verbose : bool, optional

Show fit summary when enabled.

fitted_model(xvals)[source] [edit on github]

Computes the fitted power-law in log-log space using the given x values.

Parameters:

xvals : ndarray

Values of log(lags) to compute the model at (base 10 log).

Returns:

model_values : ndarray

Values of the model at the given values. Equivalent to log values of the SCF spectrum.

run(verbose=False, ang_units=False, unit=Unit("deg"), allow_huge=False, boundary='wrap', xlow=None, xhigh=None, save_name=None)[source] [edit on github]

Compute the delta-variance.

Parameters:

verbose : bool, optional

Plot delta-variance transform.

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.

allow_huge : bool, optional

boundary : {“wrap”, “fill”}, optional

Use “wrap” for periodic boundaries, and “cut” for non-periodic.

xlow : float, optional

Lower lag value to consider in the fit.

xhigh : float, optional

Upper lag value to consider in the fit.

save_name : str,optional

Save the figure when a file name is given.