Hello Yuna,
Thanks for using the package!
I think both issues that you’re seeing is caused by mismatched units. The https://python-laser-cooling-physics.readthedocs.io/en/latest/examples/MOTs/06_real_atoms_3D_MOT.html example uses non-standard (for pylcp) length units: setting alpha = 1 and muB = 1 puts lengths in units of 1/(muB*B’/hbar*gamma). Those length units work fine for force profiles using the rate equations, but many pylcp functions expect distances to be specified in units of 1/k. I believe that the magnetic forces are calculated assuming distances are in 1/k, so setting alpha = 1, muB = 1 makes a gradient that shifts the transition by 1 linewidth per wavelength of distance (absurdly large!).
In scripts where I want magnetic forces (or to allow atoms to move), I always use 1/k distance units to avoid this kind of issue. Looking at your physical units version of the example, I think you’ll get reasonable results if you set muB = 1 in the Hamiltonian, use the cts value of muB in Hz/T (*1e-4 to convert to G), and then set alpha = BGcm*100*muB/(gamma/(2*np.pi)*k).
Let us know if you have any more questions (or if you’re still getting strange results).
Best,
Daniel
--
You received this message because you are subscribed to the Google Groups "pylcp" group.
To unsubscribe from this group and stop receiving emails from it, send an email to
pylcp+un...@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/pylcp/a021fdb5-ca30-475a-a0ef-fa6813477790n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
On Apr 8, 2024, at 4:33 PM, Sheng-wey Chiow <swc...@gmail.com> wrote:
Hi Daniel and all,
To follow up on the units issue: I tried to run and modify real_atoms_3D_MOT using different units. Initially it didn't work as expected. Here are some modifications I made to have consistent results irrespective of units. I only worked with rateeq.1. Modify line 378 of rateeq.py from Neq = np.compress(S <= self.svd_eps, VH, axis=0).T to Neq = np.compress(S/np.max(S) <= self.svd_eps, VH, axis=0).T, so that the script is robust against large values of gamma.2. Modify line 516 of hamiltonian.py from block.matrix to block.matrix,k=block.parameters['k'],gamma=block.parameters['gamma'], so that the rotated_hamiltonian inherits the correct gamma and k.
With these, the script can run with numerical values in SI units, or other units. Any feedback is welcome.
Cheers,Sheng-wey
To view this discussion on the web visit https://groups.google.com/d/msgid/pylcp/f61ef05f-a2f7-405b-8aba-fdad9cdf10c0n%40googlegroups.com.