Reintroducing precomputed BC table support (photo_precompute mode)#967
Draft
nialljmiller wants to merge 4 commits intor25.12.1_colors_updatedfrom
Draft
Reintroducing precomputed BC table support (photo_precompute mode)#967nialljmiller wants to merge 4 commits intor25.12.1_colors_updatedfrom
nialljmiller wants to merge 4 commits intor25.12.1_colors_updatedfrom
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #937
Adds a
photo_precomputeoption to the colors namelist that allows users to read pre-computed bolometric correction tables directly, bypassing the on-the-fly SED convolution introduced in the colors overhaul. This restores backwards compatibility for users who were relying on the oldcolor_file_names/color_num_colorsworkflow from r24.08.1 and prior.When
photo_precompute = .true., the module loads BC tables via the legacymod_colorsreader and interpolates over Teff, log g, and [Fe/H] using the existing tri-linear scheme. The on-the-fly atmosphere/filter pipeline is skipped entirely.The precomputed BC tables shipped with MESA (
lcb98cor.dat,blackbody_johnson.dat) are now located at$MESA_DIR/data/colors_data/photo_precompute/. Users can also supply their own tables in the same format by pointingcolor_file_namesat a local path (SED_Tools is yet to handle these sorts of files).A new test suite
custom_colors_legacydemonstrates the mode using the LCB98 Johnson-Cousins tables for a 7 Msun evolution through the blue loop.Note: as discussed in #937, interpolating pre-computed BC tables is not equivalent to interpolating spectra and then convolving. So the on-the-fly approach is more accurate and remains the default. This mode is provided for legacy compatibility and for cases where atmosphere models are unavailable.