Fix bug in GaussLaser and simplify interface#9
Merged
SebastianM-C merged 7 commits intomainfrom Mar 5, 2026
Merged
Conversation
The longitudinal fields had two bugs: - E[3] and B[3] multiplied by an extra exp(im*ω*t)*env, effectively squaring the temporal oscillation and envelope - B[3] used real E[1], E[2] instead of complex expressions ξx*E_g, ξy*E_g Extract E_g as a shared complex expression and use it directly in all field components, taking real() only at the final step. Verified against LaguerreGauss(p=0, m=0) and LaserTypes.GaussLaser. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Compare against LaserTypes.GaussLaser at random spacetime points - Cross-validate against LaguerreGauss(p=0, m=0) with matched envelope - Verify Gaussian radial profile exp(-r²/w₀²) at z=0 - Verify beam width scaling w₀/w(z) using LaserTypes reference - Check paraxial relations B₁=-E₂/c, B₂=E₁/c at off-axis points - Test circular polarization azimuthal invariance - Validate all derived parameters (ω, k, z_R, E₀, τ0) - Verify temporal envelope decay against LaserTypes Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
ChargedParticle now automatically discovers the reference frame from the external field via _find_ref_frame, which searches subsystems for the metric tensor and electron mass parameters. This eliminates the need to pass ref_frame separately and removes the constraint that the reference frame must have a specific name. Also updates FieldEvaluator, radiation models, and all tests accordingly. Adds ModelingToolkitBase as a direct dependency. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Replace hardcoded t₀ and z₀ values with proper @parameters so they are accessible via the symbolic interface. The T0 parameter is removed in favor of n_cycles, which defines t₀ = n_cycles × 2π/ω. Add description metadata to all parameters across GaussLaser, LaguerreGaussLaser, PlaneWave, and UniformField. Update tests to read t₀ directly from the system instead of computing it from T0. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Owner
Author
|
not sure why the runner gets killed... tests work locally and on 1.11, so it seems unrelated |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.