Skip to content

Metallicity mismatch in colors module #938

@JakeBHassan

Description

@JakeBHassan

Hi, I attempted to use the colors module to produce a spectrum for a zero-metallicity star. However, when I manually produced the spectrum from ATLAS models (using the same Teff and log(g)), I noticed the MESA colors one much more closely matched a solar-metallicity model than it did a low-metallicity model.

Image

I believe this may be a bug in the colors module. The data_for_colors_history_columns function in mesa_dir/star/private/history.f90 uses Zbase, and passes it through several functions. It eventually reaches the find_interval function in mesa_dir/colors/private/hermite_interp.f90, which compares it to z_grid. If my understanding is correct, z_grid may refer to [Fe/H], whereas Zbase is the metal fraction. Consequently, setting Zbase to 0 would match it with [Fe/H] = 0 (i.e. solar metallicity).

If this is indeed the problem, Zbase would have to be converted to [Fe/H] first. There is also a check for metallicity >= 0 in the data_for_colors_history_columns function of mesa_dir/colors/private/colors_history.f90, so that may also need to be changed if it uses [Fe/H].

Metadata

Metadata

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions