Skip to main content

ACE equilibrium chemical scheme wrapper built on TauREx

Project description

TauREx-ACE plugin

Python wrapper built using the TauREx framework for the FORTRAN equilibrium chemistry code developed by Agúndez et al. 2012.

Installation

You can install one of the prebuilt binary wheels for Windows, macOS and manylinux through pip:

pip install taurex_ace

Installing from source

To install from source a valid C/C++ and FORTRAN compiler must be present. You can compile it by doing:

git clone https://github.com/ucl-exoplanets/taurex_ace.git
cd taurex_ace
pip install .

Running in TauREx

Once installed you can select the chemical model through the chemistry_type keyword under Chemistry.

[Chemistry]
chemistry_type = ace
metallicity = 1.0
co_ratio = 0.5

Input arguments:

Argument Description Type Default Required
metallicity Metallicity relative to solar float 1.0 (Solar)
co_ratio C/O ratio float 0.5
therm_file Path to thermalchemical data string Built-in
spec_file Path to species string Built-in

Retrieval Parameters:

Fitting Parameter Description
metallicity Metallicity relative to solar
C_O_ratio C/O ratio

Running in Python

You can import the chemistry scheme in Python pretty easily

>>> from taurex_ace import ACEChemistry

>>> ace = ACEChemistry(metallicity=1.0, co_ratio=0.5)

You can either pass it into a TauREx forward model like so:

>>> tm = TransmissionModel(chemistry=ace)

Or use it independently to compute volume mixing ratios by passing in temperature and pressure ( Pascal ) arrays:

>>> nlayers = 100
>>> T = numpy.linspace(400,1000,nlayers)
>>> P = numpy.logspace(1,5, nlayers)
>>> ace.initialize_chemistry(nlayers=nlayers, temperature_profile=T, pressure_profile=P)
>>> ace.gases
['CH3COOOH', 'C4H9O', 'C3H7O', ...,  'HNC', 'HON', 'NCN']
>>> ace.mixProfile
array([[6.49723780e-80, 6.79239790e-79, 6.61822622e-78, ...,
        8.00944782e-41, 1.11751339e-40, 1.55179784e-40],
       [7.10900373e-76, 4.67226720e-75, 2.90530077e-74, ...,
        1.03852971e-43, 1.39343534e-43, 1.86266570e-43],
       [1.13921670e-64, 5.82452085e-64, 2.83707624e-63, ...,
        4.26299477e-37, 5.44908156e-37, 6.94256769e-37],
       ...,
       [3.29247294e-31, 1.02824750e-30, 3.09872209e-30, ...,
        1.82127852e-13, 2.05020932e-13, 2.30210836e-13],
       [4.53205427e-71, 4.23173486e-70, 3.69942916e-69, ...,
        2.31456323e-32, 3.35359173e-32, 4.83724134e-32],
       [8.04632748e-67, 7.90155245e-66, 7.23887996e-65, ...,
        3.68586537e-29, 5.02545448e-29, 6.81862528e-29]])

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

taurex_ace-1.0.0.dev0.tar.gz (61.7 kB view hashes)

Uploaded Source

Built Distributions

taurex_ace-1.0.0.dev0-cp39-cp39-win_amd64.whl (507.1 kB view hashes)

Uploaded CPython 3.9 Windows x86-64

taurex_ace-1.0.0.dev0-cp39-cp39-manylinux2010_i686.whl (1.1 MB view hashes)

Uploaded CPython 3.9 manylinux: glibc 2.12+ i686

taurex_ace-1.0.0.dev0-cp39-cp39-manylinux1_x86_64.whl (506.4 kB view hashes)

Uploaded CPython 3.9

taurex_ace-1.0.0.dev0-cp39-cp39-macosx_10_9_x86_64.whl (470.0 kB view hashes)

Uploaded CPython 3.9 macOS 10.9+ x86-64

taurex_ace-1.0.0.dev0-cp38-cp38-win_amd64.whl (504.9 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

taurex_ace-1.0.0.dev0-cp38-cp38-manylinux2010_i686.whl (1.1 MB view hashes)

Uploaded CPython 3.8 manylinux: glibc 2.12+ i686

taurex_ace-1.0.0.dev0-cp38-cp38-manylinux1_x86_64.whl (505.2 kB view hashes)

Uploaded CPython 3.8

taurex_ace-1.0.0.dev0-cp38-cp38-macosx_10_9_x86_64.whl (469.4 kB view hashes)

Uploaded CPython 3.8 macOS 10.9+ x86-64

taurex_ace-1.0.0.dev0-cp37-cp37m-win_amd64.whl (503.9 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

taurex_ace-1.0.0.dev0-cp37-cp37m-manylinux2010_i686.whl (1.1 MB view hashes)

Uploaded CPython 3.7m manylinux: glibc 2.12+ i686

taurex_ace-1.0.0.dev0-cp37-cp37m-manylinux1_x86_64.whl (505.0 kB view hashes)

Uploaded CPython 3.7m

taurex_ace-1.0.0.dev0-cp37-cp37m-macosx_10_9_x86_64.whl (469.3 kB view hashes)

Uploaded CPython 3.7m macOS 10.9+ x86-64

taurex_ace-1.0.0.dev0-cp36-cp36m-win_amd64.whl (463.0 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

taurex_ace-1.0.0.dev0-cp36-cp36m-manylinux2010_i686.whl (1.1 MB view hashes)

Uploaded CPython 3.6m manylinux: glibc 2.12+ i686

taurex_ace-1.0.0.dev0-cp36-cp36m-manylinux1_x86_64.whl (503.5 kB view hashes)

Uploaded CPython 3.6m

taurex_ace-1.0.0.dev0-cp36-cp36m-macosx_10_9_x86_64.whl (469.1 kB view hashes)

Uploaded CPython 3.6m macOS 10.9+ x86-64

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page