Note
Go to the end to download the full example code.
Smith¶
Data for Main / H2 / Smith
import os
import matplotlib.pyplot as plt
import numpy as np
import refidx as ri
plt.style.use("../../doc/refidx.mplstyle")
db = ri.DataBase()
matid = ['main', 'H2', 'Smith']
mat = db.get_item(matid)
wr = mat.wavelength_range
lamb = np.linspace(*wr, 1000)
index = mat.get_index(lamb)
fig, ax = plt.subplots(2, 1, figsize=(3, 3))
ax[0].plot(lamb, index.real, "-", color="#aa0044")
ax[1].plot(lamb, index.imag, "-", color="#6886b3")
ax[0].set_xlabel(r"Wavelength ($\rm μm$)")
ax[1].set_xlabel(r"Wavelength ($\rm μm$)")
ax[0].set_ylabel(r"$n^{\prime}$")
ax[1].set_ylabel(r"$n^{\prime\prime}$")
plt.suptitle(mat)
mat.print_info(
html=True,
tmp_dir=os.path.join("..","..", "doc", "auto_gallery","H2"),
filename="out_main_H2_Smith.html",
)
Comments
Standard conditions: 0 °C (273.15 K), 760 torr (101.325 kPa).
References
P. L. Smith, M. C. E. Huber, W. H. Parkinson. Refractivities of H2, He, O2, CO, and Kr for 168≤λ≤288 nm Phys Rev. A 13, 199-203 (1976)
Total running time of the script: (0 minutes 0.357 seconds)
Estimated memory usage: 225 MB