Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixed get_composition() bugs #190

Merged
merged 1 commit into from
Mar 21, 2024
Merged

Fixed get_composition() bugs #190

merged 1 commit into from
Mar 21, 2024

Conversation

kaylai
Copy link
Owner

@kaylai kaylai commented Mar 21, 2024

Bug existed where it was not possible to get a cation composition from a composition given in terms of oxides. This was fixed, and the order of checks during a call to get_composition() was changed to ensure this behavior does return a composition. A user is warned if they pass units not compatible with what they requested (e.g., they requested wtpt_oxides for the species "Si" which is a cation). Users are also warned if they asked for a cation or oxide that exists in VESIcal's core.oxides or core.cations but is not defined with a value in their Sample's composition. In this case, 0.0 is returned. Since the addition of this warning meant that warning showed up in a confusing way when calling the giordano viscosity model, that particular warning was silenced in the place where that warning would be generated. This was due to translations between FeO, Fe2O3, and FeOT. New unit tests were added for get_composition() calls, including checks to make sure users are warned as intended.

Bug existed where it was not possible to get a cation composition from a composition given in terms of oxides. This was fixed, and the order of checks during a call to get_composition() was changed to ensure this behavior does return a composition. A user is warned if they pass units not compatible with what they requested (e.g., they requested wtpt_oxides for the species "Si" which is a cation). Users are also warned if they asked for a cation or oxide that exists in VESIcal's core.oxides or core.cations but is not defined with a value in their Sample's composition. In this case, 0.0 is returned. Since the addition of this warning meant that warning showed up in a confusing way when calling the giordano viscosity model, that particular warning was silenced in the place where that warning would be generated. This was due to translations between FeO, Fe2O3, and FeOT. New unit tests were added for get_composition() calls, including checks to make sure users are warned as intended.
@kaylai kaylai merged commit ecc6103 into master Mar 21, 2024
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