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]¶
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:
- dataset1numpy.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.- dataset2numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice or
DeltaVarianceclass See
dataset1above.- weights1numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice
Weights for dataset1.
- weights2numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice
See above.
- diam_ratiofloat, optional
The ratio between the kernel sizes.
- lagsnumpy.ndarray or list, optional
The pixel scales to compute the delta-variance at.
- lags2numpy.ndarray or list, optional
The pixel scales for the delta-variance of
dataset2. Ignored ifuse_common_lags=True.- use_common_lagsbool, 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_kwargsdict, optional
Pass kwargs to
run.- delvar2_kwargsdict, optional
Pass kwargs to
runfordataset2. WhenNoneis given, the kwargs indelvar_kwargsare used for both datasets.
- dataset1numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice or
Attributes Summary
The L2 norm between the delta-variance curves.
The t-statistic of the difference in the delta-variance slopes.
Methods Summary
distance_metric([verbose, xunit, save_name, ...])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(verbose=False, xunit=Unit('pix'), save_name=None, plot_kwargs1={}, plot_kwargs2={})[source]¶
Applies the Euclidean distance to the delta-variance curves.
- Parameters:
- verbosebool, optional
Enables plotting.
- xunit
Unit, optional Unit of the x-axis in the plot in pixel, angular, or physical units.
- save_namestr, optional
Name of the save file. Enables saving the figure.
- plot_kwargs1dict, optional
Pass kwargs to
plot_fitfordataset1.- plot_kwargs2dict, optional
Pass kwargs to
plot_fitfordataset2.