Package: taurex-fastchem
TauREx-FastChem pluginA Python wrapper built using theTauRExis available.
The wrapper also installs all available datafiles included with FastChemInstallationYou can install one of the prebuilt binary wheels for Windows, macOS and manylinux through pip:pipinstalltaurex_fastchemInstalling from sourceTo install from source a valid C/C++ compiler must be present. You can compile it by doing:gitclonehttps://github.com/ucl-exoplanets/FastChem.gitcdFastChem
pipinstall.Running in TauRExOnce installed you can select the chemical model through thechemistry_typekeyword under
Chemistry.[Chemistry]
chemistry_type = fastchem
metallicity = 1.0
selected_elements = H, He, C, N, O, Ti, V, S, K
ratio_elements = C, N, Ti
ratios_to_O = 0.5,0.001, 1e-4
with_ions = True

[Fitting]
Ti_O_ratio:fit = True
Ti_O_ratio:prior = "LogUniform(bounds=(-6,2))"
S_O_ratio:fit = True
S_O_ratio:prior = "LogUniform(bounds=(-6,2))"
metallicity:fit = True
metallicity:prior = "LogUniform(bounds=(-6,2))"Input arguments:These arguments apply to both the TauREx input file and python interface.ArgumentDescriptionTypeDefaultRequiredH_He_ratioHe/H ratiofloat0.083selected_elementsList of elements to include in modellist of stringAll elements in FastChemratio_elementsList of elements to set the ratiolist of stringratios_to_Oratio of each 'ratio_element' relative to oxygenarrayelements_abundance_filePath to file that defines initial abundances (in dex)stringBuiltin (solar)metallicityMetallicity relative to initial abundancefloat1.0elements_datafilePath to file containing elements and their massesstringBuilt-in (chemical_abundances.dat)species_datafilePath to file containing species and thermochemical datastringBuilt-in (logK.dat)chem_accuracywith_ionsInclude ionsboolFalsepressure_accuracynewton_errormax_chem_itermax_press_itermax_nedler_iterlongdoubleUse 80 bit floats for faster convergenceboolFalseRetrieval Parameters:Fitting ParameterDescriptionmetallicityMetallicity relative to solarThe wrapper will generate oxygen retrieval parameters for all metallic elements within the
chemical model. If Ti is present (either by default or specifing inselected_elements)
then aTi_O_ratioretrieval parameter will be available.
Using the defaultselected_parameterswill give access to:Fitting ParameterDescriptionAl_O_ratioAl/O ratioAr_O_ratioAr/O ratioC_O_ratioC/O ratioCa_O_ratioCa/O ratioCl_O_ratioCl/O ratioCo_O_ratioCo/O ratioCr_O_ratioCr/O ratioCu_O_ratioCu/O ratioF_O_ratioF/O ratioFe_O_ratioFe/O ratioGe_O_ratioGe/O ratioK_O_ratioK/O ratioMg_O_ratioMg/O ratioMn_O_ratioMn/O ratioN_O_ratioN/O ratioNa_O_ratioNa/O ratioNe_O_ratioNe/O ratioNi_O_ratioNi/O ratioP_O_ratioP/O ratioS_O_ratioS/O ratioSi_O_ratioSi/O ratioTi_O_ratioTi/O ratioV_O_ratioV/O ratioZn_O_ratioZn/O ratioRunning in PythonYou can import the chemistry scheme in Python pretty easily>>>fromtaurex_fastchemimportFastChem>>>fc=FastChem(selected_elements=['H','He','C','O','N','K','e-'],with_ions=True,metallicity=1.0)You can either pass it into a TauREx forward model like so:>>>tm=TransmissionModel(chemistry=fc)Or use it independently to compute volume mixing ratios by passing in
temperature and pressure ( Pascal ) arrays:>>>nlayers=10>>>temperature=np.linspace(300,100,nlayers)>>>pressure=np.logspace(5,-3,nlayers)# Pa>>>fc.initialize_chemistry(nlayers,temperature,pressure)>>>fc.gases['H','He','O','C','K','N','e-',...,'O+','O-','O2+','O2-']>>>fc.mixProfilearray([[3.87435866e-036,9.95149979e-039,7.62616463e-042,1.23490910e-045,2.58839801e-050,3.41640407e-056,9.40930967e-064,9.08433703e-074,1.41255491e-087,1.38065040e-167],...,[1.42400626e-001,1.42400626e-001,1.42400626e-001,1.42400626e-001,1.42400626e-001,1.42400791e-001,1.42398731e-001,1.42398284e-001,1.42367067e-001,9.96186945e-001]])