Skip to main content

Auto-differentiable line-by-line spectral modeling of exoplanets/brown dwarfs using JAX.

Project description

ExoJAX

License Docs arxiv paper

Auto-differentiable line-by-line spectral modeling of exoplanets/brown dwarfs/M dwarfs using JAX. Read the docs 🐕. In a nutshell, ExoJAX enables you to do a gradient-based optimization and a HMC-NUTS fitting using the latest database.

ExoJAX is compatible at least with

Functions

Voigt Profile :heavy_check_mark:
from exojax.spec import voigt
nu=numpy.linspace(-10,10,100)
voigt(nu,1.0,2.0) #sigma_D=1.0, gamma_L=2.0
Cross Section using HITRAN/HITEMP/ExoMol :heavy_check_mark:
from exojax.utils.grids import wavenumber_grid
from exojax.spec.api import MdbExomol
from exojax.spec.opacalc import OpaPremodit

from jax.config import config
config.update("jax_enable_x64", True)

nu_grid,wav,res=wavenumber_grid(1900.0,2300.0,200000,xsmode="premodit",unit="cm-1",)
mdb = MdbExomol(".database/CO/12C-16O/Li2015",nu_grid)
opa = OpaPremodit(mdb,nu_grid,auto_trange=[900.0,1100.0])
xsv = opa.xsvector(1000.0, 1.0) # cross section for 1000K, 1 bar
Do you just want to plot the line strength at T=1000K?
mdb.change_reference_temperature(1000.) # at 1000K
plt.plot(mdb.nu_lines,mdb.line_strength_ref,".")
Emission Spectrum :heavy_check_mark:
art = ArtEmisPure(nu_grid=nu_grid, pressure_btm=1.e2, pressure_top=1.e-8, nlayer=100)
F = art.run(dtau, Tarr)

See http://secondearths.sakura.ne.jp/exojax/develop/tutorials/get_started.html for the first step!

Installation

pip install exojax

or

python setup.py install
Note on installation w/ GPU support

:books: You need to install CUDA, NumPyro, JAX w/ NVIDIA GPU support, and cuDNN.

  • NumPyro

ExoJAX supports NumPyro >=0.7.0. Please check the required JAX version by NumPyro. In May 2021, it seems the recent version of NumPyro requires jaxlib>=0.1.62 (see setup.py of NumPyro for instance).

  • JAX

Check you cuda version:

nvcc -V

Install such as

pip install --upgrade pip
pip install --upgrade "jax[cuda]" -f https://storage.googleapis.com/jax-releases/jax_releases.html

Please visit here for details.

References

paper

  • Paper I: Kawahara, Kawashima, Masuda, Crossfield, Pannier, van den Bekerom, ApJS 258, 31 (2022)

License

🐈 Copyright 2020-2023 ExoJAX contributors. exojax is publicly available under the MIT license.

Project details


Download files

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

Source Distributions

No source distribution files available for this release.See tutorial on generating distribution archives.

Built Distributions

If you're not sure about the file name format, learn more about wheel file names.

ExoJAX-1.3-py3.8.egg (6.8 MB view details)

Uploaded Egg

ExoJAX-1.3-py2.py3-none-any.whl (6.1 MB view details)

Uploaded Python 2Python 3

File details

Details for the file ExoJAX-1.3-py3.8.egg.

File metadata

  • Download URL: ExoJAX-1.3-py3.8.egg
  • Upload date:
  • Size: 6.8 MB
  • Tags: Egg
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for ExoJAX-1.3-py3.8.egg
Algorithm Hash digest
SHA256 d92dda145bd7f0c559b73f63cb3d6bc5e56860ce6c06ac92e6713d7c0926813f
MD5 c7e21f06ffc5e5508a2241f0251e8a32
BLAKE2b-256 a7c748801926032e40d61d6050e3d71afc799c778a201c0aaddb6f87888f44ed

See more details on using hashes here.

File details

Details for the file ExoJAX-1.3-py2.py3-none-any.whl.

File metadata

  • Download URL: ExoJAX-1.3-py2.py3-none-any.whl
  • Upload date:
  • Size: 6.1 MB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/45.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

File hashes

Hashes for ExoJAX-1.3-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 bfc3102df5c27cedc8654485f5225c7ae7acb867d5ae57ad823a847d308e0cab
MD5 b809cd1f38a86d6372da40785305bd62
BLAKE2b-256 543bae84f2ae368de8798dea1da28ed7511ca09b34e61d1a5426aa44d96ee740

See more details on using hashes here.

Supported by

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