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

Flux estimates when models are read into Python #735

Open
kslong opened this issue Jun 18, 2020 · 2 comments
Open

Flux estimates when models are read into Python #735

kslong opened this issue Jun 18, 2020 · 2 comments
Labels
bug Bugs in the code high

Comments

@kslong
Copy link
Collaborator

kslong commented Jun 18, 2020

According to the documentation at the top of get_models.c, Python can handle any model as long as:

Each model, that is read in contains a list of wavelengths and a flux, that should be proportional to flambda.

However, in estimating weights for photons in continum.c and more specifically in the documentation for emittance_continuum. It is clear it expects flux to be specifically the Eddington flux.

This is a bug.

Note that it is not totally straightforward what to do here, as there are other routines, e.g emittance_bb that also generate the Eddington flux.

The basic alternative is to separately estimate the total luminosity, and then just to assume that the models read in tell you how this is distributed in wavelength space. Which is what seems to be assumed in the statement from models.c. In this case, to get the flux in a particular band, one would (effectively) want to get the fraction of emission in that band and the multiply by the luminosity obtained separately to get the flux in the band.

@kslong kslong added bug Bugs in the code high labels Jun 18, 2020
@kslong
Copy link
Collaborator Author

kslong commented Jun 25, 2021

I have confirmed this is a problem. I created a fake data directory, and put the kucurcz models in this directory. In this fake directory, I doubled all of the fluxes for the stellar models. I then compared spec_tot from a Python model for a star using the models from the orignal kurucz91 director and using the fluxes in my fake directory. The created spectra differ by a factor of 2:

star_tot

@kslong
Copy link
Collaborator Author

kslong commented Jun 25, 2021

@jhmatthews what is your opinion here. The simplest thing to do from the point of view of programming would be to require that all models that are input to Python be Eddington fluxes. That is fairly natural for any stellar atmosphere. Can you think of a reason not to do this.

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

No branches or pull requests

1 participant