Skip to content

Binder

Getting Started

To get started with atomphys, you can install it with pip:

pip install atomphys
Alternatively, you can run any of these examples in binder without any installation simply by clicking the link at the top of the page.

To start with, import the Atom object, and use it to create a Cesium atom. By default, this will automatically populate with all of the states and transitions in the NIST Atomic Spectra Database.

from atomphys import Atom

Cs = Atom('Cs')
Cs
Ground State: 2S1/2
179 States
42 Transitions

States

You can then lookup states either by index (the states are energy ordered), or by searching by term symbol:

Cs(1)
State(6P1/2, 2P1/2: 0.1019 Ry)
Cs('P3/2')
State(6P3/2, 2P3/2: 0.1069 Ry)

You can access properties of a state like the energy or lifetime.

Cs('P1/2').energy
0.101863874556 Ry
Cs('P1/2').τ
3.49283967865875×10-8 s
Cs('P1/2').lifetime
3.49283967865875×10-8 s

By default atomphys uses atomic units. You can use pint to convert to units of your choice.

Cs('P1/2').τ.to('ns')
34.92839678658749 ns
(1 / Cs('P1/2').lifetime ).to('MHz')
28.629999999999995 MHz

Transitions

You can access transitions origination from a state,

Cs('S1/2').to('P1/2')
Transition(6S1/2, 2S1/2 <--> 6P1/2, 2P1/2 : λ=894.59 nm, Γ=2π×4.56 MHz)

as well as properties of that transition, such as wavelength, dipole matrix element, and saturation intensity

Cs('S1/2').to('P1/2').λ.to('nm')
894.5929600207925 nm
Cs('S1/2').to('P1/2').matrix_element.to('e a0')
4.498115119474812 a_0 e
Cs('S1/2').to('P1/2').Isat.to('mW/cm^2')
0.8318600537758194 mW/cm2
Back to top