PySME documentation#
Version: 1.2.0
PySME v1.2: substantially faster spectral synthesis
PySME v1.2 delivers a broad performance overhaul of spectral synthesis, with synthesis speed-ups of roughly 20–40× for representative workflows. Existing synthesis scripts generally require no changes, and the release also includes several numerical-correctness improvements. See PySME v1.2 for an overview of what the release means for users.
NLTE correctness notice: v0.4.151–v1.1.0
PySME versions from v0.4.151 through v1.1.0 can assign NLTE departure coefficients to the wrong spectral transitions when SMElib discards transitions with unsupported ionization stages. These releases are no longer recommended for scientific NLTE synthesis. Upgrade to PySME v1.1.1 or later and rerun affected NLTE calculations. LTE synthesis is not affected by this specific issue. See NLTE grids for details.
More than two decades ago Valenti & Piskunov (1996) developed SME - Spectroscopy Made Easy, a high-precision stellar-spectra synthesis/analysis engine that has powered hundreds of studies. PySME is its modern Python front-end: a wrapper around the original C++/Fortran core that lets you (1) compute accurate, high-resolution synthetic spectra from a linelist + model atmosphere, (2) invert observed spectra to derive stellar parameters, and (3) explore NLTE corrections — all from an interactive notebook or scripted pipeline. The same capabilities make PySME invaluable for exoplanet work, where characterising the host star is essential for understanding its planets.
Key features
Plane-parallel and spherical radiative-transfer engine
High-performance adaptive synthesis for wide and line-rich spectra
LTE & 1-D NLTE line formation with pre-computed grids
Automatic \(\chi^2\) fitting for \(T_\mathrm{eff}\), \(\log{g}\), \(v_\mathrm{mic}\), [X/Fe] …
Seamless use of ATLAS and MARCS model atmospheres and VALD line lists
Installation
Set up PySME and verify your code before synthesizing.
Go to installationGetting started
Run the first spectrum and first fit with a minimal, beginner-friendly path.
Open getting startedAdvanced usage
Learn core usage and structure details for deeper and more controlled use.
To advanced usageCitation#
Jian et al. (2026) (v0.4.168 onward)
Indices and tables#
Quick links
- GitHub repository:
- Issue tracker: