Starting in the early seventies (Mewe 1972) Rolf Mewe and his colleagues of the Space Research Laboratory in Utrecht started developing a spectral code for the X-ray emission of optically thin plasmas. A milestone was reached in 1985 and 1986, when two papers describing the line emission (Mewe et al. 1985) and continuum emission (Mewe et al. 1986) were published. This spectral code, often abbreviated as the Mewe-Gronenschild code, together with the Raymond & Smith code (1977) served for many years as the basis for many X-ray spectroscopic papers.
At the beginning of the eighties the code was extended with non-equilibrium ionization balance calculations (Gronenschild & Mewe 1982), and motivated by the work on supernova remnants done in Leiden by Fred Jansen and Jelle Kaastra vastly improved. The need for a faster code in order to be able to do spectral fitting to these non-equilibrium spectra of supernova remnants motivated us to improve the performance of the code. Then in 1992 an update of in particular the continuum calculation appeared, and this updated and faster computer code was implemented at HEASARC in the XSPEC package, at which time it was baptized as meka code, after the two main authors of this version, Mewe and Kaastra.
Around the same time we started the SPEX project, with the intention to improve, update and extend also the line emission part of the code. In addition we intended to make it more useful by having spectral simulation and fitting options attached to it, as well as more illustrative graphical and tabular output from the program, which helps to understand the physics of the sources being studied. Also different extensions like hydrodynamical models for supernova remnants, and differential emission measure analysis techniques were foreseen.
In 1994 the first version of SPEX became public, with the re-written meka code as working horse in the core of the software package. A year before the ASCA satellite had been launched, and in one of the first X-ray spectra of a cluster of galaxies, the Centaurus clusters, the observed spectrum did not match neither the predicted meka calculations nor the results of other codes like the Raymond & Smith code (Fabian et al 1994). In particular the Fe-L 4–2 to 3–2 blend ratio did not match the observations. Around the same time, Duane Liedahl was able to produce better results for the Fe- L complex using the HULLAC atomic code, and by joining forces an update of the meka code, now named mekal, after the three authors, was released (Mewe, Kaastra & Liedahl 1995). This code was both included in the SPEX package as well as a model in the XSPEC package. Apart form the update and extension of the iron L complex, it also contained an improvement of the 300–2000 °A band, triggered by the EUVE spectra of stellar coronae, an update for the Fe VIII to Fe XVI ions, plus addition of DR satellites for Mg XI. Also the ionization balance for iron was updated using the results of Arnaud & Raymond (1992).
Already around 1996 we started developing version 2.0 of the code, with a transition from olf fortran77 compilers to modern fortran90, allowing much more flexibility using dynamical memory, modules etc. Also the original menu-driven structure was replaced by a command structure. Stimulated by the availability of high-resolution spectra taken by Chandra and XMM-Nwton the code was gradually extended and improved, although the availability of these new data also slowed down the development due to manpower limitations.
Driven by the need to further improve on the atomic data because of the more detailed spectra that become available, in January 2016 version 3.0 of the software has been launched.