DeltaVariance_Distance¶
-
class
turbustat.statistics.DeltaVariance_Distance(dataset1, dataset2, weights1=None, weights2=None, diam_ratio=1.5, lags=None, use_common_lags=True, delvar_kwargs={}, delvar2_kwargs=None)[source] [edit on github]¶ Bases:
objectCompares 2 datasets using delta-variance. The distance between them is given by the Euclidean distance between the curves weighted by the bootstrapped errors.
Note
When passing a computed
DeltaVarianceclass fordataset1ordataset2, it may be necessary to recompute the delta-variance ifuse_common_lags=Trueand the existing lags do not match the common lags.Parameters: - dataset1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice or
DeltaVarianceclass Contains the data and header for one dataset. Or pass a
DeltaVarianceclass that may be pre-computed.- dataset2 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice or
DeltaVarianceclass See
dataset1above.- weights1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice
Weights for dataset1.
- weights2 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice
See above.
- diam_ratio : float, optional
The ratio between the kernel sizes.
- lags : numpy.ndarray or list, optional
The pixel scales to compute the delta-variance at.
- lags2 : numpy.ndarray or list, optional
The pixel scales for the delta-variance of
dataset2. Ignored ifuse_common_lags=True.- use_common_lags : bool, optional
Use a set of common lags that have the same angular sizes for both datasets. This is required for
DeltaVariance_Distance.curve_distancemetric.- delvar_kwargs : dict, optional
Pass kwargs to
run.- delvar2_kwargs : dict, optional
Pass kwargs to
runfordataset2. WhenNoneis given, the kwargs indelvar_kwargsare used for both datasets.
Attributes Summary
curve_distanceThe L2 norm between the delta-variance curves. slope_distanceThe t-statistic of the difference in the delta-variance slopes. Methods Summary
distance_metric(self[, verbose, xunit, …])Applies the Euclidean distance to the delta-variance curves. Attributes Documentation
-
curve_distance¶ The L2 norm between the delta-variance curves.
-
slope_distance¶ The t-statistic of the difference in the delta-variance slopes.
Methods Documentation
-
distance_metric(self, verbose=False, xunit=Unit("pix"), save_name=None, plot_kwargs1={}, plot_kwargs2={})[source] [edit on github]¶ Applies the Euclidean distance to the delta-variance curves.
Parameters: - verbose : bool, optional
Enables plotting.
- xunit :
Unit, optional Unit of the x-axis in the plot in pixel, angular, or physical units.
- save_name : str, optional
Name of the save file. Enables saving the figure.
- plot_kwargs1 : dict, optional
Pass kwargs to
plot_fitfordataset1.- plot_kwargs2 : dict, optional
Pass kwargs to
plot_fitfordataset2.
- dataset1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice or