PSpec_Distance¶
-
class
turbustat.statistics.PSpec_Distance(data1, data2, weights1=None, weights2=None, breaks=None, low_cut=None, high_cut=<Quantity 0.5 1 / pix>, pspec_kwargs={}, pspec2_kwargs=None)[source] [edit on github]¶ Bases:
objectDistance metric for the spatial power spectrum. A linear model with an interaction term is fit to the powerlaws. The distance is the t-statistic of the interaction term.
Parameters: - data1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice or
PowerSpectrum Data with an associated header. Or a
PowerSpectrumclass which may 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
PowerSpectrum See
data1.- weights1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice, optional
Weights to apply to data1
- weights2 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice, optional
Weights to apply to data2
- breaks :
Quantity, list or array, optional Specify where the break point is with appropriate units. If none is given, no break point will be used in the fit.
- low_cut :
Quantityor np.ndarray, optional The lower frequency fitting limit. An array with 2 elements can be passed to give separate lower limits for the datasets.
- high_cut :
Quantityor np.ndarray, optional The upper frequency fitting limit. See
low_cutabove. Defaults to 0.5.- pspec_kwargs : dict, optional
Passed to
radial_pspec_kwargsinrun.- pspec2_kwargs : dict or None, optional
Passed to
radial_pspec_kwargsinrunfordata2. WhenNoneis given, setting frompspec_kwargsare used fordata2.
Methods Summary
distance_metric(self[, verbose, xunit, …])Implements the distance metric for 2 Power Spectrum transforms. Methods Documentation
-
distance_metric(self, verbose=False, xunit=Unit("1 / pix"), save_name=None, plot_kwargs1={}, plot_kwargs2={}, use_wavenumber=False)[source] [edit on github]¶ Implements the distance metric for 2 Power Spectrum transforms. We fit the linear portion of the transform to represent the powerlaw A linear model with an interaction term is fit to the two powerlaws. The distance is the t-statistic of the interaction.
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_fitfordata1.- plot_kwargs2 : dict, optional
Pass kwargs to
plot_fitfordata2.- use_wavenumber : bool, optional
Plot the x-axis as the wavenumber rather than spatial frequency.
- data1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or spectral_cube.Projection or spectral_cube.Slice or