Skip to content

ARTS2D: make 2-D susceptibility consistent with 1-D and correct drift geometry #135

Description

@joglekara

Problem

The ARTS 2-D electron susceptibility is inconsistent with the 1-D implementation in two independent ways.

1. Imaginary sign

The 1-D path uses

chiEI = -jnp.pi / (klde**2) * 1j * df

at tsadar/core/physics/form_factor.py:316, while the 2-D helper returns +pi / klde^2 * dfe at line 631 and inserts it as +1j * chiEI at line 820.

For an isotropic Maxwellian, matched projections at normalized phase velocities 0.5, 1, and 2 give matching projected EDF and real principal-value susceptibility, but Im(chi_2D) / Im(chi_1D) is approximately -1 at all three points. The 1-D sign was intentionally corrected in Avi-authored commit 242e4ed0; the 2-D path was missed.

This sign bug is real but is not by itself the small-angle resonance fix: conjugating an electron-only epsilon leaves |epsilon|^2 unchanged.

2. Drift-dependent projection geometry

At form_factor.py:809-818, the 2-D path constructs (omega * k / k^2 - ud) / vTe, replaces the signed resonance coordinate by its magnitude, and derives beta from that drift-shifted vector using atan(y/x).

For longitudinal susceptibility, the projection direction should remain khat; drift enters the signed scalar resonance

xi = (omega / |k| - ue dot khat) / vTe

A drift component perpendicular to k must not rotate the Radon projection. atan(y/x) also has an undefined 0/0 origin and NaN gradients on an axis; use atan2 where an angle is required and define the zero-vector limit.

The current project docstring says beta is the k-vector angle, which conflicts with its caller. The Va and ud frame semantics also differ between the 1-D and 2-D paths.

Acceptance criteria

  • Benchmark 1-D and 2-D electron susceptibility against an analytic Maxwellian/Faddeeva reference over positive and negative phase velocities; real and imaginary parts use one documented Fourier/Landau convention and agree within discretization error.
  • For an isotropic zero-flow Maxwellian, 1-D and 2-D spectra agree within a documented tolerance.
  • Compute the projection direction from khat with atan2 and retain a signed xi.
  • Purely perpendicular drift leaves the projected susceptibility unchanged; parallel drift gives only the expected Doppler translation.
  • Add an analytic shifted anisotropic-Gaussian Radon test covering mean, variance, coordinate signs, axis-aligned k, xi=0, and finite gradients.
  • Document and test the Va/ud frame convention, including multi-ion cases, so 1-D and 2-D use the same Galilean transformation.

Related: #124.

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions