Skip to content

Comments

Create a MIST interpolation interface, replace isochrones#184

Merged
TomWagg merged 18 commits intomainfrom
mist
Jan 29, 2026
Merged

Create a MIST interpolation interface, replace isochrones#184
TomWagg merged 18 commits intomainfrom
mist

Conversation

@TomWagg
Copy link
Owner

@TomWagg TomWagg commented Jan 29, 2026

This pull request introduces significant improvements to the handling of photometric calculations in the codebase, focusing on the integration and use of MIST bolometric correction grids. The main changes include the addition of a new module for managing MIST bolometric corrections, updates to the photometry interface to support more flexible and modern filter naming, and general modernization and cleanup of dependencies and imports. These changes improve both the scientific accuracy and the usability of the code when working with stellar populations and their observable properties.

Photometry and Observables Modernization:

  • Added a new module cogsworth/obs/mist.py implementing the MISTBolometricCorrectionGrid class, which handles downloading, caching, and interpolating MIST bolometric correction grids for a wide range of photometric systems and bands. This replaces the previous dependency on the external isochrones package for this functionality.
  • Updated the get_photometry function (now in cogsworth/obs/observables.py) to use the new MISTBolometricCorrectionGrid class, added parameters for specifying the main filter and silencing out-of-bounds warnings, and improved handling of filter naming and interpolation. [1] [2] [3] [4] [5]
  • Changed default filter names throughout the codebase to use modern, explicit names (e.g., "Gaia_G_EDR3" instead of "G"), including in the plot_cmd function and get_gaia_observed_bin_nums method. [1] [2] [3]

Code Organization and Import Updates:

  • Renamed the observables.py module to obs/observables.py and updated all imports to reflect this new structure, improving code organization and clarity. [1] [2]

Infrastructure and Dependency Updates:

  • Added caching of MIST data in the GitHub Actions workflow to speed up CI runs.
  • Updated the Python version used in documentation builds from 3.10 to 3.11 and removed a now-unnecessary install step for the isochrones package, reflecting the new internal handling of bolometric corrections.

Versioning:

  • Bumped the package version from 3.5.1 to 3.6.0 to reflect these substantial changes.

@TomWagg TomWagg self-assigned this Jan 29, 2026
@TomWagg TomWagg added the enhancement New feature or request label Jan 29, 2026
@codecov
Copy link

codecov bot commented Jan 29, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.90%. Comparing base (d210790) to head (f9c6006).
⚠️ Report is 21 commits behind head on main.

Additional details and impacted files
@@             Coverage Diff             @@
##              main     #184      +/-   ##
===========================================
- Coverage   100.00%   99.90%   -0.10%     
===========================================
  Files           15       16       +1     
  Lines         2077     2208     +131     
===========================================
+ Hits          2077     2206     +129     
- Misses           0        2       +2     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@TomWagg TomWagg merged commit 269aa14 into main Jan 29, 2026
2 of 3 checks passed
@TomWagg TomWagg deleted the mist branch January 29, 2026 03:17
@adrn
Copy link
Collaborator

adrn commented Jan 29, 2026

PS: if you wanted to spin this new code off into a new small package, I know some people who would use it!!

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants