Bispectrum_Distance¶
-
class
turbustat.statistics.
Bispectrum_Distance
(data1, data2, stat_kwargs={})[source] [edit on github]¶ Bases:
object
Calculate the distance between two images based on their bicoherence. The distance is the L2 norm between the bicoherence surfaces.
Parameters: - data1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice or
Bispectrum
Contains the data and header of the image. Or a
Bispectrum
class may be given which can be pre-computed.- data2 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice or
Bispectrum
Contains the data and header of the second image. Or a
Bispectrum
class may be given which can be pre-computed.- stat_kwargs : dict, optional
Passed to
run
.
Attributes Summary
mean_distance
Absolute difference between the mean bicoherence. surface_distance
L2 distance between the bicoherence surfaces. Methods Summary
distance_metric
(self[, verbose, label1, …])verbose : bool, optional Attributes Documentation
-
mean_distance
¶ Absolute difference between the mean bicoherence.
-
surface_distance
¶ L2 distance between the bicoherence surfaces.
Methods Documentation
-
distance_metric
(self, verbose=False, label1=None, label2=None, save_name=None, cmap='viridis')[source] [edit on github]¶ - verbose : bool, optional
- Enable plotting.
- label1 : str, optional
- Object or region name for data1
- label2 : str, optional
- Object or region name for data2
- save_name : str,optional
- Save the figure when a file name is given.
- cmap : str, optional
- Colormap to show the bicoherence surfaces.
- data1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice or