Skip to content

Instantly share code, notes, and snippets.

@r4lv
Last active February 11, 2021 11:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save r4lv/6d98b05844c035f318ceec0c5dea9219 to your computer and use it in GitHub Desktop.
Save r4lv/6d98b05844c035f318ceec0c5dea9219 to your computer and use it in GitHub Desktop.

Jupyter-Notebooks zu den Tutorien in Physik V.

Binder

(PS: manchmal ist GitHub etwas überfordert mit der Vorschau der ganzen Notebooks — am Besten runterladen, oder im Binder anschauen!)

Display the source blob
Display the rendered blob
Raw
{
"cells": [
{
"cell_type": "markdown",
"metadata": {},
"source": [
"# Übungsgruppe 3 — Tutorium #1\n",
"\n",
"> ralf@uni-bonn.de\n",
"\n",
"## Einheiten in Python\n",
"\n",
"Es gibt verschiedene Bibliotheken, die die Arbeit mit Einheiten in Python vereinfachen, zB `pint` oder `unyt`. Ich benutze dafür `astropy` ([Dokumentation](https://docs.astropy.org/en/stable/units/)):"
]
},
{
"cell_type": "code",
"execution_count": 1,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.185562Z",
"iopub.status.busy": "2020-11-05T11:33:57.185315Z",
"iopub.status.idle": "2020-11-05T11:33:57.582615Z",
"shell.execute_reply": "2020-11-05T11:33:57.581955Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.185539Z"
}
},
"outputs": [],
"source": [
"import astropy.units as u\n",
"import astropy.constants as const\n",
"\n",
"import numpy as np"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Viele Konstanten sind, mit den korrekten Einheiten, schon eingebaut:"
]
},
{
"cell_type": "code",
"execution_count": 2,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.583714Z",
"iopub.status.busy": "2020-11-05T11:33:57.583559Z",
"iopub.status.idle": "2020-11-05T11:33:57.593295Z",
"shell.execute_reply": "2020-11-05T11:33:57.592457Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.583693Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$2.9979246 \\times 10^{8} \\; \\mathrm{\\frac{m}{s}}$"
],
"text/plain": [
"<<class 'astropy.constants.codata2018.CODATA2018'> name='Speed of light in vacuum' value=299792458.0 uncertainty=0.0 unit='m / s' reference='CODATA 2018'>"
]
},
"execution_count": 2,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"const.c"
]
},
{
"cell_type": "code",
"execution_count": 3,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.594718Z",
"iopub.status.busy": "2020-11-05T11:33:57.594514Z",
"iopub.status.idle": "2020-11-05T11:33:57.599886Z",
"shell.execute_reply": "2020-11-05T11:33:57.598931Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.594695Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$1.0545718 \\times 10^{-34} \\; \\mathrm{J\\,s}$"
],
"text/plain": [
"<<class 'astropy.constants.codata2018.CODATA2018'> name='Reduced Planck constant' value=1.0545718176461565e-34 uncertainty=0.0 unit='J s' reference='CODATA 2018'>"
]
},
"execution_count": 3,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"const.hbar"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Man kann mit `.to(...)` in andere Einheiten wechseln:"
]
},
{
"cell_type": "code",
"execution_count": 4,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.601476Z",
"iopub.status.busy": "2020-11-05T11:33:57.601261Z",
"iopub.status.idle": "2020-11-05T11:33:57.606875Z",
"shell.execute_reply": "2020-11-05T11:33:57.606213Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.601454Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$6.5821196 \\times 10^{-16} \\; \\mathrm{eV\\,s}$"
],
"text/plain": [
"<Quantity 6.58211957e-16 eV s>"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"const.hbar.to(\"eV.s\") # äquivalent: const.hbar.to(u.eV * u.s)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## A1. Natürliche Einheiten\n",
"### c)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Um eine *Quantität* zu erhalten, multipliziert man die Einheit einfach hinten dran:"
]
},
{
"cell_type": "code",
"execution_count": 5,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.608325Z",
"iopub.status.busy": "2020-11-05T11:33:57.608016Z",
"iopub.status.idle": "2020-11-05T11:33:57.613176Z",
"shell.execute_reply": "2020-11-05T11:33:57.612541Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.608302Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$1000 \\; \\mathrm{MeV}$"
],
"text/plain": [
"<Quantity 1000. MeV>"
]
},
"execution_count": 5,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"E = 1000 * u.MeV\n",
"E"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Photon**\n",
"\n",
"Das Photon hat $M_\\gamma = 0$, damit ist\n",
"\n",
"$$\n",
"p_\\gamma = E = 1000\\,\\text{MeV}\n",
"$$\n",
"\n",
"**Pion**\n",
"\n",
"Die *Quantitäten* kann man dann ganz einfach mit den arithmetischen Funktionen von Python (`+`, `**`, ...) oder numpy (`np.sqrt`, ...) verwenden — die Einheiten werden automatisch mitgeschleift."
]
},
{
"cell_type": "code",
"execution_count": 6,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.614379Z",
"iopub.status.busy": "2020-11-05T11:33:57.614198Z",
"iopub.status.idle": "2020-11-05T11:33:57.619404Z",
"shell.execute_reply": "2020-11-05T11:33:57.618838Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.614358Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$990.1515 \\; \\mathrm{MeV}$"
],
"text/plain": [
"<Quantity 990.15150356 MeV>"
]
},
"execution_count": 6,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"m_pion = 140 * u.MeV\n",
"p_pion = np.sqrt(E**2 - m_pion**2)\n",
"\n",
"p_pion"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"**Proton**"
]
},
{
"cell_type": "code",
"execution_count": 7,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.620277Z",
"iopub.status.busy": "2020-11-05T11:33:57.620125Z",
"iopub.status.idle": "2020-11-05T11:33:57.624763Z",
"shell.execute_reply": "2020-11-05T11:33:57.624270Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.620257Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$346.63525 \\; \\mathrm{MeV}$"
],
"text/plain": [
"<Quantity 346.63525499 MeV>"
]
},
"execution_count": 7,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"m_proton = 938 * u.MeV\n",
"p_proton = np.sqrt(E**2 - m_proton**2)\n",
"\n",
"p_proton"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 2. Austauschteilchen\n",
"\n",
"> siehe Vorlesung 3, Slide #95\n",
"\n",
"Die maximale Reichweite ist definiert als\n",
"\n",
"$$\n",
"R \\leq \\frac{\\hbar}{M_X c}\n",
"$$\n",
"\n",
"hier ist $M_X = m_W$."
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Im PDG unter [https://pdglive.lbl.gov](https://pdglive.lbl.gov) findet man die Masse des W-Bosons, angegeben in natürlichen Einheiten als\n",
"\n",
"$$\n",
"\\text{W MASS} \\qquad 80.379\\pm0.012\\,\\text{GeV} \n",
"$$\n",
"\n",
"`astropy` kommt leider nicht so ganz mit natürlichen Einheiten klar, deswegen nehmen wir den Umweg und verwenden $\\text{GeV}/c^2$ als Einheit für die Masse:"
]
},
{
"cell_type": "code",
"execution_count": 8,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.626576Z",
"iopub.status.busy": "2020-11-05T11:33:57.626401Z",
"iopub.status.idle": "2020-11-05T11:33:57.630623Z",
"shell.execute_reply": "2020-11-05T11:33:57.630133Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.626555Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$8.9012004 \\times 10^{-16} \\; \\mathrm{\\frac{s^{2}\\,GeV}{m^{2}}}$"
],
"text/plain": [
"<Quantity 8.90120045e-16 GeV s2 / m2>"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mW = 80 * u.GeV/const.c**2\n",
"mW"
]
},
{
"cell_type": "markdown",
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:17:38.686147Z",
"iopub.status.busy": "2020-11-05T11:17:38.685919Z",
"iopub.status.idle": "2020-11-05T11:17:38.693720Z",
"shell.execute_reply": "2020-11-05T11:17:38.692930Z",
"shell.execute_reply.started": "2020-11-05T11:17:38.686126Z"
}
},
"source": [
"Das sieht leider etwas unschön aus, da `astropy` gleich den Wert der Konstanten $3\\cdot 10^8$ mit dazumultipliziert — das ist zwar korrekt, aber etwas schöner ist es, wenn man `c` als *Einheit* definiert — das mache ich *immer* wenn ich Einheiten verwende, normalerweise ganz am Anfang meines Notebooks:"
]
},
{
"cell_type": "code",
"execution_count": 9,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.632156Z",
"iopub.status.busy": "2020-11-05T11:33:57.631916Z",
"iopub.status.idle": "2020-11-05T11:33:57.636258Z",
"shell.execute_reply": "2020-11-05T11:33:57.635334Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.632122Z"
}
},
"outputs": [],
"source": [
"u.c = u.def_unit('c', const.c)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Damit kann man `mW` schreiben als"
]
},
{
"cell_type": "code",
"execution_count": 10,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.637522Z",
"iopub.status.busy": "2020-11-05T11:33:57.637324Z",
"iopub.status.idle": "2020-11-05T11:33:57.643759Z",
"shell.execute_reply": "2020-11-05T11:33:57.642918Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.637498Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$80 \\; \\mathrm{\\frac{GeV}{c^{2}}}$"
],
"text/plain": [
"<Quantity 80. GeV / c2>"
]
},
"execution_count": 10,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mW = 80 * u.GeV/u.c**2 # <- das neue u.c, und nicht const.c!\n",
"mW"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"…was etwas angenehmer ist ;)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Um den Wert in SI-Einheiten anzuzeigen:"
]
},
{
"cell_type": "code",
"execution_count": 33,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:41:36.123101Z",
"iopub.status.busy": "2020-11-05T11:41:36.122869Z",
"iopub.status.idle": "2020-11-05T11:41:36.127960Z",
"shell.execute_reply": "2020-11-05T11:41:36.127403Z",
"shell.execute_reply.started": "2020-11-05T11:41:36.123078Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$1.4261295 \\times 10^{-25} \\; \\mathrm{kg}$"
],
"text/plain": [
"<Quantity 1.42612954e-25 kg>"
]
},
"execution_count": 33,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mW.to(\"kg\") # oder: mW.to(u.kg)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Wir berechnen die Reichweite:"
]
},
{
"cell_type": "code",
"execution_count": 12,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.651218Z",
"iopub.status.busy": "2020-11-05T11:33:57.651018Z",
"iopub.status.idle": "2020-11-05T11:33:57.656726Z",
"shell.execute_reply": "2020-11-05T11:33:57.655965Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.651195Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$4.3970912 \\times 10^{-45} \\; \\mathrm{\\frac{c^{2}\\,s^{2}\\,J}{GeV\\,m}}$"
],
"text/plain": [
"<Quantity 4.39709118e-45 c2 J s2 / (GeV m)>"
]
},
"execution_count": 12,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"R = const.hbar / (mW * const.c)\n",
"R"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Mit `.decompose()` kann man eine Quantität in Basis-Einheiten umwandeln, um die unnötigen Einheiten wegkürzen zu lassen."
]
},
{
"cell_type": "code",
"execution_count": 13,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.657993Z",
"iopub.status.busy": "2020-11-05T11:33:57.657711Z",
"iopub.status.idle": "2020-11-05T11:33:57.663055Z",
"shell.execute_reply": "2020-11-05T11:33:57.662384Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.657941Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$2.4665873 \\times 10^{-18} \\; \\mathrm{m}$"
],
"text/plain": [
"<Quantity 2.46658726e-18 m>"
]
},
"execution_count": 13,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"R.decompose()"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"…oder direkt mit der Wunscheinheit:"
]
},
{
"cell_type": "code",
"execution_count": 14,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.664417Z",
"iopub.status.busy": "2020-11-05T11:33:57.664196Z",
"iopub.status.idle": "2020-11-05T11:33:57.669172Z",
"shell.execute_reply": "2020-11-05T11:33:57.668461Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.664391Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$0.0024665873 \\; \\mathrm{fm}$"
],
"text/plain": [
"<Quantity 0.00246659 fm>"
]
},
"execution_count": 14,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"R.to(\"fm\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"---\n",
"\n",
"PS: wir hätten auch einfach alles in natürlichen Einheiten rechnen können:\n",
"\n",
"\n",
"$$\n",
"R = \\frac{1}{M_X} \\qquad\\text{(in natürlichen Einheiten)}\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 15,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.670236Z",
"iopub.status.busy": "2020-11-05T11:33:57.670041Z",
"iopub.status.idle": "2020-11-05T11:33:57.675015Z",
"shell.execute_reply": "2020-11-05T11:33:57.674368Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.670213Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$0.0125 \\; \\mathrm{\\frac{1}{GeV}}$"
],
"text/plain": [
"<Quantity 0.0125 1 / GeV>"
]
},
"execution_count": 15,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"mW_nat = 80 * u.GeV # wie im PDG angegeben\n",
"\n",
"R_nat = 1 / mW_nat # da hbar=1\n",
"R_nat"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"Und das dann anschließend in SI-Einheiten umrechnen, mit dem Faktor $\\hbar c$ (für die Länge):"
]
},
{
"cell_type": "code",
"execution_count": 16,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.676143Z",
"iopub.status.busy": "2020-11-05T11:33:57.675938Z",
"iopub.status.idle": "2020-11-05T11:33:57.680938Z",
"shell.execute_reply": "2020-11-05T11:33:57.680355Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.676119Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$3.9519085 \\times 10^{-28} \\; \\mathrm{\\frac{J\\,m}{GeV}}$"
],
"text/plain": [
"<Quantity 3.95190847e-28 J m / GeV>"
]
},
"execution_count": 16,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"R_si = R_nat * (const.hbar * const.c)\n",
"R_si"
]
},
{
"cell_type": "code",
"execution_count": 17,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.682017Z",
"iopub.status.busy": "2020-11-05T11:33:57.681810Z",
"iopub.status.idle": "2020-11-05T11:33:57.686453Z",
"shell.execute_reply": "2020-11-05T11:33:57.685821Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.681995Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$2.4665873 \\times 10^{-18} \\; \\mathrm{m}$"
],
"text/plain": [
"<Quantity 2.46658726e-18 m>"
]
},
"execution_count": 17,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"R_si.decompose()"
]
},
{
"cell_type": "code",
"execution_count": 18,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.687452Z",
"iopub.status.busy": "2020-11-05T11:33:57.687282Z",
"iopub.status.idle": "2020-11-05T11:33:57.691945Z",
"shell.execute_reply": "2020-11-05T11:33:57.691387Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.687431Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$0.0024665873 \\; \\mathrm{fm}$"
],
"text/plain": [
"<Quantity 0.00246659 fm>"
]
},
"execution_count": 18,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"R_si.to(\"fm\")"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"PS: Unter [https://www.seas.upenn.edu/~amyers/NaturalUnits.pdf](https://www.seas.upenn.edu/~amyers/NaturalUnits.pdf) gibt es eine Tabelle mit den Faktoren für die verschiedenen Einheiten... also $1/c^2$ für die Masse, $\\hbar$ für eine Länge, etc…"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"## 3. Wirkungsquerschnitt"
]
},
{
"cell_type": "code",
"execution_count": 19,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.692902Z",
"iopub.status.busy": "2020-11-05T11:33:57.692734Z",
"iopub.status.idle": "2020-11-05T11:33:57.696732Z",
"shell.execute_reply": "2020-11-05T11:33:57.696105Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.692880Z"
}
},
"outputs": [
{
"data": {
"text/plain": [
"99.99999999999999"
]
},
"execution_count": 19,
"metadata": {},
"output_type": "execute_result"
}
],
"source": [
"u.barn.to(\"fm^2\") # oder: u.barn.to(u.fm**2)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"(Rundungsfehler………)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"### c)\n",
"\n",
"\n",
"$$\n",
"\\sigma_{\\text{tot}} = \\pi R^2\n",
"$$"
]
},
{
"cell_type": "code",
"execution_count": 20,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.697690Z",
"iopub.status.busy": "2020-11-05T11:33:57.697515Z",
"iopub.status.idle": "2020-11-05T11:33:57.700881Z",
"shell.execute_reply": "2020-11-05T11:33:57.699989Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.697669Z"
}
},
"outputs": [],
"source": [
"def sigma(radius):\n",
" display((np.pi * radius**2).to(\"barn\"))"
]
},
{
"cell_type": "code",
"execution_count": 21,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.701878Z",
"iopub.status.busy": "2020-11-05T11:33:57.701661Z",
"iopub.status.idle": "2020-11-05T11:33:57.707467Z",
"shell.execute_reply": "2020-11-05T11:33:57.706779Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.701847Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$3.1415927 \\times 10^{8} \\; \\mathrm{barn}$"
],
"text/plain": [
"<Quantity 3.14159265e+08 barn>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"r_atom = 1*u.angstrom\n",
"sigma(r_atom)"
]
},
{
"cell_type": "code",
"execution_count": 22,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.708598Z",
"iopub.status.busy": "2020-11-05T11:33:57.708399Z",
"iopub.status.idle": "2020-11-05T11:33:57.714779Z",
"shell.execute_reply": "2020-11-05T11:33:57.713911Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.708575Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$0.97464329 \\; \\mathrm{barn}$"
],
"text/plain": [
"<Quantity 0.97464329 barn>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"r_nucleon = r0 = 1.2*u.fm\n",
"A = 100 # Anzahl Nukleonen\n",
"r_kern = r0 * A**(1/3)\n",
"\n",
"sigma(r_kern)"
]
},
{
"cell_type": "code",
"execution_count": 23,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:33:57.718293Z",
"iopub.status.busy": "2020-11-05T11:33:57.717883Z",
"iopub.status.idle": "2020-11-05T11:33:57.724045Z",
"shell.execute_reply": "2020-11-05T11:33:57.723391Z",
"shell.execute_reply.started": "2020-11-05T11:33:57.718261Z"
}
},
"outputs": [
{
"data": {
"text/latex": [
"$0.045238934 \\; \\mathrm{barn}$"
],
"text/plain": [
"<Quantity 0.04523893 barn>"
]
},
"metadata": {},
"output_type": "display_data"
}
],
"source": [
"r_proton = 1.2*u.fm\n",
"sigma(r_proton)"
]
},
{
"cell_type": "markdown",
"metadata": {},
"source": [
"<br><br><br><br><br><br><br><br><br><br><br>\n",
"\n",
"---"
]
},
{
"cell_type": "code",
"execution_count": 32,
"metadata": {
"execution": {
"iopub.execute_input": "2020-11-05T11:38:41.651193Z",
"iopub.status.busy": "2020-11-05T11:38:41.650949Z",
"iopub.status.idle": "2020-11-05T11:38:41.656203Z",
"shell.execute_reply": "2020-11-05T11:38:41.655386Z",
"shell.execute_reply.started": "2020-11-05T11:38:41.651170Z"
}
},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"astropy==4.1\n",
"numpy==1.19.2\n",
"matplotlib==3.3.2\n",
"sympy==1.6.2\n",
"scipy==1.5.2\n",
"pint==0.16.1\n"
]
}
],
"source": [
"import astropy, numpy, matplotlib, sympy, scipy, pint\n",
"print(f\"astropy=={astropy.__version__}\")\n",
"print(f\"numpy=={numpy.__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__}\")"
]
}
],
"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
}
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
View raw

(Sorry about that, but we can’t show files that are this big right now.)

Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Display the source blob
Display the rendered blob
Raw
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment