{ "cells": [ { "cell_type": "markdown", "metadata": {}, "source": [ "# Latex" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "import smpl\n", "from smpl import latex\n", "from smpl import io\n", "from uncertainties import ufloat\n", "import uncertainties.unumpy as unp\n", "import numpy as np\n" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(latex.si(ufloat(1,1),\"\\\\tesla\"))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "data = np.loadtxt(io.find_file('test_linear_data.txt',3))\n", "xdata = data[:,0]\n", "xerr = data[:,2]\n", "ydata = data[:,1]\n", "yerr = data[:,3]\n", "x = unp.uarray(xdata,xerr)\n", "y = unp.uarray(ydata,yerr)" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(latex.si_line(x))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(latex.si_tab([x,y]))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [ "print(latex.si_ttab([x,y]))" ] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] }, { "cell_type": "code", "execution_count": null, "metadata": {}, "outputs": [], "source": [] } ], "metadata": { "kernelspec": { "display_name": "Python 3", "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.8.7" } }, "nbformat": 4, "nbformat_minor": 4 }