kaylai / VESIcal

A generalized python library for calculating and plotting various things related to mixed volatile (H2O-CO2) solubility in silicate melts.
MIT License
26 stars 9 forks source link

Non-reproducible Pressures for example dataset #185

Closed fboschetty closed 6 months ago

fboschetty commented 6 months ago

Hi all,

So I've calculated saturation pressures of the example dataset using the default model, magmasat, and found that the calculated pressures do not match those shown in https://vesical.readthedocs.io/en/latest/ex_satP.html#for-an-entire-dataset. They are close, less than 100 bars out, but I'm not sure whether I should be concerned or not. I've attached the output as a spreadsheet.

I'm using VESIcal 1.2.5..

Thanks,

Felix

test_out.xlsx

fboschetty commented 6 months ago

Here's my code and the input file.

import VESIcal as v
Path = "/Users/felixboschetty/Documents/Spyder/Melt Inclusion CO2/VESICal/example_data.xlsx"
myfile = v.BatchFile(Path)
data = myfile.get_data()

satPs = myfile.calculate_saturation_pressure(temperature=925.)
myfile.save_excel("test_out.xlsx", calculations=[satPs])

example_data.xlsx

PennyWieser commented 6 months ago

Felix - I think this may a be a situation of older documentation (@kaylai?) possibly before we changed the default normalization (happened during the manuscript release)? I reran on the enki server and also got the same Sat Ps as Felix, so it isnt a thermoengine version issue.

I reran the VESical 2 magmasat calculations and they came out the same as they did when we wrote that paper.

I also ran the magmasat unit tests for sanity in the enki server and they are also fine.

Kayla the file that felix is getting pressures from is here: https://vesical.readthedocs.io/en/latest/ex_satP.html. the file was last edited in 2022 but not sure when the cell was actually last ran?

kaylai commented 6 months ago

Hi all, I'm finding the same issue with some other reruns of data from the manuscript I am doing. Similarly to Felix's findings, the pressures I'm getting are close but not exactly the same. I'm going to run everything again using the version of the code that we snapshotted for the publication of the manuscript (v.1.0.1) and then with the current version and see if the change happened in between those times.

We did tweak the normalization behavior during review, so maybe it's that?

We implemented unit tests only during review, so if any of these data were generated during/pre review, any changes in the results might have been missed.

kaylai commented 6 months ago

Hi all, this is indeed an issue where we had run the notebooks with an earlier version of the code and generated docs from those old runs. I've fixed those now as well as adding in new testing routines to ensure that the content of the manuscript and docs match the most current version of VESIcal. Closing this issue as I have merged into main and docs are recompiled. Thanks for flagging this!