GenusDistance

class turbustat.statistics.GenusDistance(img1, img2, smoothing_radii=None, fiducial_model=None)[source] [edit on github]

Bases: object

Distance Metric for the Genus Statistic.

Parameters:

img1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject

2D image.

img2 : numpy.ndarray or astropy.io.fits.PrimaryHDU or spectral_cube.LowerDimensionalObject

2D image.

smoothing_radii : list, optional

Kernel radii to smooth data to.

fiducial_model : Genus

Computed Genus object. Use to avoid recomputing.

Methods Summary

distance_metric([verbose, label1, label2, ...]) Data is centered and normalized (via normalize).

Methods Documentation

distance_metric(verbose=False, label1=None, label2=None, save_name=None)[source] [edit on github]

Data is centered and normalized (via normalize). The distance is the difference between cubic splines of the curves.

All values are normalized by the area of the image they were calculated from.

Parameters:

verbose : bool, optional

Enables plotting.

label1 : str, optional

Object or region name for img1

label2 : str, optional

Object or region name for img2

save_name : str,optional

Save the figure when a file name is given.