{ "cells": [ { "cell_type": "markdown", "id": "f481cec8-9986-459d-84d9-13e8a2977a81", "metadata": {}, "source": [ "# This notebook shows how to convert from Oxide wt% to element wt% and back again\n", "- You can download the spreadsheet here: https://github.com/PennyWieser/Thermobar/blob/main/docs/Examples/Other_features/Ox_to_element.xlsx" ] }, { "cell_type": "code", "execution_count": 1, "id": "026609db-0bcf-4ab4-af9a-bedcab6b5fa4", "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "import Thermobar as pt#\n", "pd.options.display.max_columns = None\n", "pd.options.display.max_rows = None\n", "import matplotlib.pyplot as plt" ] }, { "cell_type": "markdown", "id": "a2dfa8de-429b-45d1-aa54-12cb3a4a48b0", "metadata": {}, "source": [ "## Load in oxide wt % values (in this case, from plag)" ] }, { "cell_type": "code", "execution_count": 2, "id": "a5340200-6999-48e5-b48e-9ba999e0ad78", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
SiO2_PlagTiO2_PlagAl2O3_PlagFeOt_PlagMnO_PlagMgO_PlagCaO_PlagNa2O_PlagK2O_PlagCr2O3_PlagSample_ID_Plag
054.670.2426.811.470.00.4210.594.550.350.00
152.050.0729.260.810.00.1512.264.070.170.01
252.730.0728.730.770.00.1311.444.580.180.02
356.890.0126.880.210.00.018.556.060.160.03
454.540.0226.920.190.00.048.426.030.180.04
\n", "
" ], "text/plain": [ " SiO2_Plag TiO2_Plag Al2O3_Plag FeOt_Plag MnO_Plag MgO_Plag CaO_Plag \\\n", "0 54.67 0.24 26.81 1.47 0.0 0.42 10.59 \n", "1 52.05 0.07 29.26 0.81 0.0 0.15 12.26 \n", "2 52.73 0.07 28.73 0.77 0.0 0.13 11.44 \n", "3 56.89 0.01 26.88 0.21 0.0 0.01 8.55 \n", "4 54.54 0.02 26.92 0.19 0.0 0.04 8.42 \n", "\n", " Na2O_Plag K2O_Plag Cr2O3_Plag Sample_ID_Plag \n", "0 4.55 0.35 0.0 0 \n", "1 4.07 0.17 0.0 1 \n", "2 4.58 0.18 0.0 2 \n", "3 6.06 0.16 0.0 3 \n", "4 6.03 0.18 0.0 4 " ] }, "metadata": {}, "output_type": "display_data" } ], "source": [ "ExcelIn_TB=pt.import_excel('Ox_to_element.xlsx', sheet_name=\"Plag\")\n", "ExcelIn_Plag=ExcelIn_TB['Plags']\n", "Excel_In=ExcelIn_TB['my_input']\n", "display(ExcelIn_Plag.head())" ] }, { "cell_type": "markdown", "id": "40321358-d1ad-492b-b443-ee6b804385a6", "metadata": {}, "source": [ "## Convert to element wt%\n", "- You have to specify the suffix on the data, so that Thermobar knows how to strip it off to do the processing, e.g. in this case _Plag\n", "- By default, it includes oxygen, this means that O is added to sum to 100" ] }, { "cell_type": "code", "execution_count": 3, "id": "d44f16db-735b-4eda-8f18-5a4351780602", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Si_wtMg_wtFe_wtCa_wtAl_wtNa_wtK_wtMn_wtTi_wtCr_wtP_wtF_wtH_wtCl_wtO_wt_make_to_100
025.5547950.2532781.1426137.56835914.1892503.3754480.2905550.00.1437840.00.00.00.00.047.481919
124.3301090.0904560.6296038.76185915.4859183.0193570.1411270.00.0419370.00.00.00.00.047.499635
224.6479660.0783950.5985118.17582915.2054143.3977040.1494280.00.0419370.00.00.00.00.047.704814
326.5925050.0060300.1632306.11043214.2262984.4956520.1328250.00.0059910.00.00.00.00.048.267037
425.4940280.0241220.1476856.01752514.2474684.4733960.1494280.00.0119820.00.00.00.00.049.434367
\n", "
" ], "text/plain": [ " Si_wt Mg_wt Fe_wt Ca_wt Al_wt Na_wt K_wt \\\n", "0 25.554795 0.253278 1.142613 7.568359 14.189250 3.375448 0.290555 \n", "1 24.330109 0.090456 0.629603 8.761859 15.485918 3.019357 0.141127 \n", "2 24.647966 0.078395 0.598511 8.175829 15.205414 3.397704 0.149428 \n", "3 26.592505 0.006030 0.163230 6.110432 14.226298 4.495652 0.132825 \n", "4 25.494028 0.024122 0.147685 6.017525 14.247468 4.473396 0.149428 \n", "\n", " Mn_wt Ti_wt Cr_wt P_wt F_wt H_wt Cl_wt O_wt_make_to_100 \n", "0 0.0 0.143784 0.0 0.0 0.0 0.0 0.0 47.481919 \n", "1 0.0 0.041937 0.0 0.0 0.0 0.0 0.0 47.499635 \n", "2 0.0 0.041937 0.0 0.0 0.0 0.0 0.0 47.704814 \n", "3 0.0 0.005991 0.0 0.0 0.0 0.0 0.0 48.267037 \n", "4 0.0 0.011982 0.0 0.0 0.0 0.0 0.0 49.434367 " ] }, "execution_count": 3, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wt_calc_withO=pt.convert_oxide_percent_to_element_weight_percent(df=ExcelIn_Plag, \n", " suffix=\"_Plag\", without_oxygen=False)\n", "wt_calc_withO.head()" ] }, { "cell_type": "markdown", "id": "527f711f-5562-4444-bf77-c92299bac253", "metadata": {}, "source": [ "## Lets compare this to that calculated by EPMA software" ] }, { "attachments": { "b5818469-5c14-41b6-90fd-8b84db306c77.png": { "image/png": "iVBORw0KGgoAAAANSUhEUgAAApMAAABlCAYAAAARQmjQAAAgAElEQVR4Ae1d3YrluBH2Q83VeZa5Pu8xb9C3TafZpplAIBAIhA4EFhaWWVgILCS5m/t5DQdJLqtU+rF+ypJ9XAODLVsu1Vf1Vaksu4+nHz9+zPJfbCAcEA4IB4QDwgHhgHBAOFDDganmIrlGyCYcEA4IB4QDwgHhgHBAOKA4IMWkrMzKyrRwQDggHBAOCAeEA8KBag5IMSnkqSaP3JHKHalwQDggHBAOCAeEA14x+Z///OfSxYXgF/9fOTEK/4X/wv/rFgYS/xL/tfHvFZN//PHHpYtJwS/+rw2mR7hO+C/8fwQe12IQ/gv/a7nzCNe18N8rJv/9739fupgU/OL/R0gKtRiE/8L/Wu48wnXCf+H/I/C4FkML/71i8vfff790MSn4xf+1gfgI1wn/hf+PwONaDMJ/4X8tdx7huhb+T//973+d4vG3335z2o9goBIMgl/8X8KXR+sr/Bf+PxqnS/AI/4X/JXx5tL4t/J/+8Y9/OMXjr7/+6rR7G+vr52mePn8dpsMY/F/nz9M0T+v/T/OXb2NeAh+DH7B+m798wnb4PH/t/Nf2/fFT3yv8V/P/cWzQ3//Afd8Gn758654Hx+H/Mevcv+bAaZ4+fZm/XSL+Q/Gu+BA6DnzZZzvS/z9+KMz9cz6uccbiVz4d43ewQQt+r5j85ZdfuicwAPLj25f506fP8+dP4wg1Bj8h0NfPQxKp8sMY/BBE0+xMo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1RX0nZymjm31jLJWgGDJDLxqcL9FvzMxWS4Yl4nAwCmEyp+fAkn8HYx7AQrcm7xYHsSB9gTVXstxswbMIUrhcWc82yZN2h2Lxb8OkDAb2i7ziigDsUUwL9MvrBCu4qgY2wWrjBmesuCf5lAQWfYat8l9Sb4aV+IBW2EzFhLw/XO8uD3xLoHHJ/iuCb41VVOXyjCXHGcrT3w6xsd8J3zh4QUb9qncTl8FtgDv+vDlL8T+GksMMU7tdxY/JTv2FbqRhTlUodHFEV9+8j4LSoTN3vMhfz4A7pGcxrNB0t7zR0uH/awRwt+5mLSwkvt6VXGtSpI9ex/rsWY/bXlH1HwyxcQ+Fl1HonCf+H/edjKr6nwX/hfy6oBxaSptg9aSzK8gFvrimNcJ8lEkskxmDhGC+G/8H8M844xqvBf+F/LxAHFZK2qfa6TYJJg6sO0Y44i/Bf+H5OZfbQS/gv/+zDtmKO08F+KSeLTFmMSUadsCn5JpqckLpPSwn/hPxOVTilG+C/8ryXu9P7+Pr+9vc2vr6/zy8vL/Pz8rB/1KlLJf7GBcEA4IBwQDggHhAPCAeFAigOyMknKcGWsK/8T/OJ/4f91LSDxL/F/XfZz/Gj5ua3XEv//B1hE99bBV0KKAAAAAElFTkSuQmCC" } }, "cell_type": "markdown", "id": "b922e009-1f9d-49ef-b735-3b171abf5920", "metadata": {}, "source": [ "![image.png](attachment:b5818469-5c14-41b6-90fd-8b84db306c77.png)" ] }, { "cell_type": "markdown", "id": "c95e0a71-c90a-4c80-845e-6d6cc338580a", "metadata": {}, "source": [ "### Without oxygen" ] }, { "cell_type": "code", "execution_count": 4, "id": "6b713cbe-c4e6-45ee-91b9-17e32cea0ad5", "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\n", "\n", "\n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", " \n", "
Si_wt_noO2Mg_wt_noO2Fe_wt_noO2Ca_wt_noO2Al_wt_noO2Na_wt_noO2K_wt_noO2Mn_wt_noO2Ti_wt_noO2Cr_wt_noO2P_wt_noO2F_wt_noO2H_wt_noO2Cl_wt_noO2
048.6590410.4822672.17565614.41095927.0178386.4272110.5532470.00.2737810.00.00.00.00.0
146.3427420.1722961.19923516.68913929.4967815.7511160.2688110.00.0798800.00.00.00.00.0
247.1323820.1499091.14448715.63400029.0761266.4971640.2857400.00.0801930.00.00.00.00.0
351.4034060.0116570.31552511.81148627.4994838.6901110.2567510.00.0115810.00.00.00.00.0
450.4176980.0477040.29206511.90042428.1761888.8467120.2955130.00.0236960.00.00.00.00.0
\n", "
" ], "text/plain": [ " Si_wt_noO2 Mg_wt_noO2 Fe_wt_noO2 Ca_wt_noO2 Al_wt_noO2 Na_wt_noO2 \\\n", "0 48.659041 0.482267 2.175656 14.410959 27.017838 6.427211 \n", "1 46.342742 0.172296 1.199235 16.689139 29.496781 5.751116 \n", "2 47.132382 0.149909 1.144487 15.634000 29.076126 6.497164 \n", "3 51.403406 0.011657 0.315525 11.811486 27.499483 8.690111 \n", "4 50.417698 0.047704 0.292065 11.900424 28.176188 8.846712 \n", "\n", " K_wt_noO2 Mn_wt_noO2 Ti_wt_noO2 Cr_wt_noO2 P_wt_noO2 F_wt_noO2 \\\n", "0 0.553247 0.0 0.273781 0.0 0.0 0.0 \n", "1 0.268811 0.0 0.079880 0.0 0.0 0.0 \n", "2 0.285740 0.0 0.080193 0.0 0.0 0.0 \n", "3 0.256751 0.0 0.011581 0.0 0.0 0.0 \n", "4 0.295513 0.0 0.023696 0.0 0.0 0.0 \n", "\n", " H_wt_noO2 Cl_wt_noO2 \n", "0 0.0 0.0 \n", "1 0.0 0.0 \n", "2 0.0 0.0 \n", "3 0.0 0.0 \n", "4 0.0 0.0 " ] }, "execution_count": 4, "metadata": {}, "output_type": "execute_result" } ], "source": [ "wt_calc_withoutO=pt.convert_oxide_percent_to_element_weight_percent(df=ExcelIn_Plag, \n", " suffix=\"_Plag\", without_oxygen=True)\n", "wt_calc_withoutO.head()" ] } ], "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 }