HajimeKawahara / exojax

🐈 Automatic differentiable spectrum modeling of exoplanets/brown dwarfs using JAX, compatible with NumPyro and JAXopt
http://secondearths.sakura.ne.jp/exojax/
MIT License
56 stars 14 forks source link

Rayleigh scattering #430

Closed HajimeKawahara closed 12 months ago

HajimeKawahara commented 1 year ago

Rayleigh scattering cross section added.

115

Comparison and example

import pandas as pd
import matplotlib.pyplot as plt
dat = pd.read_csv("22-1.0E+00bar_1.0E+00.dat", delimiter="\s", names=("wav","null","null2","xs"))
N=100
wav = dat["wav"][::N]
xs  = dat["xs"][::N]

from exojax.spec.rayleigh import xsvector_rayleigh_gas
from exojax.spec.unitconvert import wav2nu
from exojax.atm.polarizability import polarizability

#p = 1.7403e-24
p = polarizability["N2"]
nus = wav2nu(wav, unit="um")
xs_exojax = xsvector_rayleigh_gas(nus, p, king_factor=1.0)

Figure_1

features

Also, I added polarizability and King correction at atm.polarizability