turbustat.statistics.
Dendrogram_Stats
(data, header=None, min_deltas=None, dendro_params=None)[source] [edit on github]¶Bases: turbustat.statistics.base_statistic.BaseStatisticMixIn
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: | data : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject or SpectralCube
min_deltas : numpy.ndarray or list
dendro_params : dict
|
---|
Attributes Summary
fitvals |
Log values of delta and number of structures used for the power-law tail fit. |
hists |
Histogram values and bins computed from the peak intensity in all structures. |
min_deltas |
Array of min_delta values to compute the dendrogram. |
model |
Power-law tail fit model. |
numfeatures |
Number of branches and leaves at each value of min_delta |
tail_slope |
Slope of power-law tail. |
tail_slope_err |
1-sigma error on slope of power-law tail. |
values |
Array of peak intensity values of leaves and branches at all values of min_delta. |
Methods Summary
compute_dendro ([verbose, save_dendro, ...]) |
Compute the dendrogram and prune to the minimum deltas. |
fit_numfeat ([size, verbose]) |
Fit a line to the power-law tail. |
load_dendrogram (hdf5_file[, min_deltas]) |
Load in a previously saved dendrogram. |
load_results (pickle_file) |
Load in a saved pickle file. |
make_hists ([min_number]) |
Creates histograms based on values from the tree. |
run ([periodic_bounds, verbose, save_name, ...]) |
Compute dendrograms. |
save_results ([output_name, keep_data]) |
Save the results of the dendrogram statistics to avoid re-computing. |
Attributes Documentation
fitvals
¶Log values of delta and number of structures used for the power-law tail fit.
hists
¶Histogram values and bins computed from the peak intensity in all
structures. One set of values and bins are returned for each value
of min_deltas
min_deltas
¶Array of min_delta values to compute the dendrogram.
model
¶Power-law tail fit model.
numfeatures
¶Number of branches and leaves at each value of min_delta
tail_slope
¶Slope of power-law tail.
tail_slope_err
¶1-sigma error on slope of power-law tail.
values
¶Array of peak intensity values of leaves and branches at all values of min_delta.
Methods Documentation
compute_dendro
(verbose=False, save_dendro=False, dendro_name=None, dendro_obj=None, periodic_bounds=False)[source] [edit on github]¶Compute the dendrogram and prune to the minimum deltas. ** min_deltas must be in ascending order! **
Parameters: | verbose : optional, bool
save_dendro : optional, bool
dendro_name : str, optional
dendro_obj : Dendrogram, optional
periodic_bounds : bool, optional
|
---|
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
verbose : bool, optional
|
---|
load_dendrogram
(hdf5_file, min_deltas=None)[source] [edit on github]¶Load in a previously saved dendrogram. Requires pyHDF5
Parameters: | hdf5_file : str
min_deltas : numpy.ndarray or list
|
---|
load_results
(pickle_file)[source] [edit on github]¶Load in a saved pickle file.
Parameters: | pickle_file : str
|
---|
make_hists
(min_number=10, **kwargs)[source] [edit on github]¶Creates histograms based on values from the tree. Note: These histograms are remade when calculating the distance to ensure the proper form for the Hellinger distance.
Parameters: | min_number : int, optional
|
---|
run
(periodic_bounds=False, verbose=False, save_name=None, dendro_verbose=False, dendro_obj=None, save_results=False, output_name=None, make_hists=True, **kwargs)[source] [edit on github]¶Compute dendrograms. Necessary to maintain the package format.
Parameters: | periodic_bounds : bool or list, optional
verbose : optional, bool
save_name : str,optional
dendro_verbose : optional, bool
dendro_obj : Dendrogram, optional
save_results : bool, optional
output_name : str, optional
make_hists : bool, optional
kwargs : Passed to |
---|
save_results
(output_name=None, keep_data=False)[source] [edit on github]¶Save the results of the dendrogram statistics to avoid re-computing. The pickled file will not include the data cube by default.