turbustat.statistics.
PDF
(img, min_val=-inf, bins=None, weights=None, normalization_type=None)[source] [edit on github]¶Bases: turbustat.statistics.base_statistic.BaseStatisticMixIn
Create the PDF of a given array.
Parameters: | img : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject or SpectralCube
min_val : float, optional
bins : list or numpy.ndarray or int, optional
weights : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject or SpectralCube, optional
use_standardized : bool, optional
normalization_type : {“standardize”, “center”, “normalize”,
|
---|
Attributes Summary
bins |
Bin centers. |
ecdf |
ECDF values in bins . |
model_params |
Parameters of the fitted model. |
model_stderrs |
Standard errors of the fitted model. |
normalization_type |
|
pdf |
PDF values in bins . |
Methods Summary
corner_plot (**kwargs) |
Create a corner plot from the MCMC. |
find_at_percentile (percentiles) |
Return the values at the given percentiles. |
find_percentile (values) |
Return the percentiles of given values from the data distribution. |
fit_pdf ([model, verbose, fit_type]) |
Fit a model to the PDF. |
make_ecdf () |
Create the ECDF. |
make_pdf ([bins]) |
Create the PDF. |
run ([verbose, save_name, bins, do_fit, model]) |
Compute the PDF and ECDF. |
Attributes Documentation
bins
¶Bin centers.
model_params
¶Parameters of the fitted model.
model_stderrs
¶Standard errors of the fitted model. If using an MCMC, the 15th and 85th percentiles are returned.
normalization_type
¶Methods Documentation
corner_plot
(**kwargs)[source] [edit on github]¶Create a corner plot from the MCMC. Requires the ‘corner’ package.
Parameters: | kwargs : Passed to corner . |
---|
find_at_percentile
(percentiles)[source] [edit on github]¶Return the values at the given percentiles.
Parameters: | percentiles : float or np.ndarray
|
---|
find_percentile
(values)[source] [edit on github]¶Return the percentiles of given values from the data distribution.
Parameters: | values : float or np.ndarray
|
---|
fit_pdf
(model=<scipy.stats._continuous_distns.lognorm_gen object>, verbose=False, fit_type='mle', **kwargs)[source] [edit on github]¶Fit a model to the PDF. Use statsmodel’s generalized likelihood setup to get uncertainty estimates and such.
Parameters: | model : scipy.stats distribution, optional
verbose : bool, optional
fit_type : {‘mle’, ‘mcmc’}, optional
kwargs : Passed to |
---|
make_ecdf
()[source] [edit on github]¶Create the ECDF.
make_pdf
(bins=None)[source] [edit on github]¶Create the PDF.
Parameters: | bins : list or numpy.ndarray or int, optional
|
---|
run
(verbose=False, save_name=None, bins=None, do_fit=True, model=<scipy.stats._continuous_distns.lognorm_gen object>, **kwargs)[source] [edit on github]¶Compute the PDF and ECDF. Enabling verbose provides a summary plot.
Parameters: | verbose : bool, optional
save_name : str,optional
bins : list or numpy.ndarray or int, optional
do_fit : bool, optional
model : scipy.stats distribution, optional
kwargs : Passed to |
---|