Skip to content

Add R1 light-current lensing operators - #2

Open
gpartin wants to merge 4 commits into
mainfrom
codex/r1-light-current-lensing-operators
Open

gpartin wants to merge 4 commits into
mainfrom
codex/r1-light-current-lensing-operators

Conversation

@gpartin

@gpartin gpartin commented Jul 6, 2026

Copy link
Copy Markdown
Owner

Summary

  • Adds package-native 19-point spectral/equilibrium helpers for chi lens setup.
  • Adds R1 light-current packet, vacuum-subtracted potential, acceleration, and leapfrog step helpers.
  • Adds Noether spatial-current readouts used by the lensing reproduction pack.
  • Bumps lfm-physics to 1.4.3 and updates the stale pre-commit mypy hook pin.

Validation

  • pre-commit run on changed files
  • python -m pytest -m "not slow" --timeout=120 -q
  • python -m build
  • C:\Papers.venv\Scripts\python.exe -X utf8 -u C:\Papers\paper_experiments\lfm_light_chi_coupling_probe\run_full_r1_complex_probe.py

Notes

The v1.4.2 tag already existed on GitHub and points at an older 27-point stencil commit, while PyPI still has 1.4.1 as latest. This release therefore uses v1.4.3.

Copilot AI review requested due to automatic review settings July 6, 2026 10:03

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Adds new Level-1 “R1 light-current lensing” operators and accompanying analysis/initial-condition helpers, alongside 19-point-stencil-consistent Poisson/equilibrium utilities. This extends lfm’s package-native toolset for lensing reproduction workflows while keeping the numerical operators consistent with the existing 19-pt evolution stencil.

Changes:

  • Add a 19-point-stencil spectral symbol (eigenvalue_19pt) plus FFT Poisson/equilibrium helpers consistent with laplacian_19pt.
  • Add R1 light packet initialization + vacuum-subtracted potential + acceleration + leapfrog step helpers.
  • Add spatial Noether current readouts (raw and positive-clipped), update exports, tests, and bump version to 1.4.3.

Reviewed changes

Copilot reviewed 15 out of 15 changed files in this pull request and generated no comments.

Show a summary per file
File Description
tests/test_stencils.py Adds a Fourier-mode consistency test for eigenvalue_19pt vs laplacian_19pt.
tests/test_physics_modules.py Adds tests for spatial Noether current and positive-clipped current.
tests/test_fields.py Adds tests for 19-pt Poisson roundtrip, 19-pt chi equilibrium, and R1 light helpers; updates public import checks.
pyproject.toml Bumps package version to 1.4.3.
lfm/fields/light.py Implements planar R1 packet constructor, vacuum-subtracted potential, acceleration, and leapfrog step.
lfm/fields/equilibrium.py Implements poisson_solve_fft_19pt, equilibrate_chi_19pt, and equilibrate_from_fields_19pt; refines dtype handling in multicolor path.
lfm/fields/init.py Re-exports new equilibrium + light helpers and updates __all__.
lfm/experiment/collision.py Minor numeric cleanup to ensure eigenvalue is a Python float.
lfm/core/stencils.py Adds eigenvalue_19pt matching the 19-point Laplacian stencil.
lfm/core/init.py Re-exports eigenvalue_19pt and laplacian_19pt from lfm.core.
lfm/analysis/phase.py Adds spatial Noether current helpers.
lfm/analysis/init.py Re-exports Noether current helpers.
lfm/init.py Bumps __version__ to 1.4.3 and re-exports new helpers at top-level.
CHANGELOG.md Adds 1.4.3 changelog entry documenting newly added helpers.
.pre-commit-config.yaml Updates the pinned mypy mirror revision.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

@gpartin
gpartin force-pushed the codex/r1-light-current-lensing-operators branch from ba00652 to 59547bd Compare July 6, 2026 17:34
@gpartin
gpartin force-pushed the codex/r1-light-current-lensing-operators branch from 59547bd to 708bc5d Compare July 6, 2026 17:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants