PyIRoGlass: An Open-Source, Bayesian MCMC Algorithm for Fitting Baselines to FTIR Spectra of Basaltic-Andesitic Glasses

This is a Preprint and has not been peer reviewed. This is version 1 of this Preprint.

Add a Comment

You must log in to post a comment.


There are no comments or no comments have been made public for this article.


Download Preprint


Sarah Christine Shi , William Henry Towbin, Terry Plank, Anna Barth, Daniel Rasmussen, Yves Moussallam, Hyun Joo Lee, William Menke


Quantifying volatile concentrations in magmas is critical for understanding magma storage, phase equilibria, and eruption processes. We present PyIRoGlass, an open-source Python package for quantifying H$_2$O and CO$_2$ species concentrations in the transmission FTIR spectra of basaltic to andesitic glasses. We leverage a database of naturally degassed melt inclusions and back-arc basin basalts to delineate the fundamental shape and variability of the baseline underlying the $\mathrm{CO_3^{2-}}$ and $\mathrm{H_2O_{m, 1635}}$ peaks, in the mid-infrared region. All Beer-Lambert Law parameters are examined to quantify associated uncertainties. PyIRoGlass employs Bayesian inference and Markov Chain Monte Carlo sampling to fit all probable baselines and peaks, solving for best-fit parameters and capturing covariance to offer robust uncertainty estimates. Results from PyIRoGlass agree with independent analysis of experimental devolatilized glasses (within 6\%) and interlaboratory standards (13\% for H$_2$O, 9\% for CO$_2$). The open-source nature of PyIRoGlass ensures its adaptability and evolution as more data become available.



Earth Sciences, Geochemistry, Other Earth Sciences, Physical Sciences and Mathematics, Volcanology


volatiles, FTIR, Open-source, python, Bayesian, Markov chain Monte Carlo


Published: 2023-11-02 03:42

Last Updated: 2023-11-02 05:18


CC BY Attribution 4.0 International

Additional Metadata

Conflict of interest statement:

Data Availability (Reason not available):