Package: positronium
python tools pertaining to positroniumPrerequisitesTested using Anaconda (Continuum Analytics) with Python 2.7 and 3.5.
Examples written using IPython 4.0.1 (python 3.5.1 kernel).Package dependencies:scipy, numpyIPython examples dependencies:matplotlibInstallationvia pip (recommended):pip install positroniumalternatively, try the development versiongit clone https://github.com/PositroniumSpectroscopy/positroniumand then runpython setup.py installAboutThis package is designed to collate useful bits of code relating to the
positronium atom (an electron bound to its antiparticle, the positron).
The functions are generally simple approximations that give roughly the
right answers, rather than rigorous quantum mechanical calculations.The package currently only contains a few very simple modules.constantsis intended to collect useful constants in SI units, including:constdescriptionm_Ps2 * mass_electronRydberg_PsRydberg value for Psa_PsBohr radius for Psdecay_pPsdecay rate of para-Ps (S=0)decay_oPsdecay rate of ortho-Ps (S=1)lifetime_pPslifetime of para-Ps (S=0)lifetime_oPslifetime of ortho-Ps (S=1)frequency_hfsfrequency of the ground-state hyperfine splittingenergy_hfsenergy interval of the ground-state hyperfine splittingfrequency_1s2sfrequency of the 1s2s transitionenergy_1s2senergy interval of the 1s2s transitionExample usage,>>>frompositronium.constantsimportlifetime_oPs,frequency_hfs>>>print("The mean lifetime of ortho-Ps is","%.1fns."%(lifetime_oPs*1e9))Themeanlifetimeofortho-Psis142.0ns.>>>print("The ground-state hyperfine splitting is","%.1fGHz."%(frequency_hfs*1e-9))Theground-statehyperfinesplittingis203.4GHz.Where appropriate constants are stored in a subclass of float called
MeasuredValue, which has a few extra attributes [uncertainty, unit,
source, url], for example>>>lifetime_oPs1.4203738423953184e-07>>>lifetime_oPs.uncertainty3.631431333889514e-11>>>print(lifetime_oPs.source)R.S.Vallery,P.W.Zitzewitz,andD.W.Gidley(2003)Phys.Rev.Lett.90,203402>>>lifetime_oPs.article()The final line opens a url to the source journal.Bohrcontains an adaptation of the Rydberg formula, which is used to
calculate the principle energy levels of positronium, or the interval
between two levels. The default unit is ‘eV’, however, this can be
changed using the keyword argument ‘unit’.For instance, the UV wavelength (in nm) needed to excite the Lyman-alpha
transition can be found by:>>>frompositroniumimportBohr>>>Bohr.energy(1,2,unit='nm')243.00454681357735This accepts numpy arrays for the initial (n1) and/ or final (n2) energy
level, e.g.,>>>importnumpyasnp>>>n1=np.arange(1,10)>>>np.array([n1,Bohr.energy(n1,unit='eV')]).Tarray([[1.,6.8028465],[2.,1.70071163],[3.,0.75587183],[4.,0.42517791],[5.,0.27211386],[6.,0.18896796],[7.,0.1388336],[8.,0.10629448],[9.,0.08398576]])PsThis package contains a class called Ps, which can be used to represent a
particular atomic state of positronium using the quantum numbersnprinciplelorbital angular momentummmagnetic quantum numberStotal spinJtotal angular momentumThis can be used to return estimates of, e.g., the energy
level,>>>frompositroniumimportPs>>>x1=Ps(n=2,l=1,S=1,J=2)>>>x1.energy(unit='eV')-1.7007156827724967which uses an equation described inRichard A. Ferrell (1951) Phys. Rev. 84, 858http://dx.doi.org/10.1103/PhysRev.84.858This includes fine structure but not radiative corrections.A representation of the state using Latex code can be made using,>>>x1.tex()'$2^{3}P_{2}$'For further examples see the IPython/ Jupyter notebooks,https://github.com/PositroniumSpectroscopy/positronium/tree/master/examples