(PS: manchmal ist GitHub etwas überfordert mit der Vorschau der ganzen Notebooks — am Besten runterladen, oder im Binder anschauen!)
-
-
Save r4lv/6d98b05844c035f318ceec0c5dea9219 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"cells": [ | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Physik V Gruppe 3 — Tutorium #4\n", | |
"\n", | |
"> 26.11.2020 ralf@uni-bonn.de" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 1, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.119916Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.119507Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.502553Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.501975Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.119873Z" | |
}, | |
"jupyter": { | |
"source_hidden": true | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"import numpy as np\n", | |
"import astropy.units as u\n", | |
"import astropy.constants as const\n", | |
"\n", | |
"# import sympy as sy\n", | |
"# from uncertainties import ufloat, unumpy as unp\n", | |
"\n", | |
"u.c = u.def_unit('c', const.c) # verwende 'c' als Einheit, statt als Konstante" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 2, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.503839Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.503516Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.511600Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.510795Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.503815Z" | |
}, | |
"jupyter": { | |
"source_hidden": true | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"from IPython.display import display, Math, Latex, Markdown\n", | |
"from IPython.core.magic import register_line_magic, needs_local_scope\n", | |
"import re\n", | |
"\n", | |
"def _pretty(s):\n", | |
" \n", | |
" try:\n", | |
" # `import pint`\n", | |
" if isinstance(s, pint.quantity.Quantity):\n", | |
" return re.sub(r\"\\\\$\", \"\", f\"{s:.5~L}\")\n", | |
" except:\n", | |
" pass\n", | |
" try:\n", | |
" # `import sympy as sy`\n", | |
" if isinstance(s, sy.core.expr.Expr):\n", | |
" return sy.latex(s)\n", | |
" except:\n", | |
" pass\n", | |
" try:\n", | |
" # `import astropy.units as u`\n", | |
" if isinstance(s, (int, float)):\n", | |
" s = u.Quantity(s)\n", | |
" if isinstance(s, u.quantity.Quantity):\n", | |
" return s.to_string(format=\"latex\").lstrip(\"$\").rstrip(\"$\")\n", | |
" except Exception as e:\n", | |
" raise e\n", | |
" pass\n", | |
" \n", | |
" return str(s)\n", | |
"\n", | |
"def tex(*s, tag=\"align\"):\n", | |
" display(Latex(r\"\\begin{\"+tag+\"}\" + \"\\n\"+ ' '.join(_pretty(e) for e in s) + \"\\n\" + r\"\\end{\"+tag+\"}\"))\n", | |
"\n", | |
"@register_line_magic(\"tex\")\n", | |
"@needs_local_scope\n", | |
"def _tex(line, local_ns):\n", | |
" # TODO: handle single `<` and `>`\n", | |
" tex(re.sub(\"<(.*?)>\", lambda m: _pretty(eval(m.group(1))), line))\n", | |
"\n", | |
"del _tex # prevent conflicts in interactive session" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": { | |
"jupyter": { | |
"source_hidden": true | |
} | |
}, | |
"source": [ | |
"(TeX Commands)\n", | |
"\n", | |
"$$\n", | |
"\\newcommand\\dv[2]{\\frac{\\mathrm d #1}{\\mathrm d #2}}\n", | |
"\\newcommand\\sub[1]{_{\\text{#1}}}\n", | |
"$$" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"# Blatt 2: A2. Yukawa-Potential" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 3, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.514009Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.513715Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.518242Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.517201Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.513973Z" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"m_pi = 140*u.MeV" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"$$\n", | |
"R = \\frac\\hbar{M_X c} \\overset{\\text{nat}}= \\frac1m \n", | |
"$$" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 4, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.520096Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.519779Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.532900Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.531959Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.520070Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"$0.0071428571 \\; \\mathrm{\\frac{1}{MeV}}$" | |
], | |
"text/plain": [ | |
"<Quantity 0.00714286 1 / MeV>" | |
] | |
}, | |
"execution_count": 4, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"R_nat = 1/m_pi\n", | |
"R_nat" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"**Frage Blatt:** Welche Reichweite ergibt sich für den Austausch von Pionen (`m = m_pi`)?\n", | |
"\n", | |
"**Hausaufgabe:** Mit was muss ich `R_nat` multiplizieren, um auf *Meter* zu kommen?\n", | |
"\n", | |
"\n", | |
"→ zB im Papier von [L. Myers: Natural System of Units in General Relativity](https://www.seas.upenn.edu/~amyers/NaturalUnits.pdf) gibt es eine hübsche Tabelle mit Vorfaktoren für die Umrechnung in/von natürliche Einheiten. Bei `mass` steht zB $c^{-2}$, was allerdings die Umrechnung **von** natürlichen **in** SI-Einheiten ist. Aufpassen!\n", | |
"\n", | |
"Beispiel:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 5, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.534432Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.534144Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.540470Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.539909Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.534397Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"$5.6095886 \\times 10^{35} \\; \\mathrm{eV}$" | |
], | |
"text/plain": [ | |
"<Quantity 5.6095886e+35 eV>" | |
] | |
}, | |
"execution_count": 5, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"( (1*u.kg) * const.c**2 ).to(\"eV\")" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Für die Umrechnung von `1/eV` in Meter:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 6, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.541351Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.541198Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.547583Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.546528Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.541332Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"$1.4094784 \\; \\mathrm{fm}$" | |
], | |
"text/plain": [ | |
"<Quantity 1.40947843 fm>" | |
] | |
}, | |
"execution_count": 6, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"(R_nat * const.hbar * const.c).to(\"fm\")" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## H1. Radionuklidbatterien" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Aktivität:\n", | |
"\n", | |
"$$\n", | |
"A(t) = -\\dv{N(t)}t = \\lambda N_0 e^{-\\lambda t}\n", | |
"\\qquad \\lambda = \\frac{\\ln 2}{T_{1/2}}\n", | |
"$$\n", | |
"\n", | |
"\n", | |
"für $t=0$:\n", | |
"\n", | |
"$$\n", | |
"A(0) = \\frac{\\ln 2\\ N_0}{T_{1/2}} \\qquad \\Rightarrow N\\sub{Pu} \\equiv N_0 = \\dots\n", | |
"$$\n", | |
"\n", | |
"Leistung der Batterie:\n", | |
"\n", | |
"$$\n", | |
"A_0 = \\frac P{E_\\alpha\\, \\kappa} \\equiv A(0)\n", | |
"$$\n" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 7, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.548951Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.548682Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.552802Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.552163Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.548916Z" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"P0 = 480*u.W\n", | |
"T12 = 87.7*u.a\n", | |
"E_alpha = 5.593*u.MeV\n", | |
"\n", | |
"kappa = 5*u.percent" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 8, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.553755Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.553592Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.561070Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.560391Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.553735Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\begin{align}\n", | |
"A_0 = 1.0713121 \\times 10^{16} \\; \\mathrm{Bq}\n", | |
"\\end{align}" | |
], | |
"text/plain": [ | |
"<IPython.core.display.Latex object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"A0 = P0 / (E_alpha*kappa)\n", | |
"%tex A_0 = <A0.to(\"Bq\")>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"mit\n", | |
"\n", | |
"$$\n", | |
"N\\sub{Pu} = N_A \\, \\frac{M}{m\\sub{mol}}\n", | |
"$$\n", | |
"\n", | |
"kommen wir auf die Masse:\n", | |
"\n", | |
"\n", | |
"$$\n", | |
"M = \\frac{N\\sub{Pu} \\, m\\sub{mol}}{N_A} = \\frac{A_0\\,T_{1/2}\\, m\\sub{mol}}{N_A\\,\\ln 2}\n", | |
"$$" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 9, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.563897Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.563626Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.570233Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.569560Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.563864Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\begin{align}\n", | |
"M = 16.905195 \\; \\mathrm{kg}\n", | |
"\\end{align}" | |
], | |
"text/plain": [ | |
"<IPython.core.display.Latex object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"m_mol = 238 * u.g/u.mol\n", | |
"\n", | |
"M = A0 * T12 * m_mol / (const.N_A * np.log(2))\n", | |
"%tex M = <M.decompose()>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## b)\n", | |
"\n", | |
"$$\n", | |
"P(t) = P_0 \\, e^{-\\lambda t}\n", | |
"$$" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 10, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.571773Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.571501Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.576058Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.575145Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.571738Z" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"lam = np.log(2)/T12\n", | |
"\n", | |
"def P(t):\n", | |
" t = u.Quantity(t, u.a) # nehme 'a' als Standard-Einheit\n", | |
" return P0 * np.exp(-lam * t)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 11, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.577070Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.576894Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.582415Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.581414Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.577049Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"$468.75266 \\; \\mathrm{W}$" | |
], | |
"text/plain": [ | |
"<Quantity 468.75266094 W>" | |
] | |
}, | |
"execution_count": 11, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"P(3*u.a) # äquivalent zu P(3)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 12, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.583705Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.583519Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.587409Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.586780Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.583684Z" | |
} | |
}, | |
"outputs": [], | |
"source": [ | |
"from datetime import datetime\n", | |
"# oder: pendulum, delorean\n", | |
"\n", | |
"dt_start = datetime(1977, 9, 5)\n", | |
"dt_saturn = datetime(1980, 8, 22)\n", | |
"dt_today = datetime.now()" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 13, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.588853Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.588583Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.593385Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.592616Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.588817Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"datetime.timedelta(days=1082)" | |
] | |
}, | |
"execution_count": 13, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"delta_saturn = dt_saturn - dt_start\n", | |
"delta_saturn" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"Gesamtzahl der Sekunden:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 14, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.594804Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.594518Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.599375Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.598653Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.594768Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/plain": [ | |
"93484800.0" | |
] | |
}, | |
"execution_count": 14, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"delta_saturn.total_seconds()" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"(Achtung, `delta_saturn.seconds` gibt `0` zurück!)\n", | |
"\n", | |
"Damit lässt sich die verbleibende Leistung beim Vorbeiflug an Saturn berechnen:" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 15, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.600644Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.600397Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.605740Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.605129Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.600613Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"$468.89215 \\; \\mathrm{W}$" | |
], | |
"text/plain": [ | |
"<Quantity 468.8921521 W>" | |
] | |
}, | |
"execution_count": 15, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"P(delta_saturn.total_seconds() * u.s)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 16, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.606693Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.606523Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.613658Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.613081Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.606672Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\begin{align}\n", | |
"P\\sub{Saturn} = 468.89215 \\; \\mathrm{W}\n", | |
"\\end{align}" | |
], | |
"text/plain": [ | |
"<IPython.core.display.Latex object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"data": { | |
"text/latex": [ | |
"\\begin{align}\n", | |
"P\\sub{heute} = 341.08733 \\; \\mathrm{W}\n", | |
"\\end{align}" | |
], | |
"text/plain": [ | |
"<IPython.core.display.Latex object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"%tex P\\sub{Saturn} = <P(delta_saturn.total_seconds() * u.s)>\n", | |
"%tex P\\sub{heute} = <P((dt_today - dt_start).total_seconds()*u.s)>" | |
] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"## c)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 17, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.614800Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.614627Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.619919Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.619195Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.614781Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"$2.4063414 \\times 10^{-135} \\; \\mathrm{W}$" | |
], | |
"text/plain": [ | |
"<Quantity 2.40634138e-135 W>" | |
] | |
}, | |
"execution_count": 17, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"P(40_000)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 18, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.621003Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.620741Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.627214Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.626369Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.620970Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"\\begin{align}\n", | |
"P\\sub{in 40.000} = 1.7099428 \\times 10^{-135} \\; \\mathrm{W}\n", | |
"\\end{align}" | |
], | |
"text/plain": [ | |
"<IPython.core.display.Latex object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
} | |
], | |
"source": [ | |
"%tex P\\sub{in 40.000} = <P((dt_today - dt_start).total_seconds()*u.s + 40000*u.a)>" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 19, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:35:23.628674Z", | |
"iopub.status.busy": "2020-11-26T12:35:23.628402Z", | |
"iopub.status.idle": "2020-11-26T12:35:23.633249Z", | |
"shell.execute_reply": "2020-11-26T12:35:23.632698Z", | |
"shell.execute_reply.started": "2020-11-26T12:35:23.628640Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/latex": [ | |
"$5.0132112 \\times 10^{-138} \\; \\mathrm{}$" | |
], | |
"text/plain": [ | |
"<Quantity 5.01321122e-138>" | |
] | |
}, | |
"execution_count": 19, | |
"metadata": {}, | |
"output_type": "execute_result" | |
} | |
], | |
"source": [ | |
"P(40_000) / P(0)" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
}, | |
{ | |
"cell_type": "markdown", | |
"metadata": {}, | |
"source": [ | |
"<br><br><br><br><br><br><br><br><br><br><br>\n", | |
"\n", | |
"---" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": 22, | |
"metadata": { | |
"execution": { | |
"iopub.execute_input": "2020-11-26T12:37:22.497856Z", | |
"iopub.status.busy": "2020-11-26T12:37:22.497656Z", | |
"iopub.status.idle": "2020-11-26T12:37:22.507171Z", | |
"shell.execute_reply": "2020-11-26T12:37:22.506572Z", | |
"shell.execute_reply.started": "2020-11-26T12:37:22.497834Z" | |
} | |
}, | |
"outputs": [ | |
{ | |
"data": { | |
"text/markdown": [ | |
"**conda `environment.yml`:**" | |
], | |
"text/plain": [ | |
"<IPython.core.display.Markdown object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"name: phyv-py38\n", | |
"channels:\n", | |
" - conda-forge\n", | |
" - defaults\n", | |
"dependencies:\n", | |
" - python=3.8.5\n", | |
" - pip=20.2.4\n", | |
" - numpy=1.19.2\n", | |
" - pip:\n", | |
" - astropy==4.1\n", | |
" - matplotlib==3.3.2\n", | |
" - sympy==1.6.2\n", | |
" - scipy==1.5.2\n", | |
" - pint==0.16.1\n", | |
" - seaborn==0.11.0\n", | |
" - uncertainties==3.1.4\n" | |
] | |
}, | |
{ | |
"data": { | |
"text/markdown": [ | |
" \n", | |
"\n", | |
"**Binder badge:**" | |
], | |
"text/plain": [ | |
"<IPython.core.display.Markdown object>" | |
] | |
}, | |
"metadata": {}, | |
"output_type": "display_data" | |
}, | |
{ | |
"name": "stdout", | |
"output_type": "stream", | |
"text": [ | |
"[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/git/https%3A%2F%2Fgist.github.com%2F4b47022b6e439ddbdadd43fb7f99eb70.git/HEAD?filepath=Tutorium%204.ipynb&urlpath=lab)\n" | |
] | |
} | |
], | |
"source": [ | |
"from IPython.display import Markdown\n", | |
"import sys, pip, numpy, astropy, matplotlib, sympy, scipy, pint, seaborn, uncertainties\n", | |
"\n", | |
"display(Markdown(\"**conda `environment.yml`:**\"))\n", | |
"print(\"name: phyv-py38\\nchannels:\\n - conda-forge\\n - defaults\\ndependencies:\")\n", | |
"print(f\" - python={sys.version.split()[0]}\")\n", | |
"print(f\" - pip={pip.__version__}\")\n", | |
"print(f\" - numpy={numpy.__version__}\")\n", | |
"print(f\" - pip:\") # use double == for pip\n", | |
"print(f\" - astropy=={astropy.__version__}\")\n", | |
"print(f\" - matplotlib=={matplotlib.__version__}\")\n", | |
"print(f\" - sympy=={sympy.__version__}\")\n", | |
"print(f\" - scipy=={scipy.__version__}\")\n", | |
"print(f\" - pint=={pint.__version__}\")\n", | |
"print(f\" - seaborn=={seaborn.__version__}\")\n", | |
"print(f\" - uncertainties=={uncertainties.__version__}\")\n", | |
"\n", | |
"\n", | |
"display(Markdown(\" \\n\\n**Binder badge:**\"))\n", | |
"id = \"4b47022b6e439ddbdadd43fb7f99eb70\"\n", | |
"fn = \"Tutorium 4.ipynb\"\n", | |
"print(f\"[![Binder](https://mybinder.org/badge_logo.svg)](https://mybinder.org/v2/git/https%3A%2F%2Fgist.github.com%2F{id}.git/HEAD?filepath={fn.replace(' ', '%20')}&urlpath=lab)\")" | |
] | |
}, | |
{ | |
"cell_type": "code", | |
"execution_count": null, | |
"metadata": {}, | |
"outputs": [], | |
"source": [] | |
} | |
], | |
"metadata": { | |
"kernelspec": { | |
"display_name": "3.8.5 (Framework)", | |
"language": "python", | |
"name": "3.8.5-framework" | |
}, | |
"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.5" | |
} | |
}, | |
"nbformat": 4, | |
"nbformat_minor": 4 | |
} |
View raw
(Sorry about that, but we can’t show files that are this big right now.)
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment