PETAL2D#

Polar Expansion Toolkit for Atomic Orbitals and Localized Fields in 2D

PETAL2D is a lightweight, general-purpose toolkit for decomposing and projecting localized two-dimensional scalar fields onto polar angular harmonics, the natural circular-harmonic basis for angular structure in 2D:

\[ f(r,\theta)=\sum_{m\in\mathbb Z}\rho_m(r)e^{im\theta}. \]

PETAL2D accepts either analytical callables or data sampled on a uniform Cartesian grid. It preserves the radial profiles \(\rho_m(r)\), ranks angular channels by their integrated spectral weight, and can construct a controlled adaptive reconstruction from the smallest retained set that satisfies a requested weighted-\(L^2\) error.

Start here

Install PETAL2D, decompose your first field, inspect the spectrum, and reconstruct it.

Getting started
User guide

Learn the input conventions, parameters, diagnostics, numerical behavior, and recommended workflow.

User guide
API reference

Detailed documentation for the public class, methods, parameters, and returned quantities.

API reference
Guided examples

Move from elementary angular harmonics to controlled compression, sampled data, real orbitals, symmetry, and centering.

Guided examples
Validation and benchmarks

See how interpolation, radial quadrature, angular sampling, runtime, and memory behave in controlled tests.

Validation and benchmarks
Theory and full proofs

Derive the expansion, Parseval identities, error certificate, real-field pairing, symmetry rules, sampling limits, and cutoff diagnostics.

Theory

What PETAL2D is for#

PETAL2D is useful whenever a localized real or complex 2D scalar field has meaningful angular structure about a chosen center. Typical applications include atomic-orbital-like wavefunctions, Wannier and other localized crystal orbitals, impurity or defect states, charge-density anisotropies, complex order parameters and vortices, excitonic relative-coordinate wavefunctions, localized photonic or phononic modes, and angular descriptors of scientific images or simulation fields.

The same decomposition is also useful as a compact angular basis in problems with approximate rotational structure: for example, diagnosing local \(C_n\) selection rules, separating symmetry-compatible angular channels, constructing reduced descriptions of localized PDE eigenmodes, or identifying the dominant angular content of a field before a problem-specific multipole or symmetry analysis.

PETAL2D does not replace a Cartesian FFT, a 3D spherical-harmonic expansion, a vector or tensor harmonic decomposition, or a full crystallographic point-group analysis. See Scope and limitations for the package scope.

Release archive#

PETAL2D 0.1.0 is archived on Zenodo with DOI 10.5281/zenodo.22715741.