cross_spectral_density

powspec.cross_spectral_density(img1, img2, res=1, bins=100, range=None, apod_size=None)[source]

Return the bin averaged cross power spectral density of two images

Parameters:
img1array_like or Quantity

the first (2D) image

img1array_like or Quantity

the second (2D) image

resfloat or Quantity, optional

the resolution elements of the two images

binsint or sequence of scalars or str, optional

If bins is an int, it defines the number of equal-width bins in the given range (10, by default). If bins is a sequence, it defines the bin edges, including the rightmost edge, allowing for non-uniform bin widths. (see histogram)

range(float, float) or str, optional

The lower and upper range of the bins. If not provided, range is simply (a.min(), a.max()). (see histogram). If range is a string, it defines the method used to calculate the bins, as defined by k_bin_edges.

Returns:
powspec_karray or Quantity

The value of the power spectrum, optionnaly with a units

bin_edgesarray of dtype float or Quantity

Return the bin edges (length(hist)+1).

Notes

If img1 and/or img2 as a unit of Jy/beam and res is in arcsec, the resulting unit is Jy**2 / beam**2 arcsec**2, by dividing the result per the square of the beam area (in say arcsec**2 / beam), one obtain Jy**2 / arcsec**2

Both images should share the same resolution element res and the same shape

If one image has unit, the other one should also provide units.