ENIIGMA Fitting Tool: Infrared Ice Spectroscopy
- ENIIGMA is a spectral-decomposition tool that models infrared ice spectra as combinations of laboratory analogs using genetic algorithms.
- It automates continuum fitting, silicate extraction, and statistical analysis to derive confidence intervals and quantify component degeneracy.
- The tool enables precise molecular identification in complex protostellar environments, enhancing the interpretation of JWST-era observations.
Searching arXiv for ENIIGMA fitting tool and closely related infrared ice spectroscopy work. ENIIGMA, short for dEcompositioN of Infrared Ice features using Genetic Modelling Algorithms, is a publicly available and open-source Python toolbox for spectroscopy analysis of infrared spectra that decomposes protostellar ice absorption spectra into physically meaningful combinations of laboratory ice spectra. It was introduced to automate continuum determination, silicate extraction, spectral decomposition, and statistical analysis, with explicit calculation of confidence intervals and quantification of degeneracy in the inferred ice composition (Rocha et al., 2021). The tool is designed for broad-band infrared data, and in the Elias 29 application it was used over the range , where overlapping bands, matrix effects, thermal history, and energetic processing make manual or narrow-window fitting intrinsically ambiguous.
1. Scientific role and scope
ENIIGMA was developed for the interpretation of interstellar and circumstellar ice absorption bands in dense clouds and protostellar envelopes, where spectra contain broad, overlapping, and environment-dependent features from species such as HO, CO, CO, CHOH, NH, CH, and NH (Rocha et al., 2021). The stated motivation is that a variety of laboratory ice spectra simulating different chemical environments, ice morphology, and thermal and energetic processing are required for an accurate interpretation of protostellar spectra, and that an automated statistically based computational approach becomes necessary to determine which combination of laboratory data best fits the observations.
The method differs from phenomenological multi-Gaussian fitting in narrow windows because it fits a linear combination of laboratory spectra across a broad wavelength interval. The tool therefore searches over a large database of laboratory analogs rather than restricting the analysis to pre-assigned carriers in a small spectral region. This suggests that ENIIGMA is best understood not as a line-by-line classifier, but as a spectral-decomposition framework in which molecular identification is coupled to laboratory analog selection and to the inferred physical environment.
Its astrophysical emphasis is explicitly protostellar infrared ice spectroscopy. The paper describes applications to ISO-SWS, Spitzer-IRS, and spectra of the same general type, and states that the toolbox is well timed with the launch of the James Webb Space Telescope (Rocha et al., 2021).
2. Observational inputs and laboratory basis
ENIIGMA accepts three classes of input spectra in ASCII format with three columns: wavelength in , flux or optical depth, and error (Rocha et al., 2021). The accepted forms are flux density spectra, optical-depth spectra including silicate features, and optical-depth spectra with silicates already removed. This separation reflects the internal structure of the code, since continuum fitting and optical-depth conversion may be performed internally, while silicate removal may either be performed by the tool or supplied externally.
The internal laboratory database contains approximately 100 spectra collected from the NASA Ames ice database, the Leiden Ice Database, and the UNIVAP NKABS database (Rocha et al., 2021). The database includes pure ices, mixtures, heated samples, UV-processed ices, ion-irradiated ices, and residues at elevated temperature. The examples listed in the source material include pure HO, CO, CO, CH0OH, CH1, NH2, CH3CHO, HCOOH, CH4CH5OH, and CH6OCH7, as well as mixed compositions such as H8O:CO:NH9:CH0OH and H1O:NH2:CO3:CH4.
Laboratory spectra measured in transmittance or absorbance are converted consistently. If 5 is transmittance and 6 is absorbance, then
7
and the laboratory optical depth is
8
Baselines of the laboratory spectra were checked or corrected to avoid misassignment. The database is manually grouped by type—pure, pure+heated, mixtures+heated, irradiated, and residues—and is described as easily extensible by the user (Rocha et al., 2021).
A common misconception is that the tool directly identifies molecules independently of the database. The paper states the opposite in practical terms: if an astrophysical component is absent from the database, ENIIGMA approximates it with the closest available analog. This means that identifications are always conditioned on the coverage and quality of the laboratory library.
3. Pre-processing: continuum, optical depth, and silicate extraction
For flux spectra 9, ENIIGMA offers two continuum models (Rocha et al., 2021). The first is a low-order polynomial,
0
used in the paper for wavelength regions such as 1. The second is a multi-blackbody continuum,
2
used for 3 and for SED-like continua. Continuum windows free of strong ice features are chosen by the user.
Once the continuum 4 is determined, the observed optical depth is computed as
5
This step is operationally central because the subsequent decomposition is performed in optical-depth space.
The 6 region is complicated by the 9.7 and 7 silicate bands, which overlap with ice features such as NH8 at 9, CH0OH at 1, ethanol near 2, and the H3O libration band near 4 (Rocha et al., 2021). ENIIGMA therefore implements a synthetic silicate method. The empirical GCS 3 silicate profile is scaled to the observed 9.7 and 5 peaks and decomposed into six Gaussians with fixed centers
6
Each Gaussian is written as
7
and the synthetic silicate optical depth is
8
The ice-only optical depth is then
9
The paper states that this synthetic method handles the 9.7 and 0 silicate bands simultaneously, which improves the separation of H1O libration and CO2 bending features in the 3 range (Rocha et al., 2021).
4. Genetic-modelling spectral decomposition
After pre-processing, ENIIGMA represents the ice-only optical depth spectrum as a linear combination of laboratory spectra,
4
where the coefficients 5 are the free parameters (Rocha et al., 2021). In the genetic-algorithm formulation, each candidate solution is a chromosome whose genes are the coefficients of the selected laboratory components.
The quality of a candidate solution is measured by the squared residual
6
This objective is directly proportional to a 7 when a constant observational standard deviation is assumed.
The implementation uses the Pyevolve Python library for the genetic algorithm (Rocha et al., 2021). The cycle includes initialization, parent selection, crossover, mutation, evaluation, and termination. The paper describes roulette-wheel and tournament selection, several crossover operators, and Gaussian mutation,
8
where 9 is drawn from a Gaussian distribution. The reported mutation rate is typically 0, and the population-to-generation ratios used in the work are typically 1 or 2. Tournament selection with high crossover rate is reported to have performed best for complex fits.
A distinctive feature of ENIIGMA is that it searches not only the coefficients 3 but also the component set. The user first supplies an initial guess containing four laboratory spectra. A genetic fit is performed for that set, producing a residual 4. Additional laboratory spectra are then added one at a time, each augmented set is refit, and components for which the new residual 5 satisfies 6 are kept as promising. The genetic algorithm is then rerun using groups of 7–8 or more components drawn from this filtered set to search for the global minimum (Rocha et al., 2021). This design is why the paper states that the initial guess is not binding.
The tool is therefore not restricted to fitting a single predefined mixture. It performs a database-guided search over broad combinations of pure, mixed, heated, irradiated, and residue spectra, constrained by the observed spectrum and the laboratory archive.
5. Statistical analysis, confidence regions, and degeneracy
ENIIGMA supplements the heuristic search with a post-processing statistical analysis intended to derive confidence intervals and quantify degeneracy (Rocha et al., 2021). The starting point is
7
and confidence regions are defined through
8
where 9 is the number of free parameters and 0 is the significance level.
The tool samples parameter space around the optimum by treating each coefficient 1 as a random variable drawn from a normal distribution,
2
with mean 3 equal to the optimal coefficient. The paper gives specific 4 thresholds, including 5, 6, and 7 for 1–38 with two components, and 9, 0, and 1 for 1–32 with eight components (Rocha et al., 2021). The resulting 2D correlation maps expose anti-correlations and component trade-offs.
Column densities are computed from the optical-depth profile and the band strength 3 using
4
Lower and upper bounds are obtained by repeating the integration with the lower and upper limits of 5 derived from the confidence analysis.
Degeneracy is further characterized through recurrence plots. ENIIGMA collects all acceptable solutions within a chosen 6 threshold, counts how often each laboratory component appears, and defines the recurrence
7
where 8 is the frequency of component 9 and 0 is the total number of acceptable solutions (Rocha et al., 2021). A recurrence of 1 indicates that a component appears in all acceptable solutions, whereas lower recurrence means that it can be replaced by other components without significantly degrading the fit.
The tool also constructs histograms of 2 over all acceptable solutions, using the Freedman–Diaconis estimator for bin widths. This is important because different decompositions can have similar 3 but different inferred compositions. A plausible implication is that ENIIGMA’s output should be interpreted as an ensemble of statistically acceptable decompositions rather than as a single unique molecular inventory.
6. Validation, Elias 29, and methodological boundaries
The paper reports three categories of validation: known pure and mixed laboratory spectra, fractionation tests with added Gaussian noise, and a synthetic ice spectrum containing eight pure ice components plus silicate absorption and Gaussian noise (Rocha et al., 2021). In the tests with known samples, the tool correctly retrieved the exact spectra and coefficients in both “fully sighted” and “fully blind” cases when the correct sample was present in the database. When the correct sample was removed, ENIIGMA selected the most similar available analog, such as the same species at a different temperature. Fractionation tests showed that strong degeneracy appears when one component is minor, for example in the 4 case of H5O(15 K) + H6O(40 K), where a pure 15 K solution remained statistically allowed.
The principal astrophysical demonstration is the Class I protostar Elias 29, for which ENIIGMA was applied to ISO-SWS/LWS and Spitzer-IRS data over 7, with the decomposition focused on 8 (Rocha et al., 2021). The continuum was modeled with a single blackbody of 9 K over 00 and a third-order polynomial over 01. After synthetic silicate subtraction, an initial guess of pure H02O, CO, CO03, and NH04 led to an optimal seven-component solution.
The seven-component decomposition included a heavy-ion-processed H05O:NH06:CO07:CH08 mixture at 35 K, a UV-processed H09O:NH10:CH11OH:CO:CO12 mixture, pure and mixed CO13, pure CO, pure and mixed H14O, NH15-bearing components including residues, and an H16O:CH17CH18OH mixture (Rocha et al., 2021). The paper states that the overall fit from 19 to 20 is excellent, while also noting residual systematic effects such as the underfit red wing of the 21 band.
For Elias 29, the recurrence analysis within 22 showed that three components had 23: the processed H24O:NH25:CO26:CH27 mixture, the UV-processed H28O:NH29:CH30OH:CO:CO31 mixture, and CO32 (Rocha et al., 2021). CO and pure H33O had high recurrence, while the only laboratory component containing ethanol, the H34O:CH35CH36OH mixture, had recurrence of approximately 37. The paper therefore describes the ethanol inference as a tentative detection rather than a definitive identification.
The global-minimum column densities reported for Elias 29 include H38O 39, CO40 41, CO 42, NH43 44, CH45 46, H47CO 48, CH49OH 50, NH51 52, and CH53CH54OH 55 (Rocha et al., 2021).
The paper also states clear limitations. Continuum subtraction and silicate removal can imprint artifacts in the 56 region; the laboratory database is finite and biased; grain shape and size effects are not currently treated through Mie or CDE corrections; and intermolecular environment effects are represented only through the discrete mixtures present in the database (Rocha et al., 2021). These limitations are methodological rather than incidental. They imply that ENIIGMA is strongest when used as a statistically explicit decomposition tool tied to a well-curated laboratory archive, and weaker when laboratory coverage is incomplete or when dust radiative-transfer effects dominate the spectral morphology.