turbustat.statistics.
StatMoments_Distance
(image1, image2, radius=5, weights1=None, weights2=None, nbins=None, periodic1=False, periodic2=False, fiducial_model=None)[source] [edit on github]¶Bases: object
Compute the distance between two images based on their moments. The distance is calculated for the skewness and kurtosis. The distance values for each for computed using the Hellinger Distance (default), or the Kullback-Leidler Divergence.
Unlike the other distance classes in TurbuStat, the computation of the histograms needed for the distance metric has been split into its own method. However, the change is fairly transparent, since it is called within distance_metric.
Parameters: | image1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject
image2 : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject
radius : int, optional
weights1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject
weights2 : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject
nbins : int, optional
periodic1 : bool, optional
periodic2 : bool, optional
fiducial_model : StatMoments
|
---|
Methods Summary
create_common_histograms ([nbins]) |
Calculate the histograms using a common set of bins. |
distance_metric ([metric, verbose, nbins, ...]) |
Compute the distance. |
Methods Documentation
create_common_histograms
(nbins=None)[source] [edit on github]¶Calculate the histograms using a common set of bins. Only histograms of the kurtosis and skewness are calculated, since only they are used in the distance metric.
Parameters: | nbins : int, optional
|
---|
distance_metric
(metric='Hellinger', verbose=False, nbins=None, label1=None, label2=None, save_name=None)[source] [edit on github]¶Compute the distance.
Parameters: | metric : ‘Hellinger’ (default) or “KL Divergence”, optional
verbose : bool, optional
nbins : int, optional
label1 : str, optional
label2 : str, optional
save_name : str,optional
|
---|