#!pip install Thermobar
import numpy as np
import pandas as pd
import matplotlib.pyplot as plt
import Thermobar as pt
pd.options.display.max_columns = None
out=pt.import_excel('Two_pyroxene_input.xlsx', sheet_name="Paired_Cpx_Opx")
# This extracts a dataframe of all inputs
my_input=out['my_input']
# This extracts a dataframe of cpx compositions from the dictionary "out"
Cpxs=out['Cpxs']
# This extracts a dataframe of opx compositions from the dictionary "out"
Opxs=out['Opxs']
# Check the outputs to make sure there are no columns of zeros where you expect numbers
display(Cpxs.head())
display(Opxs.head())
SiO2_Cpx | TiO2_Cpx | Al2O3_Cpx | FeOt_Cpx | MnO_Cpx | MgO_Cpx | CaO_Cpx | Na2O_Cpx | K2O_Cpx | Cr2O3_Cpx | Sample_ID_Cpx | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 52.30 | 0.70 | 3.00 | 5.10 | 0.11 | 16.60 | 21.50 | 0.33 | 0 | 0.58 | 0 |
1 | 51.70 | 0.28 | 8.38 | 6.69 | 0.15 | 21.40 | 11.70 | 0.64 | 0 | 0.05 | 1 |
2 | 51.50 | 0.45 | 8.10 | 6.96 | 0.17 | 20.30 | 12.60 | 0.56 | 0 | 0.09 | 2 |
3 | 51.06 | 0.62 | 3.16 | 6.18 | 0.12 | 15.78 | 20.82 | 0.27 | 0 | 0.01 | 3 |
4 | 53.32 | 0.48 | 2.25 | 5.92 | 0.15 | 16.91 | 20.73 | 0.28 | 0 | 0.12 | 4 |
SiO2_Opx | TiO2_Opx | Al2O3_Opx | FeOt_Opx | MnO_Opx | MgO_Opx | CaO_Opx | Na2O_Opx | K2O_Opx | Cr2O3_Opx | Sample_ID_Opx | |
---|---|---|---|---|---|---|---|---|---|---|---|
0 | 55.00 | 0.34 | 1.50 | 11.30 | 0.24 | 30.70 | 0.90 | 0.01 | 0 | 0.19 | 0 |
1 | 52.70 | 0.15 | 8.10 | 8.48 | 0.14 | 29.40 | 2.14 | 0.14 | 0 | 0.00 | 1 |
2 | 53.20 | 0.20 | 7.40 | 8.80 | 0.13 | 29.20 | 2.37 | 0.14 | 0 | 0.02 | 2 |
3 | 55.15 | 0.17 | 1.19 | 10.21 | 0.22 | 29.99 | 1.66 | 0.03 | 0 | 0.15 | 3 |
4 | 56.32 | 0.13 | 1.41 | 10.17 | 0.26 | 30.88 | 1.05 | 0.02 | 0 | 0.16 | 4 |
help(pt.calculate_cpx_opx_press)
Help on function calculate_cpx_opx_press in module Thermobar.two_pyroxene: calculate_cpx_opx_press(*, cpx_comps=None, opx_comps=None, Two_Px_Match=None, equationP=None, eq_tests=False, T=None) calculates pressure in kbar for Opx-Cpx pairs The function requires inputs of cpx_comps and opx_comps, or input of a combined dataframe of cpx-opx compositions (this is used for the calculate_cpx_opx_press_temp_matching function) Parameters ----------- cpx_comps: pandas.DataFrame Clinopyroxene compositions with column headings SiO2_Cpx, MgO_Cpx etc. opx_comps: pandas.DataFrame Opx compositions with column headings SiO2_Opx, MgO_Opx etc. Two_Px_Match: pandas.DataFrame Combined Cpx-Opx compositions instead of separate dataframes. Used for calculate Cpx_Opx_press_temp_matching function. equationP: str Choose from: | P_Put2008_eq38 (T-independent) | P_Put2008_eq39 (T-dependent) T: float, int, pd.Series, str ("Solve") Temperature in Kelvin to perform calculations at. Only needed for T-sensitive barometers. If T="Solve", returns a partial function. Else, enter an integer, float, or panda series. eq_tests: bool If False, just returns temperature in K (default) as a panda series. If True, returns pressure in kbar, Kd Fe-Mg for opx-cpx, and the user-entered cpx and opx comps as a panda dataframe. Returns ------- If eq_tests is False pandas.Series: Pressure in kbar If eq_tests is True pandas.DataFrame: Pressure in kbar + Kd-Fe-Mg + cpx+opx comps
help(pt.P_Put2008_eq38)
Help on function P_Put2008_eq38 in module Thermobar.two_pyroxene: P_Put2008_eq38(T=None, *, Na_Opx_cat_6ox, Al_IV_Opx_cat_6ox, Al_VI_Opx_cat_6ox, Ti_Opx_cat_6ox, Ca_Opx_cat_6ox, Cr_Opx_cat_6ox, Mg_Opx_cat_6ox, Fet_Opx_cat_6ox, Mn_Opx_cat_6ox, Ca_Cpx_cat_6ox, Fm2Si2O6, En_Opx, Di_Opx) Two pyroxene barometer of Putirka (2008) Eq38. Calibrated on Mg#-rich systems (>0.75) :cite:`putirka2008thermometers` | SEE=+-3.7 kbar
P_Eq38=pt.calculate_cpx_opx_press(opx_comps=Opxs, cpx_comps=Cpxs, equationP="P_Put2008_eq38")
P_Eq38.head() # Head shows the first 5 results
0 2.187907 1 16.535654 2 14.450339 3 2.380005 4 4.099411 dtype: float64
P_Eq38_EqTests=pt.calculate_cpx_opx_press(opx_comps=Opxs, cpx_comps=Cpxs,
equationP="P_Put2008_eq38", eq_tests=True)
P_Eq38_EqTests.head()
P_kbar_calc | High T Kd Eq? | Equation Choice (P) | Low T Kd Eq? | SiO2_Cpx | TiO2_Cpx | Al2O3_Cpx | FeOt_Cpx | MnO_Cpx | MgO_Cpx | CaO_Cpx | Na2O_Cpx | K2O_Cpx | Cr2O3_Cpx | Sample_ID_Cpx | Si_Cpx_cat_6ox | Mg_Cpx_cat_6ox | Fet_Cpx_cat_6ox | Ca_Cpx_cat_6ox | Al_Cpx_cat_6ox | Na_Cpx_cat_6ox | K_Cpx_cat_6ox | Mn_Cpx_cat_6ox | Ti_Cpx_cat_6ox | Cr_Cpx_cat_6ox | oxy_renorm_factor | Al_IV_cat_6ox | Al_VI_cat_6ox | En_Simple_MgFeCa_Cpx | Fs_Simple_MgFeCa_Cpx | Wo_Simple_MgFeCa_Cpx | Cation_Sum_Cpx | Ca_CaMgFe | Lindley_Fe3_Cpx | Lindley_Fe2_Cpx | Lindley_Fe3_Cpx_prop | CrCaTs | a_cpx_En | Mgno_Cpx | Jd | Jd_from 0=Na, 1=Al | CaTs | CaTi | DiHd_1996 | EnFs | DiHd_2003 | Di_Cpx | FeIII_Wang21 | FeII_Wang21 | SiO2_Opx | TiO2_Opx | Al2O3_Opx | FeOt_Opx | MnO_Opx | MgO_Opx | CaO_Opx | Na2O_Opx | K2O_Opx | Cr2O3_Opx | Sample_ID_Opx | Si_Opx_cat_6ox | Mg_Opx_cat_6ox | Fet_Opx_cat_6ox | Ca_Opx_cat_6ox | Al_Opx_cat_6ox | Na_Opx_cat_6ox | K_Opx_cat_6ox | Mn_Opx_cat_6ox | Ti_Opx_cat_6ox | Cr_Opx_cat_6ox | oxy_renorm_factor_opx | Al_IV_Opx_cat_6ox | Al_VI_Opx_cat_6ox | Si_Ti_Opx_cat_6ox | En_Simple_MgFeCa_Opx | Fs_Simple_MgFeCa_Opx | Wo_Simple_MgFeCa_Opx | Cation_Sum_Opx | Ca_CaMgFe | NaAlSi2O6 | FmTiAlSiO6 | CrAl2SiO6 | FmAl2SiO6 | CaFmSi2O6 | Fm2Si2O6 | En_Opx | Di_Opx | Mgno_OPX | En | Kd_Fe_Mg_Cpx_Opx | Lindley_Fe3_Opx | a_Di_cpx | Kf | a_En_opx_mod | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 2.187907 | N | P_Put2008_eq38 | Y | 52.30 | 0.70 | 3.00 | 5.10 | 0.11 | 16.60 | 21.50 | 0.33 | 0 | 0.58 | 0 | 1.912184 | 0.904784 | 0.155939 | 0.842247 | 0.129273 | 0.023393 | 0.0 | 0.003406 | 0.019251 | 0.016765 | 0.0 | 0.087816 | 0.041457 | 0.475459 | 0.081945 | 0.442596 | 4.007242 | 0.442596 | 0.014485 | 0.141454 | 0.092887 | 0.008383 | 0.122977 | 0.852984 | 0.023393 | 0 | 0.018064 | 0.034876 | 0.780925 | 0.139899 | 0.780925 | 0.663987 | 0.014485 | 0.141454 | 55.00 | 0.34 | 1.50 | 11.30 | 0.24 | 30.70 | 0.90 | 0.01 | 0 | 0.19 | 0 | 1.943665 | 1.617356 | 0.333959 | 0.034078 | 0.062475 | 0.000685 | 0.0 | 0.007184 | 0.009038 | 0.005308 | 0.0 | 0.056335 | 0.006140 | 1.952703 | 0.814628 | 0.168208 | 0.017164 | 4.013748 | 0.017164 | 0.000685 | 0.009038 | 0.005308 | 0.000146 | 0.034078 | 0.957618 | 0.790815 | 0.028142 | 0.828850 | 0.871733 | 0.834684 | 0.027496 | 0.604991 | 0.216022 | 0.645067 |
1 | 16.535654 | Y | P_Put2008_eq38 | Y | 51.70 | 0.28 | 8.38 | 6.69 | 0.15 | 21.40 | 11.70 | 0.64 | 0 | 0.05 | 1 | 1.830350 | 1.129447 | 0.198073 | 0.443816 | 0.349659 | 0.043931 | 0.0 | 0.004498 | 0.007456 | 0.001399 | 0.0 | 0.169650 | 0.180009 | 0.637624 | 0.111821 | 0.250554 | 4.008630 | 0.250554 | 0.017260 | 0.180814 | 0.087138 | 0.000700 | 0.411086 | 0.850790 | 0.043931 | 0 | 0.136078 | 0.016786 | 0.290252 | 0.518634 | 0.290252 | 0.246111 | 0.017260 | 0.180814 | 52.70 | 0.15 | 8.10 | 8.48 | 0.14 | 29.40 | 2.14 | 0.14 | 0 | 0.00 | 1 | 1.823396 | 1.516444 | 0.245370 | 0.079334 | 0.330303 | 0.009392 | 0.0 | 0.004103 | 0.003904 | 0.000000 | 0.0 | 0.176604 | 0.153699 | 1.827300 | 0.823640 | 0.133270 | 0.043089 | 4.012245 | 0.043089 | 0.009392 | 0.003904 | 0.000000 | 0.144307 | 0.079334 | 0.769186 | 0.660522 | 0.068126 | 0.860725 | 0.678544 | 1.083837 | 0.024489 | 0.386810 | 0.142639 | 0.569045 |
2 | 14.450339 | Y | P_Put2008_eq38 | Y | 51.50 | 0.45 | 8.10 | 6.96 | 0.17 | 20.30 | 12.60 | 0.56 | 0 | 0.09 | 2 | 1.835204 | 1.078405 | 0.207416 | 0.481084 | 0.340188 | 0.038691 | 0.0 | 0.005131 | 0.012062 | 0.002536 | 0.0 | 0.164796 | 0.175393 | 0.610336 | 0.117390 | 0.272275 | 4.000717 | 0.272275 | 0.001435 | 0.205981 | 0.006917 | 0.001268 | 0.388642 | 0.838685 | 0.038691 | 0 | 0.136701 | 0.014047 | 0.329068 | 0.478377 | 0.329068 | 0.274889 | 0.001435 | 0.205981 | 53.20 | 0.20 | 7.40 | 8.80 | 0.13 | 29.20 | 2.37 | 0.14 | 0 | 0.02 | 2 | 1.839965 | 1.505530 | 0.254529 | 0.087825 | 0.301638 | 0.009388 | 0.0 | 0.003808 | 0.005203 | 0.000547 | 0.0 | 0.160035 | 0.141603 | 1.845168 | 0.814732 | 0.137741 | 0.047527 | 4.008433 | 0.047527 | 0.009388 | 0.005203 | 0.000547 | 0.131669 | 0.087825 | 0.769585 | 0.656871 | 0.074962 | 0.855382 | 0.674378 | 1.137662 | 0.016867 | 0.412205 | 0.169248 | 0.562463 |
3 | 2.380005 | Y | P_Put2008_eq38 | Y | 51.06 | 0.62 | 3.16 | 6.18 | 0.12 | 15.78 | 20.82 | 0.27 | 0 | 0.01 | 3 | 1.914576 | 0.882079 | 0.193792 | 0.836461 | 0.139648 | 0.019629 | 0.0 | 0.003811 | 0.017487 | 0.000296 | 0.0 | 0.085424 | 0.054224 | 0.461258 | 0.101338 | 0.437404 | 4.007780 | 0.437404 | 0.015559 | 0.178233 | 0.080287 | 0.000148 | 0.132428 | 0.819869 | 0.019629 | 0 | 0.034595 | 0.025415 | 0.776303 | 0.149784 | 0.776303 | 0.634224 | 0.015559 | 0.178233 | 55.15 | 0.17 | 1.19 | 10.21 | 0.22 | 29.99 | 1.66 | 0.03 | 0 | 0.15 | 3 | 1.968730 | 1.595973 | 0.304805 | 0.063492 | 0.050066 | 0.002076 | 0.0 | 0.006652 | 0.004565 | 0.004233 | 0.0 | 0.031270 | 0.018796 | 1.973295 | 0.812502 | 0.155175 | 0.032324 | 4.000594 | 0.032324 | 0.002076 | 0.004565 | 0.004233 | 0.012486 | 0.063492 | 0.913443 | 0.764291 | 0.053125 | 0.839637 | 0.812807 | 1.150356 | 0.001187 | 0.601746 | 0.388240 | 0.636705 |
4 | 4.099411 | Y | P_Put2008_eq38 | Y | 53.32 | 0.48 | 2.25 | 5.92 | 0.15 | 16.91 | 20.73 | 0.28 | 0 | 0.12 | 4 | 1.947746 | 0.920861 | 0.180851 | 0.811362 | 0.096868 | 0.019831 | 0.0 | 0.004641 | 0.013189 | 0.003466 | 0.0 | 0.052254 | 0.044614 | 0.481352 | 0.094534 | 0.424114 | 3.998814 | 0.424114 | 0.000000 | 0.180851 | 0.000000 | 0.001733 | 0.158665 | 0.835841 | 0.019831 | 0 | 0.024783 | 0.013736 | 0.771110 | 0.165301 | 0.771110 | 0.641826 | -0.002372 | 0.183222 | 56.32 | 0.13 | 1.41 | 10.17 | 0.26 | 30.88 | 1.05 | 0.02 | 0 | 0.16 | 4 | 1.971271 | 1.611274 | 0.297687 | 0.039377 | 0.058165 | 0.001357 | 0.0 | 0.007708 | 0.003423 | 0.004427 | 0.0 | 0.028729 | 0.029435 | 1.974693 | 0.826999 | 0.152790 | 0.020211 | 3.994689 | 0.020211 | 0.001357 | 0.003423 | 0.004427 | 0.023651 | 0.039377 | 0.925110 | 0.777706 | 0.033103 | 0.844054 | 0.829605 | 1.063003 | 0.000000 | 0.585107 | 0.208745 | 0.652532 |
P_Eq38_EqTests_Filt=P_Eq38_EqTests.loc[P_Eq38_EqTests['High T Kd Eq?']=="Y"]
P_Eq38_EqTests_Filt.head()
P_kbar_calc | High T Kd Eq? | Equation Choice (P) | Low T Kd Eq? | SiO2_Cpx | TiO2_Cpx | Al2O3_Cpx | FeOt_Cpx | MnO_Cpx | MgO_Cpx | CaO_Cpx | Na2O_Cpx | K2O_Cpx | Cr2O3_Cpx | Sample_ID_Cpx | Si_Cpx_cat_6ox | Mg_Cpx_cat_6ox | Fet_Cpx_cat_6ox | Ca_Cpx_cat_6ox | Al_Cpx_cat_6ox | Na_Cpx_cat_6ox | K_Cpx_cat_6ox | Mn_Cpx_cat_6ox | Ti_Cpx_cat_6ox | Cr_Cpx_cat_6ox | oxy_renorm_factor | Al_IV_cat_6ox | Al_VI_cat_6ox | En_Simple_MgFeCa_Cpx | Fs_Simple_MgFeCa_Cpx | Wo_Simple_MgFeCa_Cpx | Cation_Sum_Cpx | Ca_CaMgFe | Lindley_Fe3_Cpx | Lindley_Fe2_Cpx | Lindley_Fe3_Cpx_prop | CrCaTs | a_cpx_En | Mgno_Cpx | Jd | Jd_from 0=Na, 1=Al | CaTs | CaTi | DiHd_1996 | EnFs | DiHd_2003 | Di_Cpx | FeIII_Wang21 | FeII_Wang21 | SiO2_Opx | TiO2_Opx | Al2O3_Opx | FeOt_Opx | MnO_Opx | MgO_Opx | CaO_Opx | Na2O_Opx | K2O_Opx | Cr2O3_Opx | Sample_ID_Opx | Si_Opx_cat_6ox | Mg_Opx_cat_6ox | Fet_Opx_cat_6ox | Ca_Opx_cat_6ox | Al_Opx_cat_6ox | Na_Opx_cat_6ox | K_Opx_cat_6ox | Mn_Opx_cat_6ox | Ti_Opx_cat_6ox | Cr_Opx_cat_6ox | oxy_renorm_factor_opx | Al_IV_Opx_cat_6ox | Al_VI_Opx_cat_6ox | Si_Ti_Opx_cat_6ox | En_Simple_MgFeCa_Opx | Fs_Simple_MgFeCa_Opx | Wo_Simple_MgFeCa_Opx | Cation_Sum_Opx | Ca_CaMgFe | NaAlSi2O6 | FmTiAlSiO6 | CrAl2SiO6 | FmAl2SiO6 | CaFmSi2O6 | Fm2Si2O6 | En_Opx | Di_Opx | Mgno_OPX | En | Kd_Fe_Mg_Cpx_Opx | Lindley_Fe3_Opx | a_Di_cpx | Kf | a_En_opx_mod | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
1 | 16.535654 | Y | P_Put2008_eq38 | Y | 51.70 | 0.28 | 8.38 | 6.69 | 0.15 | 21.40 | 11.70 | 0.64 | 0 | 0.05 | 1 | 1.830350 | 1.129447 | 0.198073 | 0.443816 | 0.349659 | 0.043931 | 0.0 | 0.004498 | 0.007456 | 0.001399 | 0.0 | 0.169650 | 0.180009 | 0.637624 | 0.111821 | 0.250554 | 4.008630 | 0.250554 | 0.017260 | 0.180814 | 0.087138 | 0.000700 | 0.411086 | 0.850790 | 0.043931 | 0 | 0.136078 | 0.016786 | 0.290252 | 0.518634 | 0.290252 | 0.246111 | 0.017260 | 0.180814 | 52.70 | 0.15 | 8.10 | 8.48 | 0.14 | 29.40 | 2.14 | 0.14 | 0 | 0.00 | 1 | 1.823396 | 1.516444 | 0.245370 | 0.079334 | 0.330303 | 0.009392 | 0.0 | 0.004103 | 0.003904 | 0.000000 | 0.0 | 0.176604 | 0.153699 | 1.827300 | 0.823640 | 0.133270 | 0.043089 | 4.012245 | 0.043089 | 0.009392 | 0.003904 | 0.000000 | 0.144307 | 0.079334 | 0.769186 | 0.660522 | 0.068126 | 0.860725 | 0.678544 | 1.083837 | 0.024489 | 0.386810 | 0.142639 | 0.569045 |
2 | 14.450339 | Y | P_Put2008_eq38 | Y | 51.50 | 0.45 | 8.10 | 6.96 | 0.17 | 20.30 | 12.60 | 0.56 | 0 | 0.09 | 2 | 1.835204 | 1.078405 | 0.207416 | 0.481084 | 0.340188 | 0.038691 | 0.0 | 0.005131 | 0.012062 | 0.002536 | 0.0 | 0.164796 | 0.175393 | 0.610336 | 0.117390 | 0.272275 | 4.000717 | 0.272275 | 0.001435 | 0.205981 | 0.006917 | 0.001268 | 0.388642 | 0.838685 | 0.038691 | 0 | 0.136701 | 0.014047 | 0.329068 | 0.478377 | 0.329068 | 0.274889 | 0.001435 | 0.205981 | 53.20 | 0.20 | 7.40 | 8.80 | 0.13 | 29.20 | 2.37 | 0.14 | 0 | 0.02 | 2 | 1.839965 | 1.505530 | 0.254529 | 0.087825 | 0.301638 | 0.009388 | 0.0 | 0.003808 | 0.005203 | 0.000547 | 0.0 | 0.160035 | 0.141603 | 1.845168 | 0.814732 | 0.137741 | 0.047527 | 4.008433 | 0.047527 | 0.009388 | 0.005203 | 0.000547 | 0.131669 | 0.087825 | 0.769585 | 0.656871 | 0.074962 | 0.855382 | 0.674378 | 1.137662 | 0.016867 | 0.412205 | 0.169248 | 0.562463 |
3 | 2.380005 | Y | P_Put2008_eq38 | Y | 51.06 | 0.62 | 3.16 | 6.18 | 0.12 | 15.78 | 20.82 | 0.27 | 0 | 0.01 | 3 | 1.914576 | 0.882079 | 0.193792 | 0.836461 | 0.139648 | 0.019629 | 0.0 | 0.003811 | 0.017487 | 0.000296 | 0.0 | 0.085424 | 0.054224 | 0.461258 | 0.101338 | 0.437404 | 4.007780 | 0.437404 | 0.015559 | 0.178233 | 0.080287 | 0.000148 | 0.132428 | 0.819869 | 0.019629 | 0 | 0.034595 | 0.025415 | 0.776303 | 0.149784 | 0.776303 | 0.634224 | 0.015559 | 0.178233 | 55.15 | 0.17 | 1.19 | 10.21 | 0.22 | 29.99 | 1.66 | 0.03 | 0 | 0.15 | 3 | 1.968730 | 1.595973 | 0.304805 | 0.063492 | 0.050066 | 0.002076 | 0.0 | 0.006652 | 0.004565 | 0.004233 | 0.0 | 0.031270 | 0.018796 | 1.973295 | 0.812502 | 0.155175 | 0.032324 | 4.000594 | 0.032324 | 0.002076 | 0.004565 | 0.004233 | 0.012486 | 0.063492 | 0.913443 | 0.764291 | 0.053125 | 0.839637 | 0.812807 | 1.150356 | 0.001187 | 0.601746 | 0.388240 | 0.636705 |
4 | 4.099411 | Y | P_Put2008_eq38 | Y | 53.32 | 0.48 | 2.25 | 5.92 | 0.15 | 16.91 | 20.73 | 0.28 | 0 | 0.12 | 4 | 1.947746 | 0.920861 | 0.180851 | 0.811362 | 0.096868 | 0.019831 | 0.0 | 0.004641 | 0.013189 | 0.003466 | 0.0 | 0.052254 | 0.044614 | 0.481352 | 0.094534 | 0.424114 | 3.998814 | 0.424114 | 0.000000 | 0.180851 | 0.000000 | 0.001733 | 0.158665 | 0.835841 | 0.019831 | 0 | 0.024783 | 0.013736 | 0.771110 | 0.165301 | 0.771110 | 0.641826 | -0.002372 | 0.183222 | 56.32 | 0.13 | 1.41 | 10.17 | 0.26 | 30.88 | 1.05 | 0.02 | 0 | 0.16 | 4 | 1.971271 | 1.611274 | 0.297687 | 0.039377 | 0.058165 | 0.001357 | 0.0 | 0.007708 | 0.003423 | 0.004427 | 0.0 | 0.028729 | 0.029435 | 1.974693 | 0.826999 | 0.152790 | 0.020211 | 3.994689 | 0.020211 | 0.001357 | 0.003423 | 0.004427 | 0.023651 | 0.039377 | 0.925110 | 0.777706 | 0.033103 | 0.844054 | 0.829605 | 1.063003 | 0.000000 | 0.585107 | 0.208745 | 0.652532 |
5 | 14.809877 | Y | P_Put2008_eq38 | Y | 51.58 | 0.00 | 7.28 | 3.75 | 0.00 | 19.55 | 15.94 | 0.70 | 0 | 1.20 | 5 | 1.847739 | 1.044034 | 0.112343 | 0.611816 | 0.307360 | 0.048619 | 0.0 | 0.000000 | 0.000000 | 0.033985 | 0.0 | 0.152261 | 0.155100 | 0.590452 | 0.063536 | 0.346012 | 4.005897 | 0.346012 | 0.011794 | 0.100549 | 0.104985 | 0.016993 | 0.273356 | 0.902846 | 0.048619 | 0 | 0.106481 | 0.022890 | 0.465453 | 0.345462 | 0.465453 | 0.420233 | 0.011794 | 0.100549 | 54.40 | 0.00 | 5.40 | 5.90 | 0.00 | 31.20 | 2.30 | 0.20 | 0 | 0.60 | 5 | 1.884939 | 1.611616 | 0.170965 | 0.085388 | 0.220521 | 0.013436 | 0.0 | 0.000000 | 0.000000 | 0.016436 | 0.0 | 0.115061 | 0.105459 | 1.884939 | 0.862764 | 0.091524 | 0.045712 | 4.003301 | 0.045712 | 0.013436 | 0.000000 | 0.016436 | 0.075587 | 0.085388 | 0.810802 | 0.733040 | 0.077199 | 0.904089 | 0.757966 | 1.014348 | 0.006602 | 0.496311 | 0.219969 | 0.647330 |
# Reading temperature from the column T_K in the input spreadsheet
P_Eq39_inputT=pt.calculate_cpx_opx_press(opx_comps=Opxs, cpx_comps=Cpxs,
equationP="P_Put2008_eq39", T=my_input['T_K'])
P_Eq39_inputT.head()
0 4.038935 1 2.201826 2 1.189798 3 3.239557 4 4.757423 dtype: float64
# Performing calculations at fixed temp (1300K)
P_Eq39_fixedT=pt.calculate_cpx_opx_press(opx_comps=Opxs, cpx_comps=Cpxs,
equationP="P_Put2008_eq39", T=1300)
P_Eq39_fixedT.head() # Shows the first 5 outputs. Remove .head() to see them all
0 5.247185 1 3.410076 2 2.398048 3 4.447807 4 5.965673 dtype: float64
T_Wood=pt.calculate_cpx_opx_temp(opx_comps=Opxs, cpx_comps=Cpxs,
equationT="T_Wood1973", eq_tests=True)
T_Wood.head()
T_K_calc | Equation Choice (T) | High T Kd Eq? | Low T Kd Eq? | SiO2_Cpx | TiO2_Cpx | Al2O3_Cpx | FeOt_Cpx | MnO_Cpx | MgO_Cpx | CaO_Cpx | Na2O_Cpx | K2O_Cpx | Cr2O3_Cpx | Sample_ID_Cpx | Si_Cpx_cat_6ox | Mg_Cpx_cat_6ox | Fet_Cpx_cat_6ox | Ca_Cpx_cat_6ox | Al_Cpx_cat_6ox | Na_Cpx_cat_6ox | K_Cpx_cat_6ox | Mn_Cpx_cat_6ox | Ti_Cpx_cat_6ox | Cr_Cpx_cat_6ox | oxy_renorm_factor | Al_IV_cat_6ox | Al_VI_cat_6ox | En_Simple_MgFeCa_Cpx | Fs_Simple_MgFeCa_Cpx | Wo_Simple_MgFeCa_Cpx | Cation_Sum_Cpx | Ca_CaMgFe | Lindley_Fe3_Cpx | Lindley_Fe2_Cpx | Lindley_Fe3_Cpx_prop | CrCaTs | a_cpx_En | Mgno_Cpx | Jd | Jd_from 0=Na, 1=Al | CaTs | CaTi | DiHd_1996 | EnFs | DiHd_2003 | Di_Cpx | FeIII_Wang21 | FeII_Wang21 | SiO2_Opx | TiO2_Opx | Al2O3_Opx | FeOt_Opx | MnO_Opx | MgO_Opx | CaO_Opx | Na2O_Opx | K2O_Opx | Cr2O3_Opx | Sample_ID_Opx | Si_Opx_cat_6ox | Mg_Opx_cat_6ox | Fet_Opx_cat_6ox | Ca_Opx_cat_6ox | Al_Opx_cat_6ox | Na_Opx_cat_6ox | K_Opx_cat_6ox | Mn_Opx_cat_6ox | Ti_Opx_cat_6ox | Cr_Opx_cat_6ox | oxy_renorm_factor_opx | Al_IV_Opx_cat_6ox | Al_VI_Opx_cat_6ox | Si_Ti_Opx_cat_6ox | En_Simple_MgFeCa_Opx | Fs_Simple_MgFeCa_Opx | Wo_Simple_MgFeCa_Opx | Cation_Sum_Opx | Ca_CaMgFe | NaAlSi2O6 | FmTiAlSiO6 | CrAl2SiO6 | FmAl2SiO6 | CaFmSi2O6 | Fm2Si2O6 | En_Opx | Di_Opx | Mgno_OPX | En | Kd_Fe_Mg_Cpx_Opx | Lindley_Fe3_Opx | a_Di_cpx | Kf | a_En_opx_mod | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1324.760052 | T_Wood1973 | N | Y | 52.30 | 0.70 | 3.00 | 5.10 | 0.11 | 16.60 | 21.50 | 0.33 | 0 | 0.58 | 0 | 1.912184 | 0.904784 | 0.155939 | 0.842247 | 0.129273 | 0.023393 | 0.0 | 0.003406 | 0.019251 | 0.016765 | 0.0 | 0.087816 | 0.041457 | 0.475459 | 0.081945 | 0.442596 | 4.007242 | 0.442596 | 0.014485 | 0.141454 | 0.092887 | 0.008383 | 0.122977 | 0.852984 | 0.023393 | 0 | 0.018064 | 0.034876 | 0.780925 | 0.139899 | 0.780925 | 0.663987 | 0.014485 | 0.141454 | 55.00 | 0.34 | 1.50 | 11.30 | 0.24 | 30.70 | 0.90 | 0.01 | 0 | 0.19 | 0 | 1.943665 | 1.617356 | 0.333959 | 0.034078 | 0.062475 | 0.000685 | 0.0 | 0.007184 | 0.009038 | 0.005308 | 0.0 | 0.056335 | 0.006140 | 1.952703 | 0.814628 | 0.168208 | 0.017164 | 4.013748 | 0.017164 | 0.000685 | 0.009038 | 0.005308 | 0.000146 | 0.034078 | 0.957618 | 0.790815 | 0.028142 | 0.828850 | 0.871733 | 0.834684 | 0.027496 | 0.604991 | 0.216022 | 0.645067 |
1 | 1660.188018 | T_Wood1973 | Y | Y | 51.70 | 0.28 | 8.38 | 6.69 | 0.15 | 21.40 | 11.70 | 0.64 | 0 | 0.05 | 1 | 1.830350 | 1.129447 | 0.198073 | 0.443816 | 0.349659 | 0.043931 | 0.0 | 0.004498 | 0.007456 | 0.001399 | 0.0 | 0.169650 | 0.180009 | 0.637624 | 0.111821 | 0.250554 | 4.008630 | 0.250554 | 0.017260 | 0.180814 | 0.087138 | 0.000700 | 0.411086 | 0.850790 | 0.043931 | 0 | 0.136078 | 0.016786 | 0.290252 | 0.518634 | 0.290252 | 0.246111 | 0.017260 | 0.180814 | 52.70 | 0.15 | 8.10 | 8.48 | 0.14 | 29.40 | 2.14 | 0.14 | 0 | 0.00 | 1 | 1.823396 | 1.516444 | 0.245370 | 0.079334 | 0.330303 | 0.009392 | 0.0 | 0.004103 | 0.003904 | 0.000000 | 0.0 | 0.176604 | 0.153699 | 1.827300 | 0.823640 | 0.133270 | 0.043089 | 4.012245 | 0.043089 | 0.009392 | 0.003904 | 0.000000 | 0.144307 | 0.079334 | 0.769186 | 0.660522 | 0.068126 | 0.860725 | 0.678544 | 1.083837 | 0.024489 | 0.386810 | 0.142639 | 0.569045 |
2 | 1619.841099 | T_Wood1973 | Y | Y | 51.50 | 0.45 | 8.10 | 6.96 | 0.17 | 20.30 | 12.60 | 0.56 | 0 | 0.09 | 2 | 1.835204 | 1.078405 | 0.207416 | 0.481084 | 0.340188 | 0.038691 | 0.0 | 0.005131 | 0.012062 | 0.002536 | 0.0 | 0.164796 | 0.175393 | 0.610336 | 0.117390 | 0.272275 | 4.000717 | 0.272275 | 0.001435 | 0.205981 | 0.006917 | 0.001268 | 0.388642 | 0.838685 | 0.038691 | 0 | 0.136701 | 0.014047 | 0.329068 | 0.478377 | 0.329068 | 0.274889 | 0.001435 | 0.205981 | 53.20 | 0.20 | 7.40 | 8.80 | 0.13 | 29.20 | 2.37 | 0.14 | 0 | 0.02 | 2 | 1.839965 | 1.505530 | 0.254529 | 0.087825 | 0.301638 | 0.009388 | 0.0 | 0.003808 | 0.005203 | 0.000547 | 0.0 | 0.160035 | 0.141603 | 1.845168 | 0.814732 | 0.137741 | 0.047527 | 4.008433 | 0.047527 | 0.009388 | 0.005203 | 0.000547 | 0.131669 | 0.087825 | 0.769585 | 0.656871 | 0.074962 | 0.855382 | 0.674378 | 1.137662 | 0.016867 | 0.412205 | 0.169248 | 0.562463 |
3 | 1325.580654 | T_Wood1973 | Y | Y | 51.06 | 0.62 | 3.16 | 6.18 | 0.12 | 15.78 | 20.82 | 0.27 | 0 | 0.01 | 3 | 1.914576 | 0.882079 | 0.193792 | 0.836461 | 0.139648 | 0.019629 | 0.0 | 0.003811 | 0.017487 | 0.000296 | 0.0 | 0.085424 | 0.054224 | 0.461258 | 0.101338 | 0.437404 | 4.007780 | 0.437404 | 0.015559 | 0.178233 | 0.080287 | 0.000148 | 0.132428 | 0.819869 | 0.019629 | 0 | 0.034595 | 0.025415 | 0.776303 | 0.149784 | 0.776303 | 0.634224 | 0.015559 | 0.178233 | 55.15 | 0.17 | 1.19 | 10.21 | 0.22 | 29.99 | 1.66 | 0.03 | 0 | 0.15 | 3 | 1.968730 | 1.595973 | 0.304805 | 0.063492 | 0.050066 | 0.002076 | 0.0 | 0.006652 | 0.004565 | 0.004233 | 0.0 | 0.031270 | 0.018796 | 1.973295 | 0.812502 | 0.155175 | 0.032324 | 4.000594 | 0.032324 | 0.002076 | 0.004565 | 0.004233 | 0.012486 | 0.063492 | 0.913443 | 0.764291 | 0.053125 | 0.839637 | 0.812807 | 1.150356 | 0.001187 | 0.601746 | 0.388240 | 0.636705 |
4 | 1360.156781 | T_Wood1973 | Y | Y | 53.32 | 0.48 | 2.25 | 5.92 | 0.15 | 16.91 | 20.73 | 0.28 | 0 | 0.12 | 4 | 1.947746 | 0.920861 | 0.180851 | 0.811362 | 0.096868 | 0.019831 | 0.0 | 0.004641 | 0.013189 | 0.003466 | 0.0 | 0.052254 | 0.044614 | 0.481352 | 0.094534 | 0.424114 | 3.998814 | 0.424114 | 0.000000 | 0.180851 | 0.000000 | 0.001733 | 0.158665 | 0.835841 | 0.019831 | 0 | 0.024783 | 0.013736 | 0.771110 | 0.165301 | 0.771110 | 0.641826 | -0.002372 | 0.183222 | 56.32 | 0.13 | 1.41 | 10.17 | 0.26 | 30.88 | 1.05 | 0.02 | 0 | 0.16 | 4 | 1.971271 | 1.611274 | 0.297687 | 0.039377 | 0.058165 | 0.001357 | 0.0 | 0.007708 | 0.003423 | 0.004427 | 0.0 | 0.028729 | 0.029435 | 1.974693 | 0.826999 | 0.152790 | 0.020211 | 3.994689 | 0.020211 | 0.001357 | 0.003423 | 0.004427 | 0.023651 | 0.039377 | 0.925110 | 0.777706 | 0.033103 | 0.844054 | 0.829605 | 1.063003 | 0.000000 | 0.585107 | 0.208745 | 0.652532 |
T_Put_37=pt.calculate_cpx_opx_temp(opx_comps=Opxs, cpx_comps=Cpxs, P=5,
equationT="T_Put2008_eq36", eq_tests=True)
T_Put_37.head() # Shows the first 5 outputs. Remove .head() to see them all
T_K_calc | Equation Choice (T) | High T Kd Eq? | Low T Kd Eq? | SiO2_Cpx | TiO2_Cpx | Al2O3_Cpx | FeOt_Cpx | MnO_Cpx | MgO_Cpx | CaO_Cpx | Na2O_Cpx | K2O_Cpx | Cr2O3_Cpx | Sample_ID_Cpx | Si_Cpx_cat_6ox | Mg_Cpx_cat_6ox | Fet_Cpx_cat_6ox | Ca_Cpx_cat_6ox | Al_Cpx_cat_6ox | Na_Cpx_cat_6ox | K_Cpx_cat_6ox | Mn_Cpx_cat_6ox | Ti_Cpx_cat_6ox | Cr_Cpx_cat_6ox | oxy_renorm_factor | Al_IV_cat_6ox | Al_VI_cat_6ox | En_Simple_MgFeCa_Cpx | Fs_Simple_MgFeCa_Cpx | Wo_Simple_MgFeCa_Cpx | Cation_Sum_Cpx | Ca_CaMgFe | Lindley_Fe3_Cpx | Lindley_Fe2_Cpx | Lindley_Fe3_Cpx_prop | CrCaTs | a_cpx_En | Mgno_Cpx | Jd | Jd_from 0=Na, 1=Al | CaTs | CaTi | DiHd_1996 | EnFs | DiHd_2003 | Di_Cpx | FeIII_Wang21 | FeII_Wang21 | SiO2_Opx | TiO2_Opx | Al2O3_Opx | FeOt_Opx | MnO_Opx | MgO_Opx | CaO_Opx | Na2O_Opx | K2O_Opx | Cr2O3_Opx | Sample_ID_Opx | Si_Opx_cat_6ox | Mg_Opx_cat_6ox | Fet_Opx_cat_6ox | Ca_Opx_cat_6ox | Al_Opx_cat_6ox | Na_Opx_cat_6ox | K_Opx_cat_6ox | Mn_Opx_cat_6ox | Ti_Opx_cat_6ox | Cr_Opx_cat_6ox | oxy_renorm_factor_opx | Al_IV_Opx_cat_6ox | Al_VI_Opx_cat_6ox | Si_Ti_Opx_cat_6ox | En_Simple_MgFeCa_Opx | Fs_Simple_MgFeCa_Opx | Wo_Simple_MgFeCa_Opx | Cation_Sum_Opx | Ca_CaMgFe | NaAlSi2O6 | FmTiAlSiO6 | CrAl2SiO6 | FmAl2SiO6 | CaFmSi2O6 | Fm2Si2O6 | En_Opx | Di_Opx | Mgno_OPX | En | Kd_Fe_Mg_Cpx_Opx | Lindley_Fe3_Opx | a_Di_cpx | Kf | a_En_opx_mod | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1266.450414 | T_Put2008_eq36 | N | Y | 52.30 | 0.70 | 3.00 | 5.10 | 0.11 | 16.60 | 21.50 | 0.33 | 0 | 0.58 | 0 | 1.912184 | 0.904784 | 0.155939 | 0.842247 | 0.129273 | 0.023393 | 0.0 | 0.003406 | 0.019251 | 0.016765 | 0.0 | 0.087816 | 0.041457 | 0.475459 | 0.081945 | 0.442596 | 4.007242 | 0.442596 | 0.014485 | 0.141454 | 0.092887 | 0.008383 | 0.122977 | 0.852984 | 0.023393 | 0 | 0.018064 | 0.034876 | 0.780925 | 0.139899 | 0.780925 | 0.663987 | 0.014485 | 0.141454 | 55.00 | 0.34 | 1.50 | 11.30 | 0.24 | 30.70 | 0.90 | 0.01 | 0 | 0.19 | 0 | 1.943665 | 1.617356 | 0.333959 | 0.034078 | 0.062475 | 0.000685 | 0.0 | 0.007184 | 0.009038 | 0.005308 | 0.0 | 0.056335 | 0.006140 | 1.952703 | 0.814628 | 0.168208 | 0.017164 | 4.013748 | 0.017164 | 0.000685 | 0.009038 | 0.005308 | 0.000146 | 0.034078 | 0.957618 | 0.790815 | 0.028142 | 0.828850 | 0.871733 | 0.834684 | 0.027496 | 0.604991 | 0.216022 | 0.645067 |
1 | 1490.724353 | T_Put2008_eq36 | Y | Y | 51.70 | 0.28 | 8.38 | 6.69 | 0.15 | 21.40 | 11.70 | 0.64 | 0 | 0.05 | 1 | 1.830350 | 1.129447 | 0.198073 | 0.443816 | 0.349659 | 0.043931 | 0.0 | 0.004498 | 0.007456 | 0.001399 | 0.0 | 0.169650 | 0.180009 | 0.637624 | 0.111821 | 0.250554 | 4.008630 | 0.250554 | 0.017260 | 0.180814 | 0.087138 | 0.000700 | 0.411086 | 0.850790 | 0.043931 | 0 | 0.136078 | 0.016786 | 0.290252 | 0.518634 | 0.290252 | 0.246111 | 0.017260 | 0.180814 | 52.70 | 0.15 | 8.10 | 8.48 | 0.14 | 29.40 | 2.14 | 0.14 | 0 | 0.00 | 1 | 1.823396 | 1.516444 | 0.245370 | 0.079334 | 0.330303 | 0.009392 | 0.0 | 0.004103 | 0.003904 | 0.000000 | 0.0 | 0.176604 | 0.153699 | 1.827300 | 0.823640 | 0.133270 | 0.043089 | 4.012245 | 0.043089 | 0.009392 | 0.003904 | 0.000000 | 0.144307 | 0.079334 | 0.769186 | 0.660522 | 0.068126 | 0.860725 | 0.678544 | 1.083837 | 0.024489 | 0.386810 | 0.142639 | 0.569045 |
2 | 1496.279136 | T_Put2008_eq36 | Y | Y | 51.50 | 0.45 | 8.10 | 6.96 | 0.17 | 20.30 | 12.60 | 0.56 | 0 | 0.09 | 2 | 1.835204 | 1.078405 | 0.207416 | 0.481084 | 0.340188 | 0.038691 | 0.0 | 0.005131 | 0.012062 | 0.002536 | 0.0 | 0.164796 | 0.175393 | 0.610336 | 0.117390 | 0.272275 | 4.000717 | 0.272275 | 0.001435 | 0.205981 | 0.006917 | 0.001268 | 0.388642 | 0.838685 | 0.038691 | 0 | 0.136701 | 0.014047 | 0.329068 | 0.478377 | 0.329068 | 0.274889 | 0.001435 | 0.205981 | 53.20 | 0.20 | 7.40 | 8.80 | 0.13 | 29.20 | 2.37 | 0.14 | 0 | 0.02 | 2 | 1.839965 | 1.505530 | 0.254529 | 0.087825 | 0.301638 | 0.009388 | 0.0 | 0.003808 | 0.005203 | 0.000547 | 0.0 | 0.160035 | 0.141603 | 1.845168 | 0.814732 | 0.137741 | 0.047527 | 4.008433 | 0.047527 | 0.009388 | 0.005203 | 0.000547 | 0.131669 | 0.087825 | 0.769585 | 0.656871 | 0.074962 | 0.855382 | 0.674378 | 1.137662 | 0.016867 | 0.412205 | 0.169248 | 0.562463 |
3 | 1286.405818 | T_Put2008_eq36 | Y | Y | 51.06 | 0.62 | 3.16 | 6.18 | 0.12 | 15.78 | 20.82 | 0.27 | 0 | 0.01 | 3 | 1.914576 | 0.882079 | 0.193792 | 0.836461 | 0.139648 | 0.019629 | 0.0 | 0.003811 | 0.017487 | 0.000296 | 0.0 | 0.085424 | 0.054224 | 0.461258 | 0.101338 | 0.437404 | 4.007780 | 0.437404 | 0.015559 | 0.178233 | 0.080287 | 0.000148 | 0.132428 | 0.819869 | 0.019629 | 0 | 0.034595 | 0.025415 | 0.776303 | 0.149784 | 0.776303 | 0.634224 | 0.015559 | 0.178233 | 55.15 | 0.17 | 1.19 | 10.21 | 0.22 | 29.99 | 1.66 | 0.03 | 0 | 0.15 | 3 | 1.968730 | 1.595973 | 0.304805 | 0.063492 | 0.050066 | 0.002076 | 0.0 | 0.006652 | 0.004565 | 0.004233 | 0.0 | 0.031270 | 0.018796 | 1.973295 | 0.812502 | 0.155175 | 0.032324 | 4.000594 | 0.032324 | 0.002076 | 0.004565 | 0.004233 | 0.012486 | 0.063492 | 0.913443 | 0.764291 | 0.053125 | 0.839637 | 0.812807 | 1.150356 | 0.001187 | 0.601746 | 0.388240 | 0.636705 |
4 | 1279.823849 | T_Put2008_eq36 | Y | Y | 53.32 | 0.48 | 2.25 | 5.92 | 0.15 | 16.91 | 20.73 | 0.28 | 0 | 0.12 | 4 | 1.947746 | 0.920861 | 0.180851 | 0.811362 | 0.096868 | 0.019831 | 0.0 | 0.004641 | 0.013189 | 0.003466 | 0.0 | 0.052254 | 0.044614 | 0.481352 | 0.094534 | 0.424114 | 3.998814 | 0.424114 | 0.000000 | 0.180851 | 0.000000 | 0.001733 | 0.158665 | 0.835841 | 0.019831 | 0 | 0.024783 | 0.013736 | 0.771110 | 0.165301 | 0.771110 | 0.641826 | -0.002372 | 0.183222 | 56.32 | 0.13 | 1.41 | 10.17 | 0.26 | 30.88 | 1.05 | 0.02 | 0 | 0.16 | 4 | 1.971271 | 1.611274 | 0.297687 | 0.039377 | 0.058165 | 0.001357 | 0.0 | 0.007708 | 0.003423 | 0.004427 | 0.0 | 0.028729 | 0.029435 | 1.974693 | 0.826999 | 0.152790 | 0.020211 | 3.994689 | 0.020211 | 0.001357 | 0.003423 | 0.004427 | 0.023651 | 0.039377 | 0.925110 | 0.777706 | 0.033103 | 0.844054 | 0.829605 | 1.063003 | 0.000000 | 0.585107 | 0.208745 | 0.652532 |
P_T36_P39=pt.calculate_cpx_opx_press_temp(opx_comps=Opxs, cpx_comps=Cpxs,
equationP="P_Put2008_eq39",
equationT="T_Put2008_eq36", eq_tests=True)
P_T36_P39.head()
T_K_calc | P_kbar_calc | Equation Choice (T) | Equation Choice (P) | Delta Kd High T | High T Kd Eq? | Delta Kd Low T | Low T Kd Eq? | SiO2_Cpx | TiO2_Cpx | Al2O3_Cpx | FeOt_Cpx | MnO_Cpx | MgO_Cpx | CaO_Cpx | Na2O_Cpx | K2O_Cpx | Cr2O3_Cpx | Sample_ID_Cpx | Si_Cpx_cat_6ox | Mg_Cpx_cat_6ox | Fet_Cpx_cat_6ox | Ca_Cpx_cat_6ox | Al_Cpx_cat_6ox | Na_Cpx_cat_6ox | K_Cpx_cat_6ox | Mn_Cpx_cat_6ox | Ti_Cpx_cat_6ox | Cr_Cpx_cat_6ox | oxy_renorm_factor | Al_IV_cat_6ox | Al_VI_cat_6ox | En_Simple_MgFeCa_Cpx | Fs_Simple_MgFeCa_Cpx | Wo_Simple_MgFeCa_Cpx | Cation_Sum_Cpx | Ca_CaMgFe | Lindley_Fe3_Cpx | Lindley_Fe2_Cpx | Lindley_Fe3_Cpx_prop | CrCaTs | a_cpx_En | Mgno_Cpx | Jd | Jd_from 0=Na, 1=Al | CaTs | CaTi | DiHd_1996 | EnFs | DiHd_2003 | Di_Cpx | FeIII_Wang21 | FeII_Wang21 | SiO2_Opx | TiO2_Opx | Al2O3_Opx | FeOt_Opx | MnO_Opx | MgO_Opx | CaO_Opx | Na2O_Opx | K2O_Opx | Cr2O3_Opx | Sample_ID_Opx | Si_Opx_cat_6ox | Mg_Opx_cat_6ox | Fet_Opx_cat_6ox | Ca_Opx_cat_6ox | Al_Opx_cat_6ox | Na_Opx_cat_6ox | K_Opx_cat_6ox | Mn_Opx_cat_6ox | Ti_Opx_cat_6ox | Cr_Opx_cat_6ox | oxy_renorm_factor_opx | Al_IV_Opx_cat_6ox | Al_VI_Opx_cat_6ox | Si_Ti_Opx_cat_6ox | En_Simple_MgFeCa_Opx | Fs_Simple_MgFeCa_Opx | Wo_Simple_MgFeCa_Opx | Cation_Sum_Opx | Ca_CaMgFe | NaAlSi2O6 | FmTiAlSiO6 | CrAl2SiO6 | FmAl2SiO6 | CaFmSi2O6 | Fm2Si2O6 | En_Opx | Di_Opx | Mgno_OPX | En | Kd_Fe_Mg_Cpx_Opx | Lindley_Fe3_Opx | a_Di_cpx | Kf | a_En_opx_mod | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1258.526669 | 3.380885 | T_Put2008_eq36 | P_Put2008_eq39 | 0.255316 | N | 0.134684 | Y | 52.30 | 0.70 | 3.00 | 5.10 | 0.11 | 16.60 | 21.50 | 0.33 | 0 | 0.58 | 0 | 1.912184 | 0.904784 | 0.155939 | 0.842247 | 0.129273 | 0.023393 | 0.0 | 0.003406 | 0.019251 | 0.016765 | 0.0 | 0.087816 | 0.041457 | 0.475459 | 0.081945 | 0.442596 | 4.007242 | 0.442596 | 0.014485 | 0.141454 | 0.092887 | 0.008383 | 0.122977 | 0.852984 | 0.023393 | 0 | 0.018064 | 0.034876 | 0.780925 | 0.139899 | 0.780925 | 0.663987 | 0.014485 | 0.141454 | 55.00 | 0.34 | 1.50 | 11.30 | 0.24 | 30.70 | 0.90 | 0.01 | 0 | 0.19 | 0 | 1.943665 | 1.617356 | 0.333959 | 0.034078 | 0.062475 | 0.000685 | 0.0 | 0.007184 | 0.009038 | 0.005308 | 0.0 | 0.056335 | 0.006140 | 1.952703 | 0.814628 | 0.168208 | 0.017164 | 4.013748 | 0.017164 | 0.000685 | 0.009038 | 0.005308 | 0.000146 | 0.034078 | 0.957618 | 0.790815 | 0.028142 | 0.828850 | 0.871733 | 0.834684 | 0.027496 | 0.604991 | 0.216022 | 0.645067 |
1 | 1577.081747 | 15.878754 | T_Put2008_eq36 | P_Put2008_eq39 | 0.006163 | Y | 0.383837 | Y | 51.70 | 0.28 | 8.38 | 6.69 | 0.15 | 21.40 | 11.70 | 0.64 | 0 | 0.05 | 1 | 1.830350 | 1.129447 | 0.198073 | 0.443816 | 0.349659 | 0.043931 | 0.0 | 0.004498 | 0.007456 | 0.001399 | 0.0 | 0.169650 | 0.180009 | 0.637624 | 0.111821 | 0.250554 | 4.008630 | 0.250554 | 0.017260 | 0.180814 | 0.087138 | 0.000700 | 0.411086 | 0.850790 | 0.043931 | 0 | 0.136078 | 0.016786 | 0.290252 | 0.518634 | 0.290252 | 0.246111 | 0.017260 | 0.180814 | 52.70 | 0.15 | 8.10 | 8.48 | 0.14 | 29.40 | 2.14 | 0.14 | 0 | 0.00 | 1 | 1.823396 | 1.516444 | 0.245370 | 0.079334 | 0.330303 | 0.009392 | 0.0 | 0.004103 | 0.003904 | 0.000000 | 0.0 | 0.176604 | 0.153699 | 1.827300 | 0.823640 | 0.133270 | 0.043089 | 4.012245 | 0.043089 | 0.009392 | 0.003904 | 0.000000 | 0.144307 | 0.079334 | 0.769186 | 0.660522 | 0.068126 | 0.860725 | 0.678544 | 1.083837 | 0.024489 | 0.386810 | 0.142639 | 0.569045 |
2 | 1573.435336 | 14.702638 | T_Put2008_eq36 | P_Put2008_eq39 | 0.047662 | Y | 0.437662 | Y | 51.50 | 0.45 | 8.10 | 6.96 | 0.17 | 20.30 | 12.60 | 0.56 | 0 | 0.09 | 2 | 1.835204 | 1.078405 | 0.207416 | 0.481084 | 0.340188 | 0.038691 | 0.0 | 0.005131 | 0.012062 | 0.002536 | 0.0 | 0.164796 | 0.175393 | 0.610336 | 0.117390 | 0.272275 | 4.000717 | 0.272275 | 0.001435 | 0.205981 | 0.006917 | 0.001268 | 0.388642 | 0.838685 | 0.038691 | 0 | 0.136701 | 0.014047 | 0.329068 | 0.478377 | 0.329068 | 0.274889 | 0.001435 | 0.205981 | 53.20 | 0.20 | 7.40 | 8.80 | 0.13 | 29.20 | 2.37 | 0.14 | 0 | 0.02 | 2 | 1.839965 | 1.505530 | 0.254529 | 0.087825 | 0.301638 | 0.009388 | 0.0 | 0.003808 | 0.005203 | 0.000547 | 0.0 | 0.160035 | 0.141603 | 1.845168 | 0.814732 | 0.137741 | 0.047527 | 4.008433 | 0.047527 | 0.009388 | 0.005203 | 0.000547 | 0.131669 | 0.087825 | 0.769585 | 0.656871 | 0.074962 | 0.855382 | 0.674378 | 1.137662 | 0.016867 | 0.412205 | 0.169248 | 0.562463 |
3 | 1278.712525 | 3.489871 | T_Put2008_eq36 | P_Put2008_eq39 | 0.060356 | Y | 0.450356 | Y | 51.06 | 0.62 | 3.16 | 6.18 | 0.12 | 15.78 | 20.82 | 0.27 | 0 | 0.01 | 3 | 1.914576 | 0.882079 | 0.193792 | 0.836461 | 0.139648 | 0.019629 | 0.0 | 0.003811 | 0.017487 | 0.000296 | 0.0 | 0.085424 | 0.054224 | 0.461258 | 0.101338 | 0.437404 | 4.007780 | 0.437404 | 0.015559 | 0.178233 | 0.080287 | 0.000148 | 0.132428 | 0.819869 | 0.019629 | 0 | 0.034595 | 0.025415 | 0.776303 | 0.149784 | 0.776303 | 0.634224 | 0.015559 | 0.178233 | 55.15 | 0.17 | 1.19 | 10.21 | 0.22 | 29.99 | 1.66 | 0.03 | 0 | 0.15 | 3 | 1.968730 | 1.595973 | 0.304805 | 0.063492 | 0.050066 | 0.002076 | 0.0 | 0.006652 | 0.004565 | 0.004233 | 0.0 | 0.031270 | 0.018796 | 1.973295 | 0.812502 | 0.155175 | 0.032324 | 4.000594 | 0.032324 | 0.002076 | 0.004565 | 0.004233 | 0.012486 | 0.063492 | 0.913443 | 0.764291 | 0.053125 | 0.839637 | 0.812807 | 1.150356 | 0.001187 | 0.601746 | 0.388240 | 0.636705 |
4 | 1280.203052 | 5.074810 | T_Put2008_eq36 | P_Put2008_eq39 | 0.026997 | Y | 0.363003 | Y | 53.32 | 0.48 | 2.25 | 5.92 | 0.15 | 16.91 | 20.73 | 0.28 | 0 | 0.12 | 4 | 1.947746 | 0.920861 | 0.180851 | 0.811362 | 0.096868 | 0.019831 | 0.0 | 0.004641 | 0.013189 | 0.003466 | 0.0 | 0.052254 | 0.044614 | 0.481352 | 0.094534 | 0.424114 | 3.998814 | 0.424114 | 0.000000 | 0.180851 | 0.000000 | 0.001733 | 0.158665 | 0.835841 | 0.019831 | 0 | 0.024783 | 0.013736 | 0.771110 | 0.165301 | 0.771110 | 0.641826 | -0.002372 | 0.183222 | 56.32 | 0.13 | 1.41 | 10.17 | 0.26 | 30.88 | 1.05 | 0.02 | 0 | 0.16 | 4 | 1.971271 | 1.611274 | 0.297687 | 0.039377 | 0.058165 | 0.001357 | 0.0 | 0.007708 | 0.003423 | 0.004427 | 0.0 | 0.028729 | 0.029435 | 1.974693 | 0.826999 | 0.152790 | 0.020211 | 3.994689 | 0.020211 | 0.001357 | 0.003423 | 0.004427 | 0.023651 | 0.039377 | 0.925110 | 0.777706 | 0.033103 | 0.844054 | 0.829605 | 1.063003 | 0.000000 | 0.585107 | 0.208745 | 0.652532 |
P_TBray_P38=pt.calculate_cpx_opx_press_temp(opx_comps=Opxs, cpx_comps=Cpxs, equationP="P_Put2008_eq38", equationT="T_Brey1990", eq_tests=True)
P_TBray_P38.head()
Youve selected a T-independent function
T_K_calc | P_kbar_calc | Equation Choice (T) | Equation Choice (P) | Delta Kd High T | High T Kd Eq? | Delta Kd Low T | Low T Kd Eq? | SiO2_Cpx | TiO2_Cpx | Al2O3_Cpx | FeOt_Cpx | MnO_Cpx | MgO_Cpx | CaO_Cpx | Na2O_Cpx | K2O_Cpx | Cr2O3_Cpx | Sample_ID_Cpx | Si_Cpx_cat_6ox | Mg_Cpx_cat_6ox | Fet_Cpx_cat_6ox | Ca_Cpx_cat_6ox | Al_Cpx_cat_6ox | Na_Cpx_cat_6ox | K_Cpx_cat_6ox | Mn_Cpx_cat_6ox | Ti_Cpx_cat_6ox | Cr_Cpx_cat_6ox | oxy_renorm_factor | Al_IV_cat_6ox | Al_VI_cat_6ox | En_Simple_MgFeCa_Cpx | Fs_Simple_MgFeCa_Cpx | Wo_Simple_MgFeCa_Cpx | Cation_Sum_Cpx | Ca_CaMgFe | Lindley_Fe3_Cpx | Lindley_Fe2_Cpx | Lindley_Fe3_Cpx_prop | CrCaTs | a_cpx_En | Mgno_Cpx | Jd | Jd_from 0=Na, 1=Al | CaTs | CaTi | DiHd_1996 | EnFs | DiHd_2003 | Di_Cpx | FeIII_Wang21 | FeII_Wang21 | SiO2_Opx | TiO2_Opx | Al2O3_Opx | FeOt_Opx | MnO_Opx | MgO_Opx | CaO_Opx | Na2O_Opx | K2O_Opx | Cr2O3_Opx | Sample_ID_Opx | Si_Opx_cat_6ox | Mg_Opx_cat_6ox | Fet_Opx_cat_6ox | Ca_Opx_cat_6ox | Al_Opx_cat_6ox | Na_Opx_cat_6ox | K_Opx_cat_6ox | Mn_Opx_cat_6ox | Ti_Opx_cat_6ox | Cr_Opx_cat_6ox | oxy_renorm_factor_opx | Al_IV_Opx_cat_6ox | Al_VI_Opx_cat_6ox | Si_Ti_Opx_cat_6ox | En_Simple_MgFeCa_Opx | Fs_Simple_MgFeCa_Opx | Wo_Simple_MgFeCa_Opx | Cation_Sum_Opx | Ca_CaMgFe | NaAlSi2O6 | FmTiAlSiO6 | CrAl2SiO6 | FmAl2SiO6 | CaFmSi2O6 | Fm2Si2O6 | En_Opx | Di_Opx | Mgno_OPX | En | Kd_Fe_Mg_Cpx_Opx | Lindley_Fe3_Opx | a_Di_cpx | Kf | a_En_opx_mod | |
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | 1239.928820 | 2.187907 | T_Brey1990 | P_Put2008_eq38 | 0.255316 | N | 0.134684 | Y | 52.30 | 0.70 | 3.00 | 5.10 | 0.11 | 16.60 | 21.50 | 0.33 | 0 | 0.58 | 0 | 1.912184 | 0.904784 | 0.155939 | 0.842247 | 0.129273 | 0.023393 | 0.0 | 0.003406 | 0.019251 | 0.016765 | 0.0 | 0.087816 | 0.041457 | 0.475459 | 0.081945 | 0.442596 | 4.007242 | 0.442596 | 0.014485 | 0.141454 | 0.092887 | 0.008383 | 0.122977 | 0.852984 | 0.023393 | 0 | 0.018064 | 0.034876 | 0.780925 | 0.139899 | 0.780925 | 0.663987 | 0.014485 | 0.141454 | 55.00 | 0.34 | 1.50 | 11.30 | 0.24 | 30.70 | 0.90 | 0.01 | 0 | 0.19 | 0 | 1.943665 | 1.617356 | 0.333959 | 0.034078 | 0.062475 | 0.000685 | 0.0 | 0.007184 | 0.009038 | 0.005308 | 0.0 | 0.056335 | 0.006140 | 1.952703 | 0.814628 | 0.168208 | 0.017164 | 4.013748 | 0.017164 | 0.000685 | 0.009038 | 0.005308 | 0.000146 | 0.034078 | 0.957618 | 0.790815 | 0.028142 | 0.828850 | 0.871733 | 0.834684 | 0.027496 | 0.604991 | 0.216022 | 0.645067 |
1 | 1595.369041 | 16.535654 | T_Brey1990 | P_Put2008_eq38 | 0.006163 | Y | 0.383837 | Y | 51.70 | 0.28 | 8.38 | 6.69 | 0.15 | 21.40 | 11.70 | 0.64 | 0 | 0.05 | 1 | 1.830350 | 1.129447 | 0.198073 | 0.443816 | 0.349659 | 0.043931 | 0.0 | 0.004498 | 0.007456 | 0.001399 | 0.0 | 0.169650 | 0.180009 | 0.637624 | 0.111821 | 0.250554 | 4.008630 | 0.250554 | 0.017260 | 0.180814 | 0.087138 | 0.000700 | 0.411086 | 0.850790 | 0.043931 | 0 | 0.136078 | 0.016786 | 0.290252 | 0.518634 | 0.290252 | 0.246111 | 0.017260 | 0.180814 | 52.70 | 0.15 | 8.10 | 8.48 | 0.14 | 29.40 | 2.14 | 0.14 | 0 | 0.00 | 1 | 1.823396 | 1.516444 | 0.245370 | 0.079334 | 0.330303 | 0.009392 | 0.0 | 0.004103 | 0.003904 | 0.000000 | 0.0 | 0.176604 | 0.153699 | 1.827300 | 0.823640 | 0.133270 | 0.043089 | 4.012245 | 0.043089 | 0.009392 | 0.003904 | 0.000000 | 0.144307 | 0.079334 | 0.769186 | 0.660522 | 0.068126 | 0.860725 | 0.678544 | 1.083837 | 0.024489 | 0.386810 | 0.142639 | 0.569045 |
2 | 1577.310529 | 14.450339 | T_Brey1990 | P_Put2008_eq38 | 0.047662 | Y | 0.437662 | Y | 51.50 | 0.45 | 8.10 | 6.96 | 0.17 | 20.30 | 12.60 | 0.56 | 0 | 0.09 | 2 | 1.835204 | 1.078405 | 0.207416 | 0.481084 | 0.340188 | 0.038691 | 0.0 | 0.005131 | 0.012062 | 0.002536 | 0.0 | 0.164796 | 0.175393 | 0.610336 | 0.117390 | 0.272275 | 4.000717 | 0.272275 | 0.001435 | 0.205981 | 0.006917 | 0.001268 | 0.388642 | 0.838685 | 0.038691 | 0 | 0.136701 | 0.014047 | 0.329068 | 0.478377 | 0.329068 | 0.274889 | 0.001435 | 0.205981 | 53.20 | 0.20 | 7.40 | 8.80 | 0.13 | 29.20 | 2.37 | 0.14 | 0 | 0.02 | 2 | 1.839965 | 1.505530 | 0.254529 | 0.087825 | 0.301638 | 0.009388 | 0.0 | 0.003808 | 0.005203 | 0.000547 | 0.0 | 0.160035 | 0.141603 | 1.845168 | 0.814732 | 0.137741 | 0.047527 | 4.008433 | 0.047527 | 0.009388 | 0.005203 | 0.000547 | 0.131669 | 0.087825 | 0.769585 | 0.656871 | 0.074962 | 0.855382 | 0.674378 | 1.137662 | 0.016867 | 0.412205 | 0.169248 | 0.562463 |
3 | 1273.413868 | 2.380005 | T_Brey1990 | P_Put2008_eq38 | 0.060356 | Y | 0.450356 | Y | 51.06 | 0.62 | 3.16 | 6.18 | 0.12 | 15.78 | 20.82 | 0.27 | 0 | 0.01 | 3 | 1.914576 | 0.882079 | 0.193792 | 0.836461 | 0.139648 | 0.019629 | 0.0 | 0.003811 | 0.017487 | 0.000296 | 0.0 | 0.085424 | 0.054224 | 0.461258 | 0.101338 | 0.437404 | 4.007780 | 0.437404 | 0.015559 | 0.178233 | 0.080287 | 0.000148 | 0.132428 | 0.819869 | 0.019629 | 0 | 0.034595 | 0.025415 | 0.776303 | 0.149784 | 0.776303 | 0.634224 | 0.015559 | 0.178233 | 55.15 | 0.17 | 1.19 | 10.21 | 0.22 | 29.99 | 1.66 | 0.03 | 0 | 0.15 | 3 | 1.968730 | 1.595973 | 0.304805 | 0.063492 | 0.050066 | 0.002076 | 0.0 | 0.006652 | 0.004565 | 0.004233 | 0.0 | 0.031270 | 0.018796 | 1.973295 | 0.812502 | 0.155175 | 0.032324 | 4.000594 | 0.032324 | 0.002076 | 0.004565 | 0.004233 | 0.012486 | 0.063492 | 0.913443 | 0.764291 | 0.053125 | 0.839637 | 0.812807 | 1.150356 | 0.001187 | 0.601746 | 0.388240 | 0.636705 |
4 | 1314.729086 | 4.099411 | T_Brey1990 | P_Put2008_eq38 | 0.026997 | Y | 0.363003 | Y | 53.32 | 0.48 | 2.25 | 5.92 | 0.15 | 16.91 | 20.73 | 0.28 | 0 | 0.12 | 4 | 1.947746 | 0.920861 | 0.180851 | 0.811362 | 0.096868 | 0.019831 | 0.0 | 0.004641 | 0.013189 | 0.003466 | 0.0 | 0.052254 | 0.044614 | 0.481352 | 0.094534 | 0.424114 | 3.998814 | 0.424114 | 0.000000 | 0.180851 | 0.000000 | 0.001733 | 0.158665 | 0.835841 | 0.019831 | 0 | 0.024783 | 0.013736 | 0.771110 | 0.165301 | 0.771110 | 0.641826 | -0.002372 | 0.183222 | 56.32 | 0.13 | 1.41 | 10.17 | 0.26 | 30.88 | 1.05 | 0.02 | 0 | 0.16 | 4 | 1.971271 | 1.611274 | 0.297687 | 0.039377 | 0.058165 | 0.001357 | 0.0 | 0.007708 | 0.003423 | 0.004427 | 0.0 | 0.028729 | 0.029435 | 1.974693 | 0.826999 | 0.152790 | 0.020211 | 3.994689 | 0.020211 | 0.001357 | 0.003423 | 0.004427 | 0.023651 | 0.039377 | 0.925110 | 0.777706 | 0.033103 | 0.844054 | 0.829605 | 1.063003 | 0.000000 | 0.585107 | 0.208745 | 0.652532 |
P_T36_P39.to_excel('Cpx-Opx_outputs.xlsx')