Skip to content

dataio.py API

bh_molecule.dataio

Functions

hash_params(d: dict) -> str

load_npz(path)

load_v00_wavelengths() -> pd.DataFrame

Load 11BH_v00.csv from package resources and convert to wavelengths (nm).

n_air(wl_nm: float | np.ndarray) -> float | np.ndarray

Refractive index of air (Science Chronology / 理科年表 formula).

Parameters:

Name Type Description Default
wl_nm float | ndarray

Wavelength in nanometers.

required

Returns:

Type Description
float | ndarray

Refractive index of air at the given wavelength.

save_npz(path, **arrays)

Data I/O utilities: loading wavelength tables, refractive index of air, and NPZ save/load.