# opencr.data.hydrogen

*module*

Atomic hydrogen data resolved in the principal quantum number ``n``.

* Levels: ``E_n = I_H (1 - 1/n^2)`` with the NIST ionization energy
  ``I_H = 13.598 eV`` (no fine structure, no Lamb shift), weights ``2 n^2``;
  the proton at ``I_H`` with weight 1.
* Spontaneous emission ``A(u -> l)`` from Johnson's (1972) absorption
  oscillator strengths (`plasmacoll.atomic_hydrogen.oscillator_strength`,
  within 1% of the exact ``n``-bundled values), with
  ``A = 2 pi e^2 nu^2 / (eps0 m_e c^3) (g_l / g_u) f_lu``.
* Radiative recombination ``e + H+ -> H(n) + hv`` from Janev, Reiter and Samm
  (2003), eq. (21) for ``n = 1`` (1s) and ``n = 2`` (2s plus 2p), and the
  Kramers formula eq. (22) for ``n >= 3``.
* Electron-impact excitation and ionization cross sections:
  `plasmacoll.atomic_hydrogen` (the same report, section 2.1).

The ``l`` sub-states are assumed statistically populated (``n``-bundled), which
holds when ``l``-mixing collisions are fast; see the model's assumptions.

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L1-L1)

## opencr.data.hydrogen.EINSTEIN_A_PROVENANCE

*attribute* · *module attribute*

```python
EINSTEIN_A_PROVENANCE = Provenance(JOHNSON_1972, units='s^-1', conversions=('A from f with A = 2 pi e^2 nu^2 / (eps0 m_e c^3) g_l / g_u f'), uncertainty=0.01, uncertainty_note="Johnson's f within about 1% of the exact n-bundled values", licence='published-fit')
```

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L75-L82)

## opencr.data.hydrogen.IMPACT_PROVENANCE

*attribute* · *module attribute*

```python
IMPACT_PROVENANCE = Provenance(Reference(JANEV_2003.citation, url=JANEV_2003.url, detail='section 2.1, eqs. (4)-(16)'), units='m^2 against eV (incident electron energy)', conversions=('1e-16 cm^2 -> 1e-20 m^2', 'tabulated by plasmacoll, linear interpolation'), validity=(Validity('energy', 0.0, 10000.0)), interpolation='linear between 241 points spaced logarithmically above threshold', extrapolation='the last value above 1e4 eV', uncertainty=0.2, uncertainty_note='10-20% from the ground state, 20-50% near threshold between excited states', licence='published-fit', notes="eq. (13a) misprints g2(1) = 0.0714; plasmacoll uses Johnson's 0.07014")
```

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L107-L123)

## opencr.data.hydrogen.JANEV_2003

*attribute* · *module attribute*

```python
JANEV_2003 = Reference('R. K. Janev, D. Reiter and U. Samm, Collision Processes in Low-Temperature Hydrogen Plasmas, Forschungszentrum Juelich report Juel-4105 (2003)', url='https://eirene.de/Documentation/report_4105.pdf')
```

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L55-L59)

## opencr.data.hydrogen.JOHNSON_1972

*attribute* · *module attribute*

```python
JOHNSON_1972 = Reference('L. C. Johnson, Approximations for collisional and radiative transition rates in atomic hydrogen, Astrophys. J. 174, 227 (1972)', doi='10.1086/151486')
```

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L60-L64)

## opencr.data.hydrogen.LEVELS_PROVENANCE

*attribute* · *module attribute*

```python
LEVELS_PROVENANCE = Provenance(Reference('NIST Atomic Spectra Database, ionization energy of H I', url='https://physics.nist.gov/asd'), retrieved='2026-10-27', units='eV', notes='E_n = I_H (1 - 1/n^2): no fine structure, no Lamb shift', licence='public-domain')
```

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L65-L74)

## opencr.data.hydrogen.RADIATIVE_RECOMBINATION_PROVENANCE

*attribute* · *module attribute*

```python
RADIATIVE_RECOMBINATION_PROVENANCE = Provenance(Reference(JANEV_2003.citation, url=JANEV_2003.url, detail='eqs. (21) and (22)'), units='m^3/s against eV', conversions=('1e-14 cm^3/s -> 1e-20 m^3/s'), validity=(Validity('electron_temperature', 0.01, 10000.0)), uncertainty=0.1, uncertainty_note="Kramers' formula without Gaunt factor for n >= 3", licence='published-fit')
```

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L83-L91)

## opencr.data.hydrogen.VRIENS_SMEETS_PROVENANCE

*attribute* · *module attribute*

```python
VRIENS_SMEETS_PROVENANCE = Provenance(Reference('L. Vriens and A. H. M. Smeets, Cross-section and rate formulas for electron-impact ionization, excitation, deexcitation, and total depopulation of excited atoms, Phys. Rev. A 22, 940 (1980)', doi='10.1103/PhysRevA.22.940', detail='eq. (17)'), units='m^3/s against eV', conversions=('1 cm^3/s -> 1e-6 m^3/s'), validity=(Validity('electron_temperature', 0.01, 10000.0)), uncertainty=0.2, uncertainty_note='about 20% for n >= 3; Maxwellian electrons only', licence='published-fit')
```

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L92-L106)

## opencr.data.hydrogen.einstein_a

*function*

```python
def einstein_a(upper: int, lower: int) -> float
```

Return the spontaneous emission rate ``A(upper -> lower)`` of H in s^-1.

**Numerics**

*einstein*

$$
A_{mn} = \frac{2\pi e^2\nu^2}{\varepsilon_0 m_e c^3}\,\frac{g_n}{g_m}\,f_{nm}, \qquad \nu = \frac{(E_m - E_n)\,e}{h}
$$

*oscillator*

$$
f_{nm} = \frac{32}{3\sqrt3\,\pi}\,\frac{n}{m^3 y^3}\,\big(g_0 + g_1/y + g_2/y^2\big), \qquad y = 1 - (n/m)^2
$$

Assumptions:

- Johnson's oscillator strengths and Gaunt coefficients (`plasmacoll.atomic_hydrogen`), within about 1% of the exact $n$-bundled values
- $\nu$ from the NIST-based state energies

References:

- [Johnson, Astrophys. J. 174, 227 (1972)](https://doi.org/10.1086/151486), eqs. (11)-(13)
- [Wiese and Fuhr, J. Phys. Chem. Ref. Data 38, 565 (2009)](https://doi.org/10.1063/1.3077727) (the tests)

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L267-L296)

## opencr.data.hydrogen.hydrogen_levels

*function*

```python
def hydrogen_levels(n_max: int, isotope: str = 'H') -> tuple[list[State], State]
```

Return the states H(n=1..n_max) and the bare nucleus.

**Parameters**

- `n_max` (`int`) — The highest principal quantum number.
- `isotope` (`str`) (default: `'H'`) — ``"H"`` or ``"D"``; the levels are the same (the reduced-mass shift of 0.03% is neglected).

**Returns**

- (`tuple[list[State], State]`) — The atom's levels, labelled ``"n=<n>"``, and the ion's state.

**Numerics**

*states*

$$
\mathrm{H}(n):\ E_n,\ g_n = 2n^2, \quad n = 1, \dots, n_{\max}; \qquad \mathrm{H}^+:\ E = I_H,\ g = 1
$$

Assumptions:

- $n$-bundled: the $l$ sub-states statistically populated
- `isotope` `D` renames the species with the same data (the 0.03% reduced-mass shift is neglected)

Built from:

- `opencr.data.hydrogen.level_energy`

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L235-L264)

## opencr.data.hydrogen.level_energy

*function*

```python
def level_energy(n: int) -> float
```

Return the energy of H(n) above H(1s) in eV.

**Numerics**

*level*

$$
E_n = I_H\left(1 - \frac{1}{n^2}\right), \qquad I_H = 13.598434599702\ \mathrm{eV}
$$

Assumptions:

- no fine structure, no Lamb shift; energies above H(1s)

References:

- [NIST Atomic Spectra Database](https://physics.nist.gov/asd)

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L220-L232)

## opencr.data.hydrogen.radiative_recombination

*function*

```python
def radiative_recombination(n: int, temperature: float | np.ndarray) -> np.ndarray
```

Return the rate coefficient of ``e + H+ -> H(n) + hv`` in m^3/s.

Eq. (21) of Janev, Reiter and Samm (2003) for ``n = 1`` and ``n = 2``
(2s plus 2p), the Kramers formula eq. (22) for ``n >= 3``.

**Parameters**

- `n` (`int`) — The principal quantum number of the captured level.
- `temperature` (`float | np.ndarray`) — ``kT_e`` in eV.

**Numerics**

*ground*

$$
\alpha_{nl} = 10^{-20} A_{nl}\sqrt{\frac{I_n}{\mathrm{Ry}}}\;\frac{\beta^{3/2}}{\beta + \chi_{nl}}\ \mathrm{m^3/s}, \qquad \beta = \frac{I_n}{T}, \quad (A, \chi)_{1s} = (3.92, 0.35),\ (A, \chi)_{2s} = (2.47, 0.12),\ (A, \chi)_{2p} = (6.22, 0.61)
$$

*kramers*

$$
\alpha_n = 5.201\times10^{-20}\,\beta^{3/2}\,e^{\beta}E_1(\beta)\ \mathrm{m^3/s}, \qquad n \ge 3
$$

Assumptions:

- $I_n = \mathrm{Ry}/n^2$ with $\mathrm{Ry} = 13.6$ eV; `rr:2` is the sum of 2s and 2p
- Kramers without Gaunt factor for $n \ge 3$; recorded range 0.01-$10^4$ eV, evaluated at any $T$

References:

- [Janev, Reiter and Samm, Jül-4105 (2003)](https://eirene.de/Documentation/report_4105.pdf), eqs. (21) and (22)

Built from:

- `opencr.data.hydrogen.scaled_exp1`

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L322-L359)

## opencr.data.hydrogen.scaled_exp1

*function*

```python
def scaled_exp1(x: np.ndarray) -> np.ndarray
```

Return ``exp(x) E_1(x)`` without overflow (an asymptotic series above x = 50).

**Numerics**

*scaled*

$$
e^{x}E_1(x)
$$

*asymptotic*

$$
e^{x}E_1(x) \approx \frac{1}{x}\left(1 - \frac{1}{x} + \frac{2}{x^2} - \frac{6}{x^3} + \frac{24}{x^4}\right), \quad x > 50
$$

Assumptions:

- SciPy's `exp1` up to $x = 50$; continuous to $10^{-6}$ at the switch

References:

- [Virtanen et al., Nat. Methods 17, 261 (2020)](https://doi.org/10.1038/s41592-019-0686-2) (`exp1`)

[View source](https://github.com/max-models/OpenCR/blob/devel/src/opencr/data/hydrogen.py#L299-L319)
