TauREx 3.1 - Extending atmospheric retrieval with plugins.
Authors: Al-Refaie Ahmed , Changeat Quentin , Venot Olivia , Waldmann Ingo , Tinetti Giovanna 
Published: October 2020

AbstractTauREx 3.1 is the next version of the open-source python retrieval framework TauREx 3[1], which is backward-compatible with the previous version but offers a swathe of improvements and optimizations to the overall architecture. This version upgrade includes support for k-tables, non-uniform priors, and H- opacities. The most major inclusion in this version of TauREx is the plugin system, which allows any developer to imbue TauREx 3 with new features without touching the main codebase. Plugins are installable additions that TauREx 3 will detect and automatically include in its Bayesian retrieval pipeline. They can be installed from PyPI through pip install or directly from a git repository. They can consist of collections of new chemistries, temperature profiles, contribution functions, stellar and planetary models, non-uniform prior functions, opacity formats, and forward models, to name a few. Anyone can host and develop them, and they are designed so that all are interoperable with each other. Presented are the CUDA and OpenCL plugins, which provide GPU accelerated forward models. Fastchem[2], GGchem[3], and disequilibrium[4] chemical plugins and petitRADTRANS[5] and phase curve forward model plugins. Presented are Forward models and retrievals that exploit the plugins&#160;IntroductionExoplanetary atmospheres are multi-faceted physical phenomena that touch many scientific fields. Chemical modeling, cloud physics, fluid dynamics, orbital mechanics and molecular spectroscopy are some of the physical processes that need to be appropriately handled in a retrieval framework to characterize these complex environments correctly. With the upcoming JWST and Ariel telescope expected to bring a higher density of information, it is vital that the many codes and contributions of a wide variety of fields can be exploited for characterization.&#160;PluginsTauREx 3 allowed for the inclusion of custom codes in the pipeline. TauREx 3.1 provides a means for which a developer can develop and distribute their custom codes through plugins. Plugins exploit the python packaging system to allow developers to make their codes installable and easily used in retrievals without modification of the main TauREx 3 codebase. &#160;The installation is an essential aspect as this allows many FORTRAN and C++ codes to be automatically compiled or binaries distributed. TauREx will then automatically detect these plugins and integrate them into its retrieval pipeline. Plugins can provide replacements for all components in the TauREx 3 framework. For example, if a user wishes to use the GGchem chemistry code in atmospheric retrievals, they can simply write pip install taurex_ggchem, which will automatically download a precompiled GGchem library and its data files and install it alongside a new TauREx chemistry component. A user can then immediately include GGchem for both forward models and retrievals in input files or python scripts. A single plugin can consist of any number of new replacement atmospheric components and can make use of FORTRAN, C++, and python codes/libraries.&#160;TauREx-CUDA/OpenCLTauREx-CUDA and TauREx-OpenCL are plugins that, when installed, provide replacement forward models that take advantage of heterogeneous computing. These replacement forward models allow the optical depth calculation to execute on hardware accelerators such as Nvidia, AMD, and Intel GPUs to be easily exploited for a 25--50x speed up in both forward models and retrievals.&#160;&#160;TauREx-GGchem/Fastchem/ACE/DisequilibriumThe four plugins TauREx-ACE, TauREx-Fastchem, and TauREx-GGchem, are installable components that provide the ACE[6], Fastchem[2] and GGchem[3] equilibrium codes for use in both forward modeling and retrievals. These can be easily installed and used in Windows, Mac, and Linux through PyPi and provide their full capabilities for both forward modeling (Figure 1) and retrievals (Figure 2).&#160; Also included is a new plugin for a photochemical kinetic solver[4] that provides disequilibrium chemistry with retrieval capabilities (Figure 3).&#160;&#160;Figure 1. Plots of simulated JWST transmission spectra from different chemistry schemes.&#160;Figure 2. Posteriors&#160; of&#160; ACE&#160; (blue),&#160; Fastchem&#160; (red),&#160; GGchem&#160; (green)&#160; and GGchem with condensation (orange)&#160;Figure 3. Active molecular profiles using a photochemical kinetic solver[4] with retrieval sampling uncertainties.&#160;Forward Model pluginsPlugins can include entirely new forward models. The TauREx-petitRADTRANS plugin that utilizes petitRADTRANS[5] code to compute the transmission and emission spectra. It demonstrates the interoperable nature of plugins. Running petitRADTRANS under the TauREx 3.1 framework gives it the ability to use all available chemistries, including ACE, Fastchem, GGchem, and disequilibrium codes, as well as retrievals utilizing nested sampling with non-uniform priors. The TauREx-phase plugin implements a phase curve forward model for retrievals and can exploit all plugins, including the equilibrium chemistry and&#160;CUDA, for self-consistent accelerated optimizations.&#160;SummaryThe plugin system in TauREx 3.1 aims to simplify the&#160;inclusion of new atmospheric parameters and external codes. TauREx 3.1 is available at http://github.com/ucl-exoplanets/TauREx3_public or through PyPi. Each plugin is also available through both in the ucl-exoplanets GitHub page and PyPi.&#160;References[1] Ahmed F. Al-Refaie, Quentin Changeat, Ingo P. Waldmann, and Giovanna Tinetti. Taurex III: A fast, dynamic and extendable framework for retrievals, 2019.[2] Joachim W Stock, Daniel Kitzmann, A Beate C Patzer, and Erwin Sedlmayr. FastChem: A computer program for efficient complex chemical equilibrium calculations in the neutral/ionized gas phase with applications to stellar and planetary atmospheres .Monthly Notices of the Royal Astronomical Society,479(1):865&#8211;874, 06 2018.[3] Woitke, P., Helling, Ch., Hunter, G. H., Millard, J. D., Turner, G. E.,Worters, M., Blecic, J., and Stock, J. W. Equilibrium chemistry down to 100 k - impact of silicates and phyllosilicates on the carbon to oxygen ratio..A&amp;A, 614:A1, 2018.[4] Venot, O., Hebrard, E., Agundez, M., Dobrijevic, M., Selsis, F., Hersant,F., Iro, N., and Bounaceur, R. A chemical model for the atmosphere of hot jupiters. A&amp;A, 546:A43, 2012.[5] Molliere, P., Wardenier, J. P., van Boekel, R., Henning, Th., Molaverdikhani, K., and Snellen, I. A. G. petitRADTRANS - a python radiative transfer package for exoplanet characterization and retrieval.A&amp;A, 627:A67, 2019.[6] M. Agundez, O. Venot, N. Iro, F. Selsis, F. Hersant, E. Hebrard, and M. Do-brijevic. The impact of atmospheric circulation on the chemistry of the hotJupiter HD 209458b.A&amp;A, 548:A73, Dec 2012.