Implementing AGB models
Now that we have the Padova/Colibri models incorporated into the downloadable data #357 , we need some criteria for when to use the models for a given star. At the moment we are not assuming any dust for these models. As has been discussed in #258 we may want to add dust as well as better resolution for thermal pulses.
@karllark I'm assuming we need some color or magnitude cut that may depend on the users photometric filter?
Thinking from the physics model standpoint, it would be based on the evolutionary phase or log(g)/Teff or something like that. Mapping the stellar atmosphere models to the tracks/isochrones is done before we have any photometry computed.
Not sure the isochrones we download from the website have the evolutionary phase. This needs to be checked via the file (there are lots of columns!).
The current models have ['Z', 'logz', 'logT', 'Teff', 'Reff', 'logg']
But there are is more info (I think) in the downloaded isochrone file.
I remember that some models that we messed with last year when we were trying to interpolate the stellar models had "evolutionary points" from Phil Rosenfield that indicated evolutionary phase.
The columns for /astro/mboyer/Science/BEAST/Aringer.AGB.grid.fits are the ones I mentioned.
The Aringer/Colibri models are also non-uniform with respect to metallicity:

How do the points (say in log(T) and log(g)) compare to the Kurucz stellar models? Do they overlap? Do they extend the log(g)-T(eff) coverage?
The Kurucz models are the same across each of the 8 metallicities and look like this:

So there is some overlap
Plot?
For example:
Aringer in red, Kurucz in blue
Great. I think then there is an "easy" way forward. I think we can just add the models to the stellar atmosphere grid. The ordering does matter. The standard is osl = stellib.Tlusty() + stellib.Kurucz() and that means Tlusty models are used in the overlap region. We checked that Tlusty and Kurucz spectra were the same in the overlap region. This should be done for the Kurucz and Aringer overlap regions. Has this been done? Have you done this? We should at least spot check to make sure we've got the same units for the actual spectra used by the BEAST. If that goes well, then I think it would just be osl = stellib.Tlusty() + stellib.Aringer() + stellib.Kurucz(). And then checking everything of course.
When you say
We checked that Tlusty and Kurucz spectra were the same in the overlap region.
What do you mean the same?
If you plot the spectra for the same log(g)/Teff/metallicity from Kurucz and Aringer, do they overlap/look the same?
Got it, thanks. Is there an easy way to generate the spectra other than through stellib.Kurucz() ?
Not sure. It's been too long. ;-)
No worries, I think i've found a way
The flux units for Kurucz and Aringer seem different.
Two example spectra for T=3800
Kurucz:

Aringer:

Kurucz fluxes in ergs/s/cm2/A Kurucz wavelengths in nm
Aringer fluxes in (ν · Lν [erg/s]). Aringer wavelengths in Angstrom
To get spectra use:
import beast
from beast.physicsmodel.stars import stellib
# get stellib classes
kurucz = stellib.Kurucz()
aringer = stellib.Aringer()
# get spectra
kurucz_spec = kurucz.genSpectrum(np.array([[3800, 3801]]))
aringer_spec = aringer.genSpectrum(np.array([[3800, 3801]]))
# create figure
fig = plt.figure(figsize=(4, 4))
ax1 = fig.add_subplot(1, 1, 1)
# plot spectra
ax1.plot(kurucz.wavelength, kurucz_spec)
ax1.plot(aringer.wavelength / 10, aringer_spec)
# limits
ax1.set_xlim(700, 4000)
# axis labels
ax1.set_ylabel("Flux")
ax1.set_xlabel("Wavelength")
plt.subplots_adjust(wspace=0, hspace=0)
fig.savefig("Model_spectra_comparison.png", dpi=200, bbox_inches="tight")
plt.close()
@karllark How should we proceed in converting the fluxes between the spectra and interpolating them to overlapping wavelengths. Do we have functions already in place for this?
Not sure. You can look in the kurucz subdir to see (physicsmodel/stars). The spectra look very different. Are these for the same log(g), Teff?
fluxes are normalized and are in ergs/s/cm2/A versus ergs/s
Putting the script into somewhere in physicsmodel/stars would be great. Hopefully named something descriptive.
Even normalized, the shapes are different. And you didn't say if they were for the same log(g),Teff.
That might be why they look different. I didn't specify.