Skip to content

Conversation

@bobmyhill
Copy link
Member

This pull request introduces support for compositional degrees of freedom in thermobarometric inversion, allowing mineral phases to vary their site occupancies during optimization for a better fit. It also refactors how site occupancies are represented and printed, adds new options to the site_formula method for Solution instances, and updates example scripts and tests to demonstrate and verify these new capabilities.

Major changes:

  • Added support for free compositional vectors in the estimate_conditions function, enabling optimization over both P-T and compositional parameters. Phases can now have a free_compositional_vectors attribute, which is used to adjust their compositions during fitting. The optimization routine and parameter counting are updated accordingly.
  • Changed the site_occupancies property in solution.py to return a flat numpy array instead of a list of dicts. The site_formula method now accepts precision, absent species printing, and custom site occupancies, making it more flexible for reporting and analysis.
  • Updated example_optimal_thermobarometry.py to demonstrate how to use free compositional vectors for minerals like biotite and ilmenite, and improved output formatting for site occupancies and compositions, including more readable site names.
  • Added new tests for the updated site_formula method, covering custom precision, absent species, and custom site occupancies. Also added a test for the new compositional vector optimization in thermobarometry.

@bobmyhill bobmyhill merged commit a6f4dd0 into geodynamics:main Nov 5, 2025
12 checks passed
@bobmyhill bobmyhill deleted the avPT_w_free_c_vectors branch November 5, 2025 23:01
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