[Mesa-users] Questions on new colors module

Niall Miller nmille39 at uwyo.edu
Mon Feb 23 19:07:02 UTC 2026


Hi all,

Thanks for the detailed bug report Ben, and to Andy and Eb for the responses -- this is very useful feedback.

I've addressed both issues directly in the colors module source and will be merging the changes to the main branch on github shortly.

On the path handling bug: the root cause was that mesa_dir was being unconditionally prepended to all instrument, stellar_atm, and vega_sed paths. I've implemented a resolve_path function in the module that now handles all three cases cleanly:

  - Paths beginning with ./ or ../ are treated as relative to your MESA work directory (the directory you run ./star from). This is the recommended approach for keeping user data self-contained and version-safe.
  - Paths beginning with / are treated as absolute paths if they exist on disk. The path is checked with "inquire(file=trim(path), exist=exists)" and if no path is found, the mesa_dir is prepended. So a missing absolute path will behave like a MESA-relative path, which preserves backwards compatibility.
  - Everything else (e.g. the built-in data/colors_data/... defaults) continues to resolve relative to $MESA_DIR as before.

So to directly answer Ben's original question, after this patch your work-directory-relative case will work as:

    instrument = './filters/Generic/selected/selected'

No modifications to $MESA_DIR required.

For the docs -- I've also expanded the colors module README to bring it in line with the documentation on my website. This is including full parameter descriptions, path resolution behaviour, and SED_Tools<https://github.com/nialljmiller/SED_Tools>. The GitHub issues Eb raised (#927, #928) should be resolved by this merge.

Cheers,
Niall Miller
University of Wyoming

________________________________
From: Mesa-users <mesa-users-bounces at lists.mesastar.org> on behalf of Benjamin Roulston via Mesa-users <mesa-users at lists.mesastar.org>
Sent: 23 February 2026 11:15
To: Farag, Ebraheem <ebraheem.farag at yale.edu>
Cc: Santarelli, Andy <andy.santarelli at yale.edu>; mesa-users at lists.mesastar.org <mesa-users at lists.mesastar.org>
Subject: Re: [Mesa-users] Questions on new colors module


◆ This message was sent from a non-UWYO address. Please exercise caution when clicking links or opening attachments from external sources.

Thanks Eb! That clears things up!

Cheers,
- Ben
Dr. Benjamin R. Roulston
Assistant Professor & Director of Reynolds Observatory
Department of Physics
Clarkson University
Box 5820  |  8 Clarkson Ave.  |  Potsdam, New York 13699
Science Center 251  |  1–315–268–2349  |  benjaminroulston.com<mailto:roulston at clarkson.edu>

On Feb 22, 2026, at 2:04 PM, Farag, Ebraheem <ebraheem.farag at yale.edu> wrote:

My apologies, a small correction:

"and then again in your local model directory:
./mk
./export
"

Should be

"
and then again in your local model directory:
./clean
./mk
"


-EbF
________________________________
From: Mesa-users <mesa-users-bounces at lists.mesastar.org> on behalf of Farag, Ebraheem via Mesa-users <mesa-users at lists.mesastar.org>
Sent: Sunday, February 22, 2026 2:00 PM
To: Santarelli, Andy <andy.santarelli at yale.edu>; Benjamin Roulston <broulsto at clarkson.edu>
Cc: mesa-users at lists.mesastar.org <mesa-users at lists.mesastar.org>
Subject: Re: [Mesa-users] Questions on new colors module

Hello Benjamin,

Glad to see you using the colors module, and thank you for the feedback! We aim to update MESA's COLORS documentation with the information provided on Nial's website!

In the meantime, relative paths to the instrument directory will not work.

To allow for a relative path, you'll have to modify these lines inside $MESA_DIR/colors to allow it:

./private/colors_history.f90:      filter_dir = trim(mesa_dir)//colors_settings%instrument
./private/colors_utils.f90:      filename = trim(mesa_dir)//trim(colors_settings%instrument)//"/"// &
./private/colors_utils.f90:                 trim(basename(colors_settings%instrument))

The first portion "trim(mesa_dir)//" likely needs removed to allow for your workflow.

(in $MESA_DIR/colors) follow this with:
./mk
./export

and then again in your local model directory:
./mk
./export

Hopefully this helps. However, if you're not comfortable modifying MESA, it's probably fine to put your data in the default colors data directory to circumvent these issues, unless you need it in a local relative path.

However, for the future, I have made an issues on the MESA github, for:
-adding the option for relative paths in the future.https://github.com/MESAHub/mesa/issues/927
-Additional colors documentation  https://github.com/MESAHub/mesa/issues/928

We will aim to address both of these issues prior to the next release. Thank you for your feedback!

----
Lastly, from your output "WARNING: Failed to find colors namelist in file: selected_colors_inlist", is indicating one of your inlists is does not have the colors controls listed inside. Perhaps checkout the $MESA_DIR/star/test_suite/custom_colors test_case for reference.

-EbF
________________________________
From: Mesa-users <mesa-users-bounces at lists.mesastar.org> on behalf of Benjamin Roulston via Mesa-users <mesa-users at lists.mesastar.org>
Sent: Saturday, February 21, 2026 11:50 PM
To: Santarelli, Andy <andy.santarelli at yale.edu>
Cc: mesa-users at lists.mesastar.org <mesa-users at lists.mesastar.org>
Subject: Re: [Mesa-users] Questions on new colors module

Hi Andy,

Glad to know this should be possible! Here’s an example of the issue I am having, if I use a full absolute path

instrument = "/Users/benjaminroulston/Desktop/MESA_dC_Results/cacc/filters/Generic/selected/selected"

The terminal error looks like
./star inlist
 reading user weak rate file /Users/benjaminroulston/Documents/MESA/MESA/mesa-r25.12.1/data/rates_data/rate_tables/S13_r_be7_wk_li7.h5
 version_number r25.12.1
 WARNING: Failed to find colors namelist in file: selected_colors_inlist
 Error: Could not open file/Users/benjaminroulston/Documents/MESA/MESA/mesa-r25.12.1/Users/benjaminroulston/Desktop/MESA_dC_Results/cacc/filters/Generic/selected/selected/selected

And if I use a relative path
instrument = "filters/Generic/selected/selected”

I get something similar
./star inlist
 reading user weak rate file /Users/benjaminroulston/Documents/MESA/MESA/mesa-r25.12.1/data/rates_data/rate_tables/S13_r_be7_wk_li7.h5
 version_number r25.12.1
 WARNING: Failed to find colors namelist in file: selected_colors_inlist
 Error: Could not open file/Users/benjaminroulston/Documents/MESA/MESA/mesa-r25.12.1filters/Generic/selected/selected/selected

And finally, another relative path
instrument = "./filters/Generic/selected/selected"
./star inlist
 reading user weak rate file /Users/benjaminroulston/Documents/MESA/MESA/mesa-r25.12.1/data/rates_data/rate_tables/S13_r_be7_wk_li7.h5
 version_number r25.12.1
 WARNING: Failed to find colors namelist in file: selected_colors_inlist
 Error: Could not open file/Users/benjaminroulston/Documents/MESA/MESA/mesa-r25.12.1./filters/Generic/selected/selected/selected

It really looks to me like it’s prepending the $MESA_DIR to the path given. I’ve attached my filters directory. It’s just a selection of the ones included with MESA, but I lumped a bunch together. If I put these in the $MESA_DIR/colors/data folder and use the default instrument path as given it works with no issues, so the code works for sure! I’m just struggling with the custom path.


Cheers,
- Ben
Dr. Benjamin R. Roulston
Assistant Professor & Director of Reynolds Observatory
Department of Physics
Clarkson University
Box 5820  |  8 Clarkson Ave.  |  Potsdam, New York 13699
Science Center 251  |  1–315–268–2349  |  benjaminroulston.com<mailto:roulston at clarkson.edu>

On Feb 21, 2026, at 12:21 PM, Andy Santarelli via Mesa-users <mesa-users at lists.mesastar.org> wrote:

Hi Ben,

You should be able to point to your filter directory via the instrument variable in the colors inlist as you stated, but you may need to add a file to your directory with the same name as the directory itself (e.g. my/filter/directory/JWST/JWST) containing a list of all of the filter filenames you wish to include. It is my understanding that MESA reads this file and then sorts through the filters using that information.

I had a similar problem a little while back and this resolved it, but please let me know if it does not and I would be willing to help further however I can.

As for your second point about documentation, I agree! It appears there are a few sections in the docs set up for more colors documentation, it just hasn't been transferred there yet.

Best,
Andy Santarelli

On Sat, Feb 21, 2026 at 7:00 AM <mesa-users-request at lists.mesastar.org<mailto:mesa-users-request at lists.mesastar.org>> wrote:
Send Mesa-users mailing list submissions to
        mesa-users at lists.mesastar.org<mailto:mesa-users at lists.mesastar.org>

To subscribe or unsubscribe via the World Wide Web, visit
        https://lists.mesastar.org/mailman/listinfo/mesa-users
or, via email, send a message with subject or body 'help' to
        mesa-users-request at lists.mesastar.org<mailto:mesa-users-request at lists.mesastar.org>

You can reach the person managing the list at
        mesa-users-owner at lists.mesastar.org<mailto:mesa-users-owner at lists.mesastar.org>

When replying, please edit your Subject line so it is more specific
than "Re: Contents of Mesa-users digest..."


Today's Topics:

   1. Questions on new colors module (Benjamin Roulston)


----------------------------------------------------------------------

Message: 1
Date: Fri, 20 Feb 2026 18:24:58 -0500
From: Benjamin Roulston <broulsto at clarkson.edu<mailto:broulsto at clarkson.edu>>
To: mesa-users at lists.mesastar.org<mailto:mesa-users at lists.mesastar.org>
Subject: [Mesa-users] Questions on new colors module
Message-ID: <9613C238-9E3A-4B90-9BF6-B66CCD64712F at clarkson.edu<mailto:9613C238-9E3A-4B90-9BF6-B66CCD64712F at clarkson.edu>>
Content-Type: text/plain; charset="utf-8"

Hi MESA friends,

I was so excited to see the new colors module in the latest release, so thank you for putting that together! I had a question (which may be a suggestion sorry).

With the new colors module, it seems so much easier to add our own filters (yay!). The documentation makes it seem as if we just simply point
instrument = '/data/colors_data/filters/Generic/Johnson?
To where our filters folder is and the filters will show up in the history data. However, as I?ve been working on this tonight, it looks as though this folder defaults to $MESA_DIR/$instrument

So to get our filters to work, we have to add files to $MESA_DIR. I?ve always treated the source code folder as something to not edit or add my own files to, since new versions will change and its better to keep all user defined files in the work directory of whatever job you?re working on.

Is there a way to get this instrument variable to be a relative path to the current work directory? Or an absolute path on disk? Or is this actually an intended feature that I am misunderstanding?

Also, Niall Miller who was the lead on this actually has really good documentation on his website (https://nialljmiller.com/projects/MESA_CC/custom_coloUrs.html). A lot of this is not on the MESA documentation for the colors module, which I think it would be great to get some of these details there!

 - MESA version: r25.12.1
 - MESA SDK VERSION: mesasdk-aarch64-macos-25.12.1
 - OS: macOS Tahoe 26.3

Cheers,
- Ben
Dr. Benjamin R. Roulston
Assistant Professor & Director of Reynolds Observatory
Department of Physics
Clarkson University
Box 5820  |  8 Clarkson Ave.  |  Potsdam, New York 13699
Science Center 251  |  1?315?268?2349  |  benjaminroulston.com<http://benjaminroulston.com/> <mailto:roulston at clarkson.edu<mailto:roulston at clarkson.edu>>

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20260220/a78e0172/attachment-0001.htm>

End of Mesa-users Digest, Vol 103, Issue 7
******************************************
_______________________________________________
mesa-users at lists.mesastar.org
https://lists.mesastar.org/mailman/listinfo/mesa-users

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.mesastar.org/pipermail/mesa-users/attachments/20260223/5b8eb287/attachment.htm>


More information about the Mesa-users mailing list