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

Create file reader for gaunt factors and departure coefficients #42

Open
isaacgsmith opened this issue Mar 1, 2023 · 0 comments
Open

Comments

@isaacgsmith
Copy link
Member

isaacgsmith commented Mar 1, 2023

For "hydrogenic" bound-free and free-free opacity, the correct equation is:
alpha = alpha_hydrogenic * g * (1+D)
where g is the gaunt factor, which corrects for quantum mechanical effects, and D is the departure coefficient, that corrects the opacity if we are looking at a species that is not hydrogenic. These coefficients are interpolated from data files (see #41). This file needs a reader.

The configuration already allows you to put in files for these, and there is an empty function gaunt_times_departure() in stardis/opacities/base.py. My thought was this function would return an array of g*(1+D) for each frequency and temperature, which would then just need to be multiplied by the hydrogenic opacity array (what we currently return) to get the correct opacity. If no files are provided, the array will just be 1's.

Ideally, we use the existing interpolation function sigma_file() in stardis/opacities/util.py which could be renamed to make it more general. The only issue is that we cannot just use linear interpolation in wavelength and temperature for these. And, if we want to be flexible and allow several different interpolation schemes, either the files would have to be csvy files, or we would need to have additional options in the configuration.

The solution to this may be related to the solution of #61.

For reference, see https://iopscience.iop.org/article/10.3847/1538-3881/acaaad.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant