Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Rayleigh scattering #430

Merged
merged 14 commits into from
Nov 10, 2023
Merged

Rayleigh scattering #430

merged 14 commits into from
Nov 10, 2023

Conversation

HajimeKawahara
Copy link
Owner

@HajimeKawahara HajimeKawahara commented Nov 7, 2023

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

  • spec.rayleigh.xsvector_rayleigh_gas
    Rayleigh scattering cross section from polarizability,
  • spec.rayleigh.xsvector_rayleigh_gas_from_refractive_index
    Rayleigh scattering cross section from refractive index and number density

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

@HajimeKawahara HajimeKawahara added the enhancement New feature or request label Nov 7, 2023
@HajimeKawahara HajimeKawahara added this to the v1.5 milestone Nov 7, 2023
Copy link
Collaborator

@ykawashima ykawashima left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I have confirmed that xsvector_rayleigh_gas works.

@HajimeKawahara HajimeKawahara merged commit 4101b31 into develop Nov 10, 2023
1 check failed
@HajimeKawahara HajimeKawahara deleted the rayleigh_scattering branch November 11, 2023 05:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants