Papers
Topics
Authors
Recent
Search
2000 character limit reached

SPEX: Diverse Spectral Tools in Science

Updated 4 July 2026
  • SPEX is a polysemous term covering distinct spectral tools in astrophysics, condensed-matter physics, and computational fields, each with specialized methods.
  • In astrophysics, SPEX underpins high-resolution X-ray spectral modeling, atomic data expansion, and near-IR data analysis through instruments like the IRTF SpeX.
  • In condensed-matter theory and computing, SPEX facilitates first-principles electronic excitation calculations and explainable spectral processing for diverse applications.

SPEX is a polysemous research name applied to several unrelated scientific instruments, software packages, and algorithms. In astrophysics, it most commonly denotes the high-resolution X-ray spectral modeling and fitting package developed since the 1970s and publicly distributed since the 1990s, as well as the near-infrared IRTF spectrograph SpeX and derivative resources such as the SpeX Prism Library and SPLAT. In condensed-matter theory, SPEX denotes a full-potential many-body perturbation theory code for quasiparticle, electron-energy-loss, and spin-excitation calculations. In more recent computer-science literature, SPEX or SpEx has also been reused for methods in feature-interaction explanation, explainable clustering, verifiable execution, speaker extraction, and multispectral remote sensing (Plaa et al., 2019, Schindlmayr et al., 2011, Burgasser, 2014, Kang et al., 19 Feb 2025, Argov et al., 2 Nov 2025, Dallachiesa et al., 24 Mar 2025, Si et al., 7 Aug 2025).

1. Scope and nomenclature

The literature surveyed here includes the forms SPEX, SpeX, and SpEx. These forms do not denote a single unified project. Instead, they identify distinct systems whose only commonality is the reused name. The historically dominant usages are the X-ray astronomy package SPEX, the electronic-structure code SPEX, and the IRTF near-infrared spectrograph SpeX. Later usages appear largely in machine learning and signal processing, where the acronym is attached to methods that are unrelated to either astrophysical spectroscopy or many-body perturbation theory (Plaa et al., 2019, Schindlmayr et al., 2011, Burgasser, 2014, Xu et al., 2020, Kang et al., 19 Feb 2025, Argov et al., 2 Nov 2025).

This multiplicity matters bibliographically. Citations to SPEX in X-ray plasma modeling, for example, refer to a self-consistent atomic-data and spectral-fitting ecosystem, whereas citations to SPEX in solid-state physics refer to an all-electron FLAPW-based MBPT implementation. Citations to SpeX in observational astronomy typically refer either to the IRTF instrument itself or to data products derived from it, such as the SpeX Prism Library and the SpeX Prism Library Analysis Toolkit (Plaa et al., 2019, Schindlmayr et al., 2011, Burgasser et al., 2017, Burgasser, 2014).

2. SPEX as a high-resolution X-ray spectral modeling package

In X-ray astronomy, SPEX is a software package for modeling and fitting X-ray spectra. Its roots lie in in-house work that started in the 1970s with a code to model the solar X-ray spectrum, and it evolved over a few decades into a multi-purpose spectral fitting code; since the 1990s these efforts have been further developed in the public SPEX package. Its defining design choice is a self-consistent coupling of plasma models, shared atomic data, and common physical-process routines, in contrast to a platform model in which unrelated community models coexist with heterogeneous atomic inputs (Plaa et al., 2019).

The package contains models for optically thin plasmas in collisional ionization equilibrium, plasmas in photo-ionization equilibrium, and charge-exchange emission. All are backed by the same atomic database. The 2019 software overview describes the transition from SPEX version 2, with on the order of 5,000 lines, to version 3 with approximately 2 million lines, a change motivated by the dense line forests resolved by XMM-Newton/RGS, Chandra gratings, Hitomi, and forthcoming microcalorimeter missions such as XRISM and Athena (Plaa et al., 2019).

SPEX compares physical source models with observed counts through response convolution,

Ci=Ri(E)S(E)dE,C_i = \int R_i(E)\,S(E)\,dE,

where CiC_i is the predicted model count in detector channel ii, Ri(E)R_i(E) is the instrument response, and S(E)S(E) is the model photon spectrum. Because future redistribution matrices can approach about 4 GB4\ \mathrm{GB} in standard OGIP format, SPEX introduced new response file structures, optimal binning, matrix re-ordering, and OpenMP-enabled parallel convolution to keep fitting times practical (Plaa et al., 2019).

Implementation is primarily in Fortran 90 and targets UNIX-like systems, especially Linux and macOS. The package was historically distributed as statically compiled binaries, but since version 3.05.00 the source code has been available under GPLv3. A Docker image is available, all versions above 2.0 have been archived on Zenodo since 2018, and a Python wrapper has been under development alongside auxiliary tools such as pyspextools (Plaa et al., 2019).

3. Atomic-data expansion, cooling physics, and cluster forward modeling

The X-ray SPEX ecosystem has continued to expand beyond basic spectral fitting. One important strand is atomic-rate infrastructure. The level-resolved radiative recombination parameterization for H-like to Na-like ions from H through Zn provides compact analytic fits for roughly 3×1043\times 10^4 levels, with fitting accuracies better than 5%5\% for about 99%99\% of the levels considered. These data were designed specifically for incorporation into SPEX so that recombination matrices, cascades, and radiative recombination continua could be evaluated on the fly without excessive storage overhead (Mao et al., 2016).

A later update revised the radiative-loss function in the low-density, optically thin limit by updating collisional excitation, revising neutral hydrogen excitation data, and adding dielectronic recombination losses in the pion photoionized-plasma model. In that update, SPEXACT is described as containing about 4.2×1064.2\times 10^6 lines. The new cooling curve reduced longstanding discrepancies with Cloudy and APEC around CiC_i0, corrected H I cooling near CiC_i1 by a factor of about three, and introduced a new stable branch in the AGN2 photoionized-plasma stability curve at CiC_i2 and CiC_i3 (Štofanová et al., 2021).

A second strand is geometric forward modeling. The clus model, implemented within SPEX, uses spherically symmetric 3D radial profiles of density, temperature, abundance, turbulence, and inflow/outflow velocity to generate projected spectra or surface-brightness profiles for galaxy clusters, groups, and massive elliptical galaxies. It also incorporates a Monte Carlo treatment of resonant scattering for hundreds of X-ray transitions. Applications to NGC 4636 and clusters including A383, A2029, A1795, A262, and Perseus show that neither single-temperature, double-temperature, nor Gaussian differential-emission-measure models can generally reproduce the true projected emission-measure distribution. The model reproduces the observed iron-abundance drop in the inner-most few kiloparsecs of NGC 4636 and quantifies projection- and resonant-scattering-induced biases in inferred iron and temperature profiles for Chandra ACIS-S and XRISM Resolve-like data (Štofanová et al., 2024).

Taken together, these developments indicate that SPEX is not merely a fitting interface but an evolving plasma-physics environment whose accuracy depends on sustained maintenance of atomic structure, collisional and recombination rates, projection operators, and radiative-transfer corrections (Mao et al., 2016, Štofanová et al., 2021, Štofanová et al., 2024).

4. SPEX in first-principles electronic-excitation theory

In condensed-matter physics, SPEX is a first-principles software package for calculating quasiparticle and collective electronic excitations in solids using many-body perturbation theory on top of an all-electron, full-potential linearized augmented-plane-wave basis. It targets quasiparticle band structures and lifetimes from the GW self-energy, electron-energy-loss spectra including interband and intraband contributions and local-field effects, and spin-wave spectra via the dynamic transverse spin susceptibility (Schindlmayr et al., 2011).

Its methodology is defined by several numerical choices. The code eliminates LAPW linearization error in high-lying unoccupied states by adding higher energy derivatives as local orbitals; it represents products of wavefunctions in a mixed-product basis; it retains full frequency dependence in the dielectric matrix without plasmon-pole models; and it handles the Coulomb singularity at CiC_i4 exactly by separating divergent and regular parts and diagonalizing the Coulomb matrix. These design choices are intended to preserve quantitative accuracy for transition metals, rare-earth elements, complex oxides, surfaces, and defects, where localized CiC_i5 or CiC_i6 states and core–valence interactions are important (Schindlmayr et al., 2011).

The code begins from a DFT Kohn–Sham reference, constructs CiC_i7, the dielectric function CiC_i8, the screened Coulomb interaction CiC_i9, and then the GW self-energy ii0. For spin excitations it constructs the renormalized transverse susceptibility ii1, using a Wannier-basis truncation of the screened electron–hole interaction to make the two-particle problem tractable in itinerant ferromagnets (Schindlmayr et al., 2011).

Representative validation results include GW gaps for cubic SrTiOii2 in very good agreement with experiment, ferromagnetic Ni EELS spectra that reproduce the ii3 core onset when 3s and 3p contributions are included, and bcc Fe magnon dispersions that match inelastic neutron scattering data. A GW performance test on diamond supercells up to 128 atoms showed that a full quasiparticle band structure for the 128-atom cell could be computed in less than 1.5 days of CPU time on a standard single-processor workstation, with scaling between quadratic and cubic in the tested regime (Schindlmayr et al., 2011).

5. SpeX as an IRTF near-infrared spectrograph and data ecosystem

SpeX is also the near-infrared spectrograph on the NASA Infrared Telescope Facility. In the literature considered here, it appears in both low-resolution prism and cross-dispersed modes. The prism mode provides continuous near-infrared coverage over about ii4 at ii5, while the cross-dispersed modes provide broader ii6 coverage at about ii7. This combination made the instrument a workhorse for ultracool-dwarf classification, brown-dwarf atmosphere studies, extinction-curve measurements, asteroid spectroscopy, and time-domain studies of variable young stellar objects (Burgasser, 2014, Decleir et al., 2022).

One major derivative resource is the SpeX Prism Library, a uniform compilation of low-resolution ii8 prism spectra obtained over roughly a decade. The 2014 overview reports over 1900 spectra in total, including approximately 1350 ultracool dwarf spectra, with all spectra uniformly extracted and calibrated with SpeXtool. The library was assembled to support near-infrared classification of L and T dwarfs and has been used in over 100 publications (Burgasser, 2014).

A second major resource is the SpeX Prism Library Analysis Toolkit, SPLAT. As of April 2017, SPLAT contained approximately 2500 ultracool dwarf spectra and about 300 additional spectra of other sources, adding contextual metadata, theoretical atmosphere and evolutionary models, and a Python API centered on a Spectrum class. The toolkit supports index measurements, classification, spectrophotometry, model fitting with Metropolis–Hastings and emcee, synthetic photometry through more than 100 filters, and population synthesis, while integrating external catalog access through astroquery (Burgasser et al., 2017).

The instrument and its software pipeline also underpin later domain-specific libraries and analysis campaigns. This suggests that SpeX is best understood not only as a spectrograph but as the nucleus of a sustained near-infrared data-reduction and curation infrastructure (Burgasser, 2014, Burgasser et al., 2017).

6. Observational science enabled by SpeX

SpeX-based spectroscopy has supported a broad range of observational inferences. In asteroid spectroscopy, an analysis of two decades of SpeX/IRTF observations from SMASS and MITHNEOS used 628 spectra of 11 solar analogs to calibrate uncertainties in near-infrared reflectance slopes. Over ii9, the intrinsic Ri(E)R_i(E)0 uncertainty in spectral slope was Ri(E)R_i(E)1, and air-mass mismatch contributed a bias of about Ri(E)R_i(E)2 per Ri(E)R_i(E)3 air mass difference. No other observing conditions, including parallactic angle, seeing, or humidity, showed systematic slope changes at the Ri(E)R_i(E)4 level when using the standard Ri(E)R_i(E)5 slit (Marsset et al., 2020).

In interstellar-medium studies, SpeX cross-dispersed spectroscopy was used to measure 15 Milky Way near-infrared extinction curves from Ri(E)R_i(E)6 to Ri(E)R_i(E)7 with the pair method. The average diffuse extinction curve was well fit by a single power law,

Ri(E)R_i(E)8

with Ri(E)R_i(E)9. The study also detected strong S(E)S(E)0 water-ice absorption in two dense Taurus sightlines and derived a S(E)S(E)1 upper limit of S(E)S(E)2 for the average diffuse curve (Decleir et al., 2022).

SpeX has also been used for targeted system characterization. Cross-dispersed S(E)S(E)3 spectra of KIC 8462852 showed a continuum consistent, within approximately S(E)S(E)4 uncertainties, with a normal solar-abundance F1–F3 V photosphere; no accretion or outflow lines were detected, and no near-infrared excess was present at the epoch of observation. These data argued against large amounts of static, close-in obscuring material and against YSO-like behavior (Lisse et al., 2015). Long-baseline S(E)S(E)5 SpeX monitoring of RW Aur A separated five components: a stable S(E)S(E)6 photospheric continuum, variable hydrogen emission lines, hot CO gas, a variable S(E)S(E)7 thermal continuum with color temperatures from 1130 to 1650 K, and transient bifurcated Fe II, Si I, S I, and Sr I features in the jets, interpreted as evidence for destructive accretion of differentiated planetesimal material in an excited CTTS system (Lisse et al., 2022).

In ultracool-dwarf spectroscopy, SpeX SXD data at S(E)S(E)8 were used alongside FIRE spectra to measure gravity-sensitive FeH, VO, H-band continuum, and K I diagnostics for 57 objects of spectral type M5.5–L0. All four planet-hosting stars in that sample—TRAPPIST-1, SPECULOOS-2, SPECULOOS-3, and LHS 3154—showed intermediate-gravity signatures, but a volume-corrected logistic regression found no statistically significant association between gravity class and close-in planet occurrence. The same study found a significant anti-correlation between FeHS(E)S(E)9 and metallicity at 4 GB4\ \mathrm{GB}0 (Davoudi et al., 24 Jun 2025).

Finally, SpeX has been used as a calibration anchor in simple thermal modeling of near-Earth asteroids. A comparison of SpeX-based and NEOWISE-based simple-model results for six NEAs found that, among 53 NEOWISE dataset groupings, 32 were consistent with SpeX-derived solutions, 12 were inconsistent, and 9 yielded no fit. Inconsistencies were most common for fainter observations and more primitive compositions, particularly in W1, whereas W2-only fits were generally more reliable (Myers et al., 2024).

7. Reuse of the acronym in computing, signal processing, and remote sensing

Outside astronomy and condensed-matter physics, the name has been reused for several unrelated computational methods. In speech processing, SpEx is a multi-scale time-domain speaker extraction network that uses a speaker encoder, speech encoder, speaker extractor, and speech decoder to recover a target voice from a mixture given a reference utterance. On WSJ0-2mix-extr, the original SpEx reported relative improvements of 4 GB4\ \mathrm{GB}1, 4 GB4\ \mathrm{GB}2, and 4 GB4\ \mathrm{GB}3 over the best baseline in SDR, SI-SDR, and PESQ. Its successor SpEx+ made the system fully time-domain by tying two identical speech encoders, and reported 4 GB4\ \mathrm{GB}4 and 4 GB4\ \mathrm{GB}5 SDR improvements over the SpEx baseline for different- and same-gender mixtures, respectively (Xu et al., 2020, Ge et al., 2020).

In clustering, SpEx has been used for a spectral approach to explainable clustering by axis-aligned decision trees. The method operates either by fitting an explanation tree to a given reference clustering via a clique graph or by directly learning an explainable clustering from a 4 GB4\ \mathrm{GB}6-nearest-neighbor graph. It formulates split selection through normalized-cut objectives and connects earlier algorithms such as IMM, EMN, and CART to Trevisan’s non-uniform sparsest-cut framework (Argov et al., 2 Nov 2025).

In model interpretability, SPEX has also denoted a spectral explainer for interaction attributions in long-context LLMs. That method recovers sparse, low-degree Fourier coefficients on the Boolean hypercube through structured masking, sparse Walsh–Hadamard transforms, BCH-coded shifts, and iterative peeling. It is designed for inputs on the order of 4 GB4\ \mathrm{GB}7 features and reported up to about 4 GB4\ \mathrm{GB}8 better faithfulness than marginal attribution baselines on long-context tasks (Kang et al., 19 Feb 2025).

Other recent reuses include Statistical Proof of Execution (SPEX), a sampling-based verifiable-computing protocol that commits computational states in a Bloom filter and audits them statistically (Dallachiesa et al., 24 Mar 2025), and SPEX, a multimodal vision–LLM for instruction-driven land-cover extraction from multispectral remote-sensing imagery. The latter builds on a spectral-prompt instruction dataset, SPIE, and combines InternImage-L, multiscale feature aggregation, token context condensation, and a SAM-based decoder; across five public multispectral datasets it outperformed comparison methods on vegetation, building, and water extraction while also generating textual explanations (Si et al., 7 Aug 2025).

These later reuses do not share architecture or lineage with the astrophysical or condensed-matter systems. They indicate only that the acronym has become attractive across disciplines, especially where “spectral” methods, spectroscopy, or explanation are central design motifs.

Definition Search Book Streamline Icon: https://streamlinehq.com
References (19)

Topic to Video (Beta)

No one has generated a video about this topic yet.

Whiteboard

No one has generated a whiteboard explanation for this topic yet.

Follow Topic

Get notified by email when new papers are published related to SPEX.