Skip to content

Reintroducing precomputed BC table support (photo_precompute mode)#967

Draft
nialljmiller wants to merge 4 commits intor25.12.1_colors_updatedfrom
r25.12.1_colors_legacy
Draft

Reintroducing precomputed BC table support (photo_precompute mode)#967
nialljmiller wants to merge 4 commits intor25.12.1_colors_updatedfrom
r25.12.1_colors_legacy

Conversation

@nialljmiller
Copy link
Copy Markdown
Collaborator

Closes #937

Adds a photo_precompute option 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 old color_file_names / color_num_colors workflow from r24.08.1 and prior.

When photo_precompute = .true., the module loads BC tables via the legacy mod_colors reader 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 pointing color_file_names at a local path (SED_Tools is yet to handle these sorts of files).

A new test suite custom_colors_legacy demonstrates 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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant