Dendrogram_Stats

class turbustat.statistics.Dendrogram_Stats(cube, min_deltas=None, dendro_params=None)[source] [edit on github]

Bases: object

Dendrogram statistics as described in Burkhart et al. (2013) Two statistics are contained: * number of leaves + branches vs. $delta$ parameter * statistical moments of the intensity histogram

Parameters:

cube : numpy.ndarray

Data cube.

min_deltas : numpy.ndarray or list

Minimum deltas of leaves in the dendrogram.

dendro_params : dict

Further parameters for the dendrogram algorithm (see www.dendrograms.org for more info).

Methods Summary

Methods Documentation

compute_dendro(verbose=False, save_dendro=False, dendro_name=None, dendro_obj=None)[source] [edit on github]

Compute the dendrogram and prune to the minimum deltas. ** min_deltas must be in ascending order! **

Parameters:

verbose : optional, bool

Enables the progress bar in astrodendro.

save_dendro : optional, bool

Saves the dendrogram in HDF5 format. Requires pyHDF5

dendro_name : str, optional

Save name when save_dendro is enabled. ”.hdf5” appended automatically.

dendro_obj : Dendrogram, optional

Input a pre-computed dendrogram object. It is assumed that the dendrogram has already been computed!

fit_numfeat(size=5, verbose=False)[source] [edit on github]

Fit a line to the power-law tail. The break is approximated using a moving window, computing the standard deviation. A spike occurs at the break point.

Parameters:

size : int. optional

Size of window. Passed to std_window.

verbose : bool, optional

Shows the model summary.

make_hist()[source] [edit on github]

Creates histograms based on values from the tree. Note: These histograms are remade whenc calculating the distance to ensure the proper form for the Hellinger distance.

Returns:

hists : list

Each list entry contains the histogram values and bins for a value of delta.

run(verbose=False, dendro_verbose=False, save_results=False, output_name=None)[source] [edit on github]

Compute dendrograms. Necessary to maintain the package format.

Parameters:

verbose : optional, bool

dendro_verbose : optional, bool

Prints out updates while making the dendrogram.