PCA_Distance

class turbustat.statistics.PCA_Distance(cube1, cube2, n_eigs=50, fiducial_model=None, mean_sub=True)[source] [edit on github]

Bases: object

Compare two data cubes based on the eigenvalues of the PCA decomposition. The distance is the Euclidean distance between the eigenvalues.

Parameters:

cube1 : numpy.ndarray or astropy.io.fits.PrimaryHDU or SpectralCube

Data cube.

cube2 : numpy.ndarray or astropy.io.fits.PrimaryHDU or SpectralCube

Data cube.

n_eigs : int

Number of eigenvalues to compute.

fiducial_model : PCA

Computed PCA object. Use to avoid recomputing.

mean_sub : bool, optional

Subtracts the mean before computing the covariance matrix. Not subtracting the mean is done in the original Heyer & Brunt works.

Methods Summary

distance_metric([verbose, label1, label2, ...]) Computes the distance between the cubes.

Methods Documentation

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

Computes the distance between the cubes.

Parameters:

verbose : bool, optional

Enables plotting.

label1 : str, optional

Object or region name for cube1

label2 : str, optional

Object or region name for cube2

save_name : str, optional

Save the figure when a file name is given.