StatMoments

class turbustat.statistics.StatMoments(img, radius=5, periodic=True, nbins=None)[source] [edit on github]

Bases: object

Statistical Moments of a given image are returned. See Burkhart et al. (2010) for methods used.

Parameters:

img : numpy.ndarray

2D Image.

radius : int, optional

Radius of circle to use when computing moments.

periodic : bool, optional

If the data is periodic (ie. from asimulation), wrap the data.

bins : array or int, optional

Number of bins to use in the histogram.

Methods Summary

Methods Documentation

array_moments()[source] [edit on github]

Moments over the entire image.

compute_spatial_distrib()[source] [edit on github]

Compute the moments over circular region with the specified radius.

make_spatial_histograms(mean_bins=None, variance_bins=None, skewness_bins=None, kurtosis_bins=None)[source] [edit on github]

Create histograms of the moments.

Parameters:

mean_bins : array, optional

Bins to use for the histogram of the mean array

variance_bins : array, optional

Bins to use for the histogram of the variance array

skewness_bins : array, optional

Bins to use for the histogram of the skewness array

kurtosis_bins : array, optional

Bins to use for the histogram of the kurtosis array

run(verbose=False, kwargs={})[source] [edit on github]

Compute the entire method.

Parameters:

verbose : bool, optional

Enables plotting.

kwargs : dict, optional

Passed to make_spatial_histograms. Bins to use in the histograms can be given here.