SCF_Distance

class turbustat.statistics.SCF_Distance(cube1, cube2, size=11, boundary='continuous', show_progress=True)[source]

Bases: object

Calculates the distance between two data cubes based on their SCF surfaces. The distance is the L2 norm between the surfaces. We weight the surface by 1/r^2 where r is the distance from the centre.

Note

When a pre-computed SCF class is given for cube1 or cube2, it needs to have the same set of lags between the cubes, defined by as the angular scales based on the FITS header. If the lags are not equivalent, the SCF will be re-computed with new lags.

Parameters:
cube1numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or SpectralCube or SCF

Data cube. Or a SCF class can be passed which may be pre-computed.

cube2numpy.ndarray or astropy.io.fits.PrimaryHDU or astropy.io.fits.ImageHDU or SpectralCube or SCF

Data cube. Or a SCF class can be passed which may be pre-computed.

sizeint, optional

Maximum size roll, in pixels, over which SCF will be calculated. If the angular scale is different between the data cubes, the lags are scaled to have the same angular scales.

boundary{“continuous”, “cut”}

Treat the boundary as continuous (wrap-around) or cut values beyond the edge (i.e., for most observational data). A two element list can also be passed for treating the boundaries differently between the given cubes.

Methods Summary

distance_metric([weighted, verbose, ...])

Compute the distance between the surfaces.

Methods Documentation

distance_metric(weighted=True, verbose=False, plot_kwargs1={'color': 'b', 'label': '1', 'marker': 'D'}, plot_kwargs2={'color': 'g', 'label': '2', 'marker': 'o'}, xunit=Unit('pix'), save_name=None)[source]

Compute the distance between the surfaces.

Parameters:
weightedbool, optional

Sets whether to apply the 1/r weighting to the distance.

verbosebool, optional

Enables plotting.

plot_kwargs1dict, optional

Pass kwargs to plot for cube1.

plot_kwargs2dict, optional

Pass kwargs to plot for cube2.

xunitUnit, optional

Unit of the x-axis in the plot in pixel, angular, or physical units.

save_namestr,optional

Save the figure when a file name is given.