Skip to content

Conversation

@bobmyhill
Copy link
Member

@bobmyhill bobmyhill commented Nov 6, 2025

This pull request modularizes the code for thermobarometric inversion in burnman.tools.thermobarometry, extracting reusable functions for reaction matrix construction, assemblage state setting, and affinity misfit calculation from the estimate_conditions function.

Summary of changes:

  • Added get_reaction_matrix, assemblage_set_state_from_params, and assemblage_affinity_misfit functions to encapsulate core steps in thermobarometric inversion, improving code reuse and clarity.
  • Refactored the main estimate_conditions function to use these new utilities, streamline the optimization logic, and support optional priors on pressure and temperature via condition_priors and condition_covariances arguments.
  • Updated the example script to import and utilize the new modular functions, and added a diagnostic plot showing how the reduced chi-squared misfit varies with compositional degrees of freedom, aiding in model interpretation and debugging.

@bobmyhill bobmyhill force-pushed the refactor_avPT branch 5 times, most recently from b096cfb to 9470991 Compare November 7, 2025 17:04
@bobmyhill bobmyhill merged commit 3317fd9 into geodynamics:main Nov 7, 2025
11 of 12 checks passed
@bobmyhill bobmyhill deleted the refactor_avPT branch November 7, 2025 17:23
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