healpix_analyse.powerspectra_lonlat#

Attributes#

Functions#

powerspectra_lonlat(lon, lat, data[, dx, cross, ...])

Compute the isotropic 1D power spectrum of a field sampled on an

Module Contents#

healpix_analyse.powerspectra_lonlat.ArrayLike#
healpix_analyse.powerspectra_lonlat.powerspectra_lonlat(lon: ArrayLike, lat: ArrayLike, data: ArrayLike, dx: float = 1.0, cross: ArrayLike | None = None, ellipsoid: str = 'sphere', plot_2D_fft=False, weights: numpy.ndarray = None)[source]#

Compute the isotropic 1D power spectrum of a field sampled on an iso-latitude lon/lat grid (e.g. GRIB-like grid), without using any HEALPix-specific concepts.

Parameters:
  • lon (array-like, shape [N]) – Longitudes of the samples.

  • lat (array-like, shape [N]) – Latitudes of the samples. The sampling is assumed to form iso-latitude rings.

  • data (array-like, shape [N]) – Field values at (lon, lat).

  • dx (float, default 1.0) – Effective sampling step used to label Fourier frequencies. Keep the same convention as in your current powerspectra.

  • cross (array-like, optional) – Second field for cross-spectrum.

  • ellipsoid ({"sphere", "WGS84"}, default "sphere") – Kept for compatibility with AlmTransform.

Returns:

  • f_centers (ndarray) – Radial spatial frequencies.

  • Pk (ndarray) – Azimuthally averaged 1D power spectrum.