beast icon indicating copy to clipboard operation
beast copied to clipboard

Implementing AGB models

Open s-goldman opened this issue 5 years ago • 44 comments

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.

s-goldman avatar Dec 04 '20 14:12 s-goldman

@karllark I'm assuming we need some color or magnitude cut that may depend on the users photometric filter?

s-goldman avatar Dec 04 '20 15:12 s-goldman

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.

karllark avatar Dec 04 '20 15:12 karllark

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!).

karllark avatar Dec 04 '20 15:12 karllark

The current models have ['Z', 'logz', 'logT', 'Teff', 'Reff', 'logg']

s-goldman avatar Dec 04 '20 15:12 s-goldman

But there are is more info (I think) in the downloaded isochrone file.

karllark avatar Dec 04 '20 15:12 karllark

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.

s-goldman avatar Dec 04 '20 15:12 s-goldman

The columns for /astro/mboyer/Science/BEAST/Aringer.AGB.grid.fits are the ones I mentioned.

s-goldman avatar Dec 04 '20 15:12 s-goldman

The Aringer/Colibri models are also non-uniform with respect to metallicity: beast_z_10 beast_z_9 beast_z_7 beast_z_0 beast_z_4 beast_z_2 beast_z_11 beast_z_8 beast_z_12 beast_z_6 beast_z_5 beast_z_1 beast_z_3

s-goldman avatar Dec 04 '20 15:12 s-goldman

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?

karllark avatar Dec 04 '20 16:12 karllark

The Kurucz models are the same across each of the 8 metallicities and look like this: beast_z_3

s-goldman avatar Dec 04 '20 18:12 s-goldman

So there is some overlap

s-goldman avatar Dec 04 '20 18:12 s-goldman

Plot?

karllark avatar Dec 04 '20 18:12 karllark

For example: beast_z_11 Aringer in red, Kurucz in blue

s-goldman avatar Dec 04 '20 18:12 s-goldman

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.

karllark avatar Dec 04 '20 18:12 karllark

When you say

We checked that Tlusty and Kurucz spectra were the same in the overlap region.

What do you mean the same?

s-goldman avatar Dec 04 '20 18:12 s-goldman

If you plot the spectra for the same log(g)/Teff/metallicity from Kurucz and Aringer, do they overlap/look the same?

karllark avatar Dec 04 '20 18:12 karllark

Got it, thanks. Is there an easy way to generate the spectra other than through stellib.Kurucz() ?

s-goldman avatar Dec 04 '20 18:12 s-goldman

Not sure. It's been too long. ;-)

karllark avatar Dec 04 '20 19:12 karllark

No worries, I think i've found a way

s-goldman avatar Dec 04 '20 19:12 s-goldman

The flux units for Kurucz and Aringer seem different.

s-goldman avatar Dec 04 '20 19:12 s-goldman

Two example spectra for T=3800

Kurucz: Kurucz

s-goldman avatar Dec 04 '20 19:12 s-goldman

Aringer: aringer2

s-goldman avatar Dec 04 '20 19:12 s-goldman

Kurucz fluxes in ergs/s/cm2/A Kurucz wavelengths in nm

Aringer fluxes in (ν · Lν [erg/s]). Aringer wavelengths in Angstrom

s-goldman avatar Dec 04 '20 20:12 s-goldman

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()

s-goldman avatar Dec 04 '20 20:12 s-goldman

@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?

s-goldman avatar Dec 04 '20 20:12 s-goldman

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?

karllark avatar Dec 04 '20 20:12 karllark

fluxes are normalized and are in ergs/s/cm2/A versus ergs/s

s-goldman avatar Dec 04 '20 20:12 s-goldman

Putting the script into somewhere in physicsmodel/stars would be great. Hopefully named something descriptive.

karllark avatar Dec 04 '20 20:12 karllark

Even normalized, the shapes are different. And you didn't say if they were for the same log(g),Teff.

karllark avatar Dec 04 '20 20:12 karllark

That might be why they look different. I didn't specify.

s-goldman avatar Dec 04 '20 20:12 s-goldman