Skip to content

Conversation

@YijunTangCambridge
Copy link

@YijunTangCambridge YijunTangCambridge commented Dec 1, 2025

Summary:
I have re-wrote elliptical treatment of gaussian beam and modified corresponding test, previous AtomECS does not implement a physical elliptical gaussian beam. The updated version will be using gaussian beam with two Rayleigh range according to two transverse direction perpendicular to beam propagation direction instead of one common Rayleigh range.

Changes:

  1. Input two waists to define an elliptical gaussian beam (previously one waist and a stretching factor).
  2. Modified calculations of elliptical gaussian beam intensity and intensity gradient, the calculations now include both Rayleigh ranges.
  3. Modified test modules by comparing RUST generated values with independent python calculations.

Details:
Forked a clean version of AtomECS, type “cargo test”, already produced 3 failed tests

  1. dipole::force::tests::test_apply_dipole_force_and_gradient_system
  2. laser::gaussian::tests::test_get_gaussian_beam_intensity_gradient
  3. laser::intensity_gradient::tests::test_sample_laser_intensity_gradient_again_system

I modified file laser/gaussian.rs, modify all the functions inside, now gaussianbeam is created by inputting

intersection: Vector3<f64>,
direction: Vector3<f64>,
power: f64,
w0_x: f64,           (1/e^2 radius)
w0_y: f64,           (1/e^2 radius)
rayleigh_range_x: f64,
rayleigh_range_y: f64,s

After modification following files need to be changed to adopt the updated definition of elliptical gaussian beam and make everything consisent.

  1. Laser_cooling/rate.rs
  2. Dipole/force.rs
  3. Integration_tests/rate_equation.rs
  4. Laser/gaussian.rs
  5. Laser/intensity.rs
  6. Laser/intensity_gradient.rs
  7. Laser_cooling/Doppler.rs
  8. Laser_cooling/force.rs
    Also 7 unit tests need to be modified.
  9. integration_tests::rate_equation::tests::single_beam_scattering_rates_v_detuning
  10. integration_tests::rate_equation::tests::single_beam_scattering_rates_v_intensity
  11. laser::gaussian::tests::test_get_gaussian_beam_intensity
  12. laser::gaussian::tests::test_get_gaussian_beam_intensity_gradient
  13. laser::intensity::tests::test_sample_laser_intensity_system
  14. laser::intensity_gradient::tests::test_sample_laser_intensity_gradient_again_system
  15. dipole::force::tests::test_apply_dipole_force_and_gradient_system
    Debug and modified unit test to suit correct elliptical treatment, cargo test is smoothly working, returning no error.
devlog

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.

1 participant