https://github.com/bmorris3/exojax
🐈 Automatic differentiable spectrum modeling of exoplanets/brown dwarfs compatible to JAX.
Science Score: 10.0%
This score indicates how likely this project is to be science-related based on various indicators:
-
○CITATION.cff file
-
○codemeta.json file
-
○.zenodo.json file
-
○DOI references
-
✓Academic publication links
Links to: arxiv.org -
○Academic email domains
-
○Institutional organization owner
-
○JOSS paper metadata
-
○Scientific vocabulary similarity
Low similarity (6.5%) to scientific vocabulary
Last synced: 10 months ago
·
JSON representation
Repository
🐈 Automatic differentiable spectrum modeling of exoplanets/brown dwarfs compatible to JAX.
Basic Info
- Host: GitHub
- Owner: bmorris3
- License: mit
- Default Branch: master
- Homepage: http://secondearths.sakura.ne.jp/exojax/
- Size: 79 MB
Statistics
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
- Releases: 0
Fork of HajimeKawahara/exojax
Created about 5 years ago
· Last pushed almost 5 years ago
https://github.com/bmorris3/exojax/blob/master/
# exojax [](https://github.com/HajimeKawahara/exojax/blob/develop/LICENSE) [](http://secondearths.sakura.ne.jp/exojax/) [](http://arxiv.org/abs/2105.14782) Auto-differentiable line-by-line spectral modeling of exoplanets/brown dwarfs using JAX. Read [the docs](http://secondearths.sakura.ne.jp/exojax) .## Functions
Voigt Profile :heavy_check_mark:
```python3 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:
```python from exojax.spec import AutoXS nus=numpy.linspace(1900.0,2300.0,40000,dtype=numpy.float64) #wavenumber (cm-1) autoxs=AutoXS(nus,"ExoMol","CO") #using ExoMol CO (12C-16O). HITRAN and HITEMP are also supported. xsv=autoxs.xsection(1000.0,1.0) #cross section for 1000K, 1bar (cm2) ```![]()
Do you just want to plot the line strength?
```python ls=autoxs.linest(1000.0,1.0) #line strength for 1000K, 1bar (cm) plt.plot(autoxs.mdb.nu_lines,ls,".") ``` autoxs.mdb is the [moldb.MdbExomol class](http://secondearths.sakura.ne.jp/exojax/exojax/exojax.spec.html#exojax.spec.moldb.MdbExomol) for molecular database. Here is a entrance to a deeper level. exojax is more flexible in the way it calculates the molecular lines. Go to [the docs](http://secondearths.sakura.ne.jp/exojax) for the deeper level.Emission Spectrum :heavy_check_mark:
```python from exojax.spec.rtransfer import nugrid from exojax.spec import AutoRT nus,wav,res=nugrid(1900.0,2300.0,40000,"cm-1") Parr=numpy.logspace(-8,2,100) #100 layers from 10^-8 bar to 10^2 bar Tarr = 500.*(Parr/Parr[-1])**0.02 autort=AutoRT(nus,1.e5,2.33,Tarr,Parr) #g=1.e5 cm/s2, mmw=2.33 autort.addcia("H2-H2",0.74,0.74) #CIA, mmr(H)=0.74 autort.addcia("H2-He",0.74,0.25) #CIA, mmr(He)=0.25 autort.addmol("ExoMol","CO",0.01) #CO line, mmr(CO)=0.01 F=autort.rtrun() ```
If you want to customize the model, see [here](http://secondearths.sakura.ne.jp/exojax/tutorials/forward_modeling.html).Are you an observer?
```python nusobs=numpy.linspace(1900.0,2300.0,10000,dtype=numpy.float64) #observation wavenumber bin (cm-1) F=autort.spectrum(nusobs,100000.0,20.0,0.0) #R=100000, vsini=10km/s, RV=0km/s ```![]()
HMC-NUTS of Emission Spectra :heavy_check_mark:
To fit a spectrum model to real data, you need to know a little more about exojax. See [here](http://secondearths.sakura.ne.jp/exojax/tutorials/reverse_modeling.html).HMC-NUTS modeling of a brown dwarf, [Luhman 16 A](https://en.wikipedia.org/wiki/Luhman_16) using exojax. See [here](http://secondearths.sakura.ne.jp/exojax/tutorials/fitbd.html) for an example of the Bayes inference using the real spectrum.
HMC-NUTS of Transmission Spectra :x:
Not supported yet.## Installation ``` pip install exojax ``` or ``` python setup.py install ```Cloud modeling :x:
Not supported yet.## References - Kawahara, Kawashima, Masuda, and Crossfield (2021) under review: [arXiv:2105.14782](http://arxiv.org/abs/2105.14782) ## License Copyright 2020-2021 [Hajime Kawahara](http://secondearths.sakura.ne.jp/en/index.html). exojax is publicly available under the MIT license. Under development since Dec. 2020.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.5.0, which enables [the forward differentiation of HMC-NUTS](http://num.pyro.ai/en/latest/mcmc.html#numpyro.infer.hmc.NUTS). Please check the required JAX version by NumPyro. In May 2021, it seems the recent version of [NumPyro](https://github.com/pyro-ppl/numpyro) requires jaxlib>=0.1.62 (see [setup.py](https://github.com/pyro-ppl/numpyro/blob/master/setup.py) of NumPyro for instance). - JAX Check you cuda version: ``` nvcc -V ``` Install such as ``` pip install --upgrade jax jaxlib==0.1.62+cuda112 -f https://storage.googleapis.com/jax-releases/jax_releases.html ``` In this case, jaxlib version is 0.1.62 and cuda version is 11.2. You can check which cuda version is avaiable at [here](https://storage.googleapis.com/jax-releases/jax_releases.html) Visit [here](https://github.com/google/jax) for the details. - cuDNN For instance, get .deb from NVIDIA and install such as ``` sudo dpkg -i libcudnn8_8.2.0.53-1+cuda11.3_amd64.deb ``` cuDNN is used for to compute the astronomical/instrumental response for the large number of wave number grid (exojax.spec.response). Otherwise, we do not use it.
Owner
- Name: Brett M. Morris
- Login: bmorris3
- Kind: user
- Location: Baltimore, MD
- Company: @SpaceTelescope
- Website: http://brettmorr.is
- Twitter: brettmor
- Repositories: 287
- Profile: https://github.com/bmorris3
Software engineer & astronomer.
## Functions
HMC-NUTS modeling of a brown dwarf, [Luhman 16 A](https://en.wikipedia.org/wiki/Luhman_16) using exojax. See [here](http://secondearths.sakura.ne.jp/exojax/tutorials/fitbd.html) for an example of the Bayes inference using the real spectrum.