PyLCP example error

78 views
Skip to first unread message

Malte Schwarz

unread,
May 8, 2023, 12:21:23 PM5/8/23
to pylcp
Hi,

I noticed that there's a mistake on the example for real atoms (https://python-laser-cooling-physics.readthedocs.io/en/latest/examples/MOTs/06_real_atoms_3D_MOT.html). The plotting code and the picture for 87Rb seem to be the 7Li example and not adapted for 87Rb. This is the code that I used to fix it:
fig, ax = plt.subplots(2, 1, figsize=(1.5*3.25, 3*2.75))
ax[0].imshow(FzRb_D2, origin='lower',
                extent=(np.amin(x)-dx/2, np.amax(x)+dx/2,
                        np.amin(v)-dv/2, np.amax(v)+dv/2),
                aspect='auto')

ax[1].plot(X[int(X.shape[0]/2), :],
              FzRb_D2[int(X.shape[0]/2), :], label='$^{87}$Rb')


ax[1].legend(fontsize=8)

# [ax[ii].yaxis.set_ticklabels('') for ii in range(2)]
# [ax[ii].xaxis.set_ticklabels('') for ii in range(2)]

ax[0].set_ylabel('$v/(\Gamma/k)$')
ax[1].set_ylabel('$f/(\hbar k \Gamma)$')
ax[1].set_xlabel('$x/\mu_B B\'/\hbar\Gamma$')

In addition, is it true that in the PyLCP paper in equation (24) there should be minus signs in front of both µB terms instead of a plus sign on he lower right entry?

Best,
Malte

Eckel, Stephen P. (Fed)

unread,
May 18, 2023, 11:31:23 AM5/18/23
to Malte Schwarz, pylcp
Hello Malte,

Sorry for the delayed reply.

Thank you for finding the error in the example code.  I’ve added an issue to GitHub and we will fix it in the next release.

Also, you are correct that the H_e + \mu_e\cdot B should in fact be  H_e - \mu_e\cdot B.  It is coded as such within pylcp; I’m not exactly sure how that typo slipped past us during proofreading.

Thanks again for finding these issues!

-Steve

--
Dr. Stephen Eckel
Physicist
Sensor Sciences Division
Thermodynamic Metrology Group
100 Bureau Drive, Stop 8364
Gaithersburg, MD 20899-8364
(301) 975-8571

--
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/05fc27f0-11ec-4f35-a3e7-b5192a032588n%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply all
Reply to author
Forward
0 new messages