Genus_Distance¶
- class turbustat.statistics.Genus_Distance(img1, img2, smoothing_radii=None, numpts=100, min_value=None, max_value=None, lowdens_percent=0, highdens_percent=100, genus_kwargs={}, genus2_kwargs=None)[source]¶
Bases:
object
Distance Metric for the Genus Statistic.
Note
Since the data need to be normalized for the distance metrics, there is no option to pass a pre-compute
Genus
statistic.- Parameters:
- img1numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice
2D image.
- img2numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice
2D image.
- smoothing_radiilist, optional
Kernel radii to smooth data to. See
Genus
.- numptsint, optional
Number of thresholds to calculate statistic at. See
Genus
.- min_value
Quantity
or float or list, optional Minimum value to use for Genus statistic. When a two-element list is given, the first item is used for
img1
and the second forimg2
. SeeGenus
.- max_value
Quantity
or float, optional Maximum value to use for Genus statistic. When a two-element list is given, the first item is used for
img1
and the second forimg2
. SeeGenus
.- lowdens_percentfloat, optional
Lowest percentile of the data to use for Genus statistic. When a two-element list is given, the first item is used for
img1
and the second forimg2
. SeeGenus
.- highdens_percentfloat, optional
Highest percentile of the data to use for Genus statistic. When a two-element list is given, the first item is used for
img1
and the second forimg2
. SeeGenus
.- genus_kwargsdict, optional
Dictionary passed to
run
.- genus2_kwargsNone or dict, optional
Dictionary passed to
run
forimg2
. WhenNone
is given, settings fromgenus_kwargs
are used forimg2
.
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, color1='b', color2='g', marker1='D', marker2='o')[source]¶
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:
- verbosebool, optional
Enables plotting.
- label1str, optional
Object or region name for img1
- label2str, optional
Object or region name for img2
- save_namestr,optional
Save the figure when a file name is given.