{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Liquid-only thermometry\n", "- This script shows how to use the various options for liquid-only thermometry\n", "- This tutorial is also a great starting point when using other thermobarometers, as the choice of inputs is the same as for other phases\n", "- You can download the Excel spreadsheet you need here: https://github.com/PennyWieser/Thermobar/blob/main/docs/Examples/Liquid_Ol_Liq_Themometry/Liquid_only_Thermometry.xlsx" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### You need to install Thermobar once on your machine, if you haven't done this yet, uncomment the line below (remove the #)" ] }, { "cell_type": "code", "execution_count": 1, "metadata": {}, "outputs": [], "source": [ "#!pip install Thermobar" ] }, { "cell_type": "code", "execution_count": 2, "metadata": {}, "outputs": [], "source": [ "import numpy as np\n", "import pandas as pd\n", "import matplotlib.pyplot as plt\n", "import Thermobar as pt" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "## Load in data\n", "- The function \"import_excel\" allows you to specify the name of the excel file and the sheet name.\n", "- Data should have the headings SiO2_Liq, TiO2_Liq etc. etc. The order of headings doesn't matter.\n", "- As in the 5 min intro example, you could also have no _Liq in the headings, and load them in the functoin using suffix=\"_Liq\"\n", "- You can also have any other columns, e.g., estimate of pressure from any other proxy (melt inclusions, geophysics), and anything else you might want to plot (e.g., latitude, longitude)" ] }, { "cell_type": "code", "execution_count": 3, "metadata": {}, "outputs": [], "source": [ "out=pt.import_excel('Liquid_only_Thermometry.xlsx', sheet_name=\"Liquid_only\")\n", "my_input=out['my_input']\n", "myLiquids1=out['Liqs']" ] }, { "cell_type": "markdown", "metadata": {}, "source": [ "### Inspect inputs to check you didn't have any funny column headings.\n", "- It is always useful to inspect the outputs from import_excel, sometimes your column headings may have funny characters due to use of spaces, subscripts etc. in journal pdf tables. Check that all the columns you entered have numbers. If, say your SiO2_Liq heading had funny characters, this column will be filled with zeros when you inspect it." ] }, { "cell_type": "code", "execution_count": 4, "metadata": {}, "outputs": [ { "data": { "text/html": [ "
\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", "NiO_Liq | \n", "CoO_Liq | \n", "CO2_Liq | \n", "Sample_ID_Liq | \n", "
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
0 | \n", "57.023602 | \n", "0.623106 | \n", "16.332899 | \n", "4.36174 | \n", "0.103851 | \n", "4.19180 | \n", "6.94858 | \n", "3.59702 | \n", "0.896895 | \n", "0.000000 | \n", "0.226584 | \n", "5.59 | \n", "0.2 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "0 | \n", "
1 | \n", "57.658600 | \n", "0.654150 | \n", "17.194799 | \n", "3.90621 | \n", "0.084105 | \n", "2.86892 | \n", "5.91538 | \n", "3.85948 | \n", "1.018600 | \n", "0.000000 | \n", "0.214935 | \n", "6.55 | \n", "0.2 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "1 | \n", "
2 | \n", "60.731201 | \n", "0.862054 | \n", "17.144199 | \n", "4.07781 | \n", "0.077488 | \n", "2.50867 | \n", "5.22075 | \n", "4.45556 | \n", "1.414160 | \n", "0.000000 | \n", "0.319638 | \n", "3.14 | \n", "0.2 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "2 | \n", "
3 | \n", "61.532799 | \n", "0.440860 | \n", "16.508801 | \n", "3.32990 | \n", "0.037520 | \n", "1.64150 | \n", "4.34294 | \n", "4.40860 | \n", "1.407000 | \n", "0.000000 | \n", "0.215740 | \n", "6.20 | \n", "0.2 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "3 | \n", "
4 | \n", "52.969101 | \n", "0.803412 | \n", "17.563000 | \n", "5.93217 | \n", "0.149472 | \n", "3.78351 | \n", "7.65110 | \n", "3.80219 | \n", "0.551178 | \n", "0.037368 | \n", "0.196182 | \n", "6.58 | \n", "0.2 | \n", "0.0 | \n", "0.0 | \n", "0.0 | \n", "4 | \n", "