{
"cells": [
{
"cell_type": "code",
"execution_count": 1,
"id": "139c98b6-ecf9-404a-ba8a-be6471124f5a",
"metadata": {},
"outputs": [],
"source": [
"import numpy as np\n",
"import pandas as pd\n",
"import sys\n",
"sys.path.append(\"..\")\n",
"import matplotlib.pyplot as plt\n",
"import Thermobar as pt\n",
"import sympy as sym\n",
"pd.options.display.max_columns = None"
]
},
{
"cell_type": "code",
"execution_count": 2,
"id": "2d4619c0-2e07-4347-b921-6f5b670f2fea",
"metadata": {},
"outputs": [],
"source": [
"LiqT=pd.DataFrame(data={\"SiO2_Liq\": 51,\n",
" \"TiO2_Liq\": 0.48,\n",
" \"Al2O3_Liq\": 19,\n",
" \"FeOt_Liq\": 5.3,\n",
" \"MnO_Liq\": 0.1,\n",
" \"MgO_Liq\": 4.5,\n",
" \"CaO_Liq\": 9,\n",
" \"Na2O_Liq\": 4.2,\n",
" \"K2O_Liq\": 0.1,\n",
" \"Cr2O3_Liq\": 0.11,\n",
" \"P2O5_Liq\": 0.11,\n",
" \"H2O_Liq\": 5,\n",
" \"Fe3Fet_Liq\":0.1,\n",
"}, index=[0])\n",
"\n",
"AmpT=pd.DataFrame(data={\"SiO2_Amp\": 40.57,\n",
" \"TiO2_Amp\": 2.45,\n",
" \"Al2O3_Amp\": 12.82,\n",
" \"FeOt_Amp\": 13.110,\n",
" \"MnO_Amp\": 0.26,\n",
" \"MgO_Amp\": 13.02,\n",
" \"CaO_Amp\": 11.63,\n",
" \"Na2O_Amp\": 2.20,\n",
" \"K2O_Amp\": 0.92,\n",
" \"Cr2O3_Amp\": 0.01,\n",
" 'F_Amp': 0,\n",
" 'Cl_Amp': 0}, index=[0])"
]
},
{
"cell_type": "code",
"execution_count": 3,
"id": "74d90776-56bf-44ec-b80f-c72742bbdff0",
"metadata": {},
"outputs": [],
"source": [
"df_ideal_amp = pd.DataFrame(columns=['SiO2_Amp', 'TiO2_Amp', 'Al2O3_Amp',\n",
" 'FeOt_Amp', 'MnO_Amp', 'MgO_Amp', 'CaO_Amp', 'Na2O_Amp', 'K2O_Amp',\n",
" 'Cr2O3_Amp', 'F_Amp', 'Cl_Amp'])"
]
},
{
"cell_type": "code",
"execution_count": 4,
"id": "94c9a42c-84e8-4e51-9de6-70c6327fbc88",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"
\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" P_kbar_calc | \n",
" Input_Check | \n",
" Fail Msg | \n",
" classification | \n",
" equation | \n",
" H2O_calc | \n",
" Fe2O3_calc | \n",
" FeO_calc | \n",
" Total_recalc | \n",
" Sum_input | \n",
" SiO2_Amp_cat_prop | \n",
" MgO_Amp_cat_prop | \n",
" FeOt_Amp_cat_prop | \n",
" CaO_Amp_cat_prop | \n",
" Al2O3_Amp_cat_prop | \n",
" Na2O_Amp_cat_prop | \n",
" K2O_Amp_cat_prop | \n",
" MnO_Amp_cat_prop | \n",
" TiO2_Amp_cat_prop | \n",
" Cr2O3_Amp_cat_prop | \n",
" F_Amp_cat_prop | \n",
" Cl_Amp_cat_prop | \n",
" Si_Amp_13_cat | \n",
" Mg_Amp_13_cat | \n",
" Fet_Amp_13_cat | \n",
" Ca_Amp_13_cat | \n",
" Al_Amp_13_cat | \n",
" Na_Amp_13_cat | \n",
" K_Amp_13_cat | \n",
" Mn_Amp_13_cat | \n",
" Ti_Amp_13_cat | \n",
" Cr_Amp_13_cat | \n",
" F_Amp_13_cat | \n",
" Cl_Amp_13_cat | \n",
" cation_sum_Si_Mg | \n",
" Si_T | \n",
" Al_IV_T | \n",
" Ti_T | \n",
" Cr_C | \n",
" Fe3_C | \n",
" Mg_C | \n",
" Fe2_C | \n",
" Mn_C | \n",
" Ca_B | \n",
" Na_B | \n",
" Na_A | \n",
" K_A | \n",
" Al_VI_C | \n",
" Ti_C | \n",
" Charge | \n",
" Fe3_calc | \n",
" Fe2_calc | \n",
" O=F,Cl | \n",
" Total | \n",
" Mgno_Fe2 | \n",
" Mgno_FeT | \n",
" Na_calc | \n",
" B_Sum | \n",
" A_Sum | \n",
" class | \n",
" APE | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 4.589114 | \n",
" True | \n",
" | \n",
" Mg-hastingsite | \n",
" (1b+1c)/2 | \n",
" 1.917952 | \n",
" 7.00609 | \n",
" 6.80583 | \n",
" 99.609873 | \n",
" 96.99 | \n",
" 0.675221 | \n",
" 0.323045 | \n",
" 0.182474 | \n",
" 0.207386 | \n",
" 0.251469 | \n",
" 0.070992 | \n",
" 0.019534 | \n",
" 0.003665 | \n",
" 0.030664 | \n",
" 0.000132 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 5.984905 | \n",
" 2.863347 | \n",
" 1.617377 | \n",
" 1.838191 | \n",
" 2.228923 | \n",
" 0.629244 | \n",
" 0.173141 | \n",
" 0.032487 | \n",
" 0.271795 | \n",
" 0.001166 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 1.466669 | \n",
" 5.984905 | \n",
" 2.015095 | \n",
" 0 | \n",
" 0.001166 | \n",
" 0.777744 | \n",
" 2.863347 | \n",
" 0.839633 | \n",
" 0.032487 | \n",
" 1.838191 | \n",
" 0.161809 | \n",
" 0.467435 | \n",
" 0.173141 | \n",
" 0.213828 | \n",
" 0.271795 | \n",
" 45.222256 | \n",
" 0.777744 | \n",
" 0.839633 | \n",
" -0.0 | \n",
" NaN | \n",
" 0.773255 | \n",
" 0.639037 | \n",
" 0.161809 | \n",
" 2.0 | \n",
" 0.640576 | \n",
" N/A | \n",
" 29.021213 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" P_kbar_calc Input_Check Fail Msg classification equation H2O_calc \\\n",
"0 4.589114 True Mg-hastingsite (1b+1c)/2 1.917952 \n",
"\n",
" Fe2O3_calc FeO_calc Total_recalc Sum_input SiO2_Amp_cat_prop \\\n",
"0 7.00609 6.80583 99.609873 96.99 0.675221 \n",
"\n",
" MgO_Amp_cat_prop FeOt_Amp_cat_prop CaO_Amp_cat_prop Al2O3_Amp_cat_prop \\\n",
"0 0.323045 0.182474 0.207386 0.251469 \n",
"\n",
" Na2O_Amp_cat_prop K2O_Amp_cat_prop MnO_Amp_cat_prop TiO2_Amp_cat_prop \\\n",
"0 0.070992 0.019534 0.003665 0.030664 \n",
"\n",
" Cr2O3_Amp_cat_prop F_Amp_cat_prop Cl_Amp_cat_prop Si_Amp_13_cat \\\n",
"0 0.000132 0.0 0.0 5.984905 \n",
"\n",
" Mg_Amp_13_cat Fet_Amp_13_cat Ca_Amp_13_cat Al_Amp_13_cat Na_Amp_13_cat \\\n",
"0 2.863347 1.617377 1.838191 2.228923 0.629244 \n",
"\n",
" K_Amp_13_cat Mn_Amp_13_cat Ti_Amp_13_cat Cr_Amp_13_cat F_Amp_13_cat \\\n",
"0 0.173141 0.032487 0.271795 0.001166 0.0 \n",
"\n",
" Cl_Amp_13_cat cation_sum_Si_Mg Si_T Al_IV_T Ti_T Cr_C \\\n",
"0 0.0 1.466669 5.984905 2.015095 0 0.001166 \n",
"\n",
" Fe3_C Mg_C Fe2_C Mn_C Ca_B Na_B Na_A \\\n",
"0 0.777744 2.863347 0.839633 0.032487 1.838191 0.161809 0.467435 \n",
"\n",
" K_A Al_VI_C Ti_C Charge Fe3_calc Fe2_calc O=F,Cl Total \\\n",
"0 0.173141 0.213828 0.271795 45.222256 0.777744 0.839633 -0.0 NaN \n",
"\n",
" Mgno_Fe2 Mgno_FeT Na_calc B_Sum A_Sum class APE \n",
"0 0.773255 0.639037 0.161809 2.0 0.640576 N/A 29.021213 "
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_only_press(amp_comps=AmpT, equationP=\"P_Ridolfi2021\")"
]
},
{
"cell_type": "code",
"execution_count": 5,
"id": "5fcb95c8-dcbc-458b-b767-98079ea13ac8",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"6.251692054556109"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_only_press(amp_comps=AmpT, \n",
" equationP=\"P_Mutch2016\").P_kbar_calc[0]"
]
},
{
"cell_type": "code",
"execution_count": 6,
"id": "2aa3a773-e411-4d48-8d10-9f6c4273d884",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"4.199270205779337"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_only_press(amp_comps=AmpT, \n",
" equationP=\"P_Anderson1995\", T=1100)[0]"
]
},
{
"cell_type": "code",
"execution_count": 7,
"id": "27a7ca6c-4b31-4f76-953b-3da62218602a",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1229.1534012312634"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_only_temp(amp_comps=AmpT, \n",
" equationT=\"T_Put2016_eq5\")[0]"
]
},
{
"cell_type": "code",
"execution_count": 8,
"id": "aa718fb9-e1e5-4873-a10b-e10e1131eec2",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1227.6548856789914"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_only_temp(amp_comps=AmpT, \n",
" equationT=\"T_Put2016_eq8\", P=6)[0]"
]
},
{
"cell_type": "code",
"execution_count": 9,
"id": "a61df985-a7bb-4f98-8d7e-f6c0662b15c9",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0.10279462682872165"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_only_press_temp(amp_comps=AmpT,\n",
" equationP=\"P_Anderson1995\", equationT=\"T_Put2016_eq8\").P_kbar_calc[0]"
]
},
{
"cell_type": "code",
"execution_count": 10,
"id": "d40aa278-3eb7-4f5d-a6a9-8fc7dc7f90e2",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" P_kbar_calc | \n",
" T_K_calc | \n",
" Delta_P_kbar_Iter | \n",
" Delta_T_K_Iter | \n",
" SiO2_Amp | \n",
" TiO2_Amp | \n",
" Al2O3_Amp | \n",
" FeOt_Amp | \n",
" MnO_Amp | \n",
" MgO_Amp | \n",
" CaO_Amp | \n",
" Na2O_Amp | \n",
" K2O_Amp | \n",
" Cr2O3_Amp | \n",
" F_Amp | \n",
" Cl_Amp | \n",
" Sample_ID_Amp | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0.102795 | \n",
" 1203.682746 | \n",
" 0.0 | \n",
" 0.0 | \n",
" 40.57 | \n",
" 2.45 | \n",
" 12.82 | \n",
" 13.11 | \n",
" 0.26 | \n",
" 13.02 | \n",
" 11.63 | \n",
" 2.2 | \n",
" 0.92 | \n",
" 0.01 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" P_kbar_calc T_K_calc Delta_P_kbar_Iter Delta_T_K_Iter SiO2_Amp \\\n",
"0 0.102795 1203.682746 0.0 0.0 40.57 \n",
"\n",
" TiO2_Amp Al2O3_Amp FeOt_Amp MnO_Amp MgO_Amp CaO_Amp Na2O_Amp \\\n",
"0 2.45 12.82 13.11 0.26 13.02 11.63 2.2 \n",
"\n",
" K2O_Amp Cr2O3_Amp F_Amp Cl_Amp Sample_ID_Amp \n",
"0 0.92 0.01 0 0 0 "
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_only_press_temp(amp_comps=AmpT,\n",
" equationP=\"P_Anderson1995\", equationT=\"T_Put2016_eq8\")"
]
},
{
"cell_type": "code",
"execution_count": 11,
"id": "2df63bb2-ae74-4dbc-9afa-d23a56286e9c",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1203.68274583705"
]
},
"execution_count": 11,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_only_press_temp(amp_comps=AmpT,\n",
" equationP=\"P_Anderson1995\", equationT=\"T_Put2016_eq8\").T_K_calc[0]"
]
},
{
"cell_type": "code",
"execution_count": 12,
"id": "f111df30-8fef-4531-ac3a-1809ee5edb23",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"1221.9196325167923"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_only_press_temp(amp_comps=AmpT,\n",
" equationP=\"P_Ridolfi2021\", equationT=\"T_Put2016_eq8\").T_K_calc[0]"
]
},
{
"cell_type": "code",
"execution_count": 13,
"id": "7c7f341c-c8ac-4ad7-8369-f2b2932bac60",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"4.589113613235159"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_only_press_temp(amp_comps=AmpT,\n",
" equationP=\"P_Ridolfi2021\", equationT=\"T_Put2016_eq8\").P_kbar_calc[0]"
]
},
{
"cell_type": "code",
"execution_count": 14,
"id": "e4fede8a-f022-48b8-aaff-d41cdb644317",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 1247.384143\n",
"dtype: float64"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_liq_temp(liq_comps=LiqT, amp_comps=AmpT, equationT=\"T_Put2016_eq4a_amp_sat\")"
]
},
{
"cell_type": "code",
"execution_count": 15,
"id": "bebe685b-0f89-4d2e-a258-ba113526a5d9",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 1234.702307\n",
"dtype: float64"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_liq_temp(liq_comps=LiqT, amp_comps=AmpT, equationT=\"T_Put2016_eq4b\")"
]
},
{
"cell_type": "code",
"execution_count": 16,
"id": "481f39ec-c145-4dae-9f70-c9cf5e57b24d",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 1220.480674\n",
"dtype: float64"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_liq_temp(liq_comps=LiqT, amp_comps=AmpT, equationT=\"T_Put2016_eq4b\", H2O_Liq=0)"
]
},
{
"cell_type": "code",
"execution_count": 17,
"id": "87dfdc44-4516-4bf5-8631-dfc56751c19c",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Note - Putirka 2016 spreadsheet calculates H2O using a H2O-solubility law of uncertian origin based on the pressure calculated for 7a, and iterates H2O and P. We dont do this, as we dont believe a pure h2o model is necessarily valid as you may be mixed fluid saturated or undersaturated. We recomend instead you choose a reasonable H2O content based on your system.\n"
]
},
{
"data": {
"text/plain": [
"0 2.701862\n",
"dtype: float64"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_liq_press(liq_comps=LiqT, amp_comps=AmpT, equationP=\"P_Put2016_eq7a\", H2O_Liq=0)"
]
},
{
"cell_type": "code",
"execution_count": 18,
"id": "efb0bb29-d90e-4ef3-8177-1b369fd85087",
"metadata": {},
"outputs": [
{
"data": {
"text/plain": [
"0 0.495501\n",
"dtype: float64"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_liq_press(liq_comps=LiqT, amp_comps=AmpT, equationP=\"P_Put2016_eq7b\", H2O_Liq=0)"
]
},
{
"cell_type": "code",
"execution_count": 19,
"id": "15635fba-67e0-44ad-a55b-edc1d4ee6c1c",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" P_kbar_calc | \n",
" Kd-Fe-Mg | \n",
" Eq Putirka 2016? | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 4.359844 | \n",
" 0.854897 | \n",
" N | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" P_kbar_calc Kd-Fe-Mg Eq Putirka 2016?\n",
"0 4.359844 0.854897 N"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_liq_press(liq_comps=LiqT, amp_comps=AmpT, equationP=\"P_Put2016_eq7b\", eq_tests=True)"
]
},
{
"cell_type": "code",
"execution_count": 20,
"id": "db7a3f15-6834-482b-a02d-63630a3673da",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" SiO2_Liq | \n",
" TiO2_Liq | \n",
" Al2O3_Liq | \n",
" FeOt_Liq | \n",
" MnO_Liq | \n",
" MgO_Liq | \n",
" CaO_Liq | \n",
" Na2O_Liq | \n",
" K2O_Liq | \n",
" Cr2O3_Liq | \n",
" P2O5_Liq | \n",
" H2O_Liq | \n",
" Fe3Fet_Liq | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 51 | \n",
" 0.48 | \n",
" 19 | \n",
" 5.3 | \n",
" 0.1 | \n",
" 4.5 | \n",
" 9 | \n",
" 4.2 | \n",
" 0.1 | \n",
" 0.11 | \n",
" 0.11 | \n",
" 5 | \n",
" 0.1 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" SiO2_Liq TiO2_Liq Al2O3_Liq FeOt_Liq MnO_Liq MgO_Liq CaO_Liq \\\n",
"0 51 0.48 19 5.3 0.1 4.5 9 \n",
"\n",
" Na2O_Liq K2O_Liq Cr2O3_Liq P2O5_Liq H2O_Liq Fe3Fet_Liq \n",
"0 4.2 0.1 0.11 0.11 5 0.1 "
]
},
"execution_count": 20,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"LiqT"
]
},
{
"cell_type": "code",
"execution_count": 21,
"id": "c12183d2-cb78-4d09-9497-2547b81c5882",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Youve selected a P-independent function\n",
"Note - Putirka 2016 spreadsheet calculates H2O using a H2O-solubility law of uncertian origin based on the pressure calculated for 7a, and iterates H2O and P. We dont do this, as we dont believe a pure h2o model is necessarily valid as you may be mixed fluid saturated or undersaturated. We recomend instead you choose a reasonable H2O content based on your system.\n",
"Youve selected a T-independent function\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" P_kbar_calc | \n",
" T_K_calc | \n",
" Delta_P_kbar_Iter | \n",
" Delta_T_K_Iter | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 5.264159 | \n",
" 1234.702307 | \n",
" 0.0 | \n",
" 0.0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" P_kbar_calc T_K_calc Delta_P_kbar_Iter Delta_T_K_Iter\n",
"0 5.264159 1234.702307 0.0 0.0"
]
},
"execution_count": 21,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_liq_press_temp(liq_comps=LiqT, amp_comps=AmpT, \n",
" equationP=\"P_Put2016_eq7a\", equationT=\"T_Put2016_eq4b\")"
]
},
{
"cell_type": "code",
"execution_count": 22,
"id": "3bbcf0c4-d33f-4477-965a-7b986b8a32f4",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Youve selected a T-independent function\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"g:\\my drive\\postdoc\\pymme\\mybarometers\\thermobar_outer\\src\\Thermobar\\amphibole.py:453: UserWarning: This barometer gives the PH2O for the first appearance of amphibole. It should only be applied to the highest Mg# in each sample suite. Note, if there is CO2 in the system P=/ PH2O\n",
" w.warn('This barometer gives the PH2O for the first appearance of'\n"
]
}
],
"source": [
"P_func = pt.calculate_amp_only_press(amp_comps=AmpT, equationP=\"P_Kraw2012\", T=\"Solve\", deltaNNO=1)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"id": "2de4028a-b7ba-4c97-a08e-7f64430ba76f",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" PH2O_kbar_calc | \n",
" Mg#_Amp | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0.154678 | \n",
" 63.902798 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" PH2O_kbar_calc Mg#_Amp\n",
"0 0.154678 63.902798"
]
},
"execution_count": 23,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"P_func"
]
},
{
"cell_type": "code",
"execution_count": 24,
"id": "bf9601d1-6384-4a72-9ecc-52afe507be8d",
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"Youve selected a P-independent function\n",
"Youve selected a T-independent function\n"
]
},
{
"name": "stderr",
"output_type": "stream",
"text": [
"g:\\my drive\\postdoc\\pymme\\mybarometers\\thermobar_outer\\src\\Thermobar\\amphibole.py:453: UserWarning: This barometer gives the PH2O for the first appearance of amphibole. It should only be applied to the highest Mg# in each sample suite. Note, if there is CO2 in the system P=/ PH2O\n",
" w.warn('This barometer gives the PH2O for the first appearance of'\n"
]
},
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" P_kbar_calc | \n",
" T_K_calc | \n",
" Delta_P_kbar_Iter | \n",
" Delta_T_K_Iter | \n",
" SiO2_Amp | \n",
" TiO2_Amp | \n",
" Al2O3_Amp | \n",
" FeOt_Amp | \n",
" MnO_Amp | \n",
" MgO_Amp | \n",
" CaO_Amp | \n",
" Na2O_Amp | \n",
" K2O_Amp | \n",
" Cr2O3_Amp | \n",
" F_Amp | \n",
" Cl_Amp | \n",
" Sample_ID_Amp | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0.154678 | \n",
" 1229.153401 | \n",
" 0 | \n",
" 0 | \n",
" 40.57 | \n",
" 2.45 | \n",
" 12.82 | \n",
" 13.11 | \n",
" 0.26 | \n",
" 13.02 | \n",
" 11.63 | \n",
" 2.2 | \n",
" 0.92 | \n",
" 0.01 | \n",
" 0 | \n",
" 0 | \n",
" 0 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" P_kbar_calc T_K_calc Delta_P_kbar_Iter Delta_T_K_Iter SiO2_Amp \\\n",
"0 0.154678 1229.153401 0 0 40.57 \n",
"\n",
" TiO2_Amp Al2O3_Amp FeOt_Amp MnO_Amp MgO_Amp CaO_Amp Na2O_Amp \\\n",
"0 2.45 12.82 13.11 0.26 13.02 11.63 2.2 \n",
"\n",
" K2O_Amp Cr2O3_Amp F_Amp Cl_Amp Sample_ID_Amp \n",
"0 0.92 0.01 0 0 0 "
]
},
"execution_count": 24,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_only_press_temp( amp_comps=AmpT, \n",
" equationP=\"P_Kraw2012\", equationT=\"T_Put2016_eq5\", deltaNNO=1)"
]
},
{
"cell_type": "code",
"execution_count": 25,
"id": "cb0dac06-34f9-4b01-a4eb-a49acb8ba97f",
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"\n",
"\n",
"
\n",
" \n",
" \n",
" | \n",
" PH2O_kbar_calc | \n",
" Mg#_Amp | \n",
"
\n",
" \n",
" \n",
" \n",
" 0 | \n",
" 0.154678 | \n",
" 63.902798 | \n",
"
\n",
" \n",
"
\n",
"
"
],
"text/plain": [
" PH2O_kbar_calc Mg#_Amp\n",
"0 0.154678 63.902798"
]
},
"execution_count": 25,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"pt.calculate_amp_only_press( amp_comps=AmpT, \n",
" equationP=\"P_Kraw2012\", deltaNNO=1)"
]
},
{
"cell_type": "code",
"execution_count": null,
"id": "29859baf-b509-43d3-8243-403fb39d6dac",
"metadata": {},
"outputs": [],
"source": []
}
],
"metadata": {
"kernelspec": {
"display_name": "Python 3 (ipykernel)",
"language": "python",
"name": "python3"
},
"language_info": {
"codemirror_mode": {
"name": "ipython",
"version": 3
},
"file_extension": ".py",
"mimetype": "text/x-python",
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.9.12"
}
},
"nbformat": 4,
"nbformat_minor": 5
}