Skip to content

Commit

Permalink
Updating notebooks
Browse files Browse the repository at this point in the history
  • Loading branch information
jhillairet committed Jul 9, 2024
1 parent 49509e6 commit 72c1ed0
Show file tree
Hide file tree
Showing 6 changed files with 216 additions and 3,312 deletions.
201 changes: 15 additions & 186 deletions doc/chart_strap_reactance.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
},
{
"cell_type": "code",
"execution_count": 1,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -25,18 +25,9 @@
},
{
"cell_type": "code",
"execution_count": 2,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stderr",
"output_type": "stream",
"text": [
"C:\\Users\\JH218595\\Documents\\scikit-rf\\skrf\\plotting.py:1441: UserWarning: Style includes a parameter, 'interactive', that is not related to style. Ignoring\n",
" mpl.style.use(os.path.join(pwd, style_file))\n"
]
}
],
"outputs": [],
"source": [
"import matplotlib.pyplot as plt\n",
"import numpy as np\n",
Expand All @@ -53,7 +44,7 @@
},
{
"cell_type": "code",
"execution_count": 3,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -75,35 +66,9 @@
},
{
"cell_type": "code",
"execution_count": 4,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "0d85488d882d422a8ebd659f9cfa6d5d",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"[<matplotlib.legend.Legend at 0x1fe46485048>,\n",
" <matplotlib.legend.Legend at 0x1fe465f8bc8>]"
]
},
"execution_count": 4,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"fig, ax = plt.subplots(2, 1, sharex=True)\n",
"# real parts\n",
Expand Down Expand Up @@ -133,7 +98,7 @@
},
{
"cell_type": "code",
"execution_count": 5,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -142,17 +107,9 @@
},
{
"cell_type": "code",
"execution_count": 6,
"execution_count": null,
"metadata": {},
"outputs": [
{
"name": "stdout",
"output_type": "stream",
"text": [
"[ 1.65682345e-04 -1.52541615e-02 1.04388949e+00 -7.76846926e+00]\n"
]
}
],
"outputs": [],
"source": [
"# polynomial fit of the strap reactance\n",
"coeffs = polyfit(ntw_vacuum.frequency.f/1e6, \n",
Expand All @@ -179,7 +136,7 @@
},
{
"cell_type": "code",
"execution_count": 7,
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
Expand All @@ -192,34 +149,9 @@
},
{
"cell_type": "code",
"execution_count": 8,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"application/vnd.jupyter.widget-view+json": {
"model_id": "2bb96cde53aa4a85b8acc40978564846",
"version_major": 2,
"version_minor": 0
},
"text/plain": [
"Canvas(toolbar=Toolbar(toolitems=[('Home', 'Reset original view', 'home', 'home'), ('Back', 'Back to previous …"
]
},
"metadata": {},
"output_type": "display_data"
},
{
"data": {
"text/plain": [
"Text(0, 0.5, '$X_s$ [$\\\\Omega$]')"
]
},
"execution_count": 8,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"fig, ax = plt.subplots()\n",
"ntw_vacuum.plot_z_im(m=0, n=0, ax=ax, lw=2, label='simulation')\n",
Expand All @@ -234,112 +166,9 @@
},
{
"cell_type": "code",
"execution_count": 9,
"execution_count": null,
"metadata": {},
"outputs": [
{
"data": {
"text/html": [
"<style><link href='http://fonts.googleapis.com/css?family=Fenix' rel='stylesheet' type='text/css'>\n",
"<link href='http://fonts.googleapis.com/css?family=Alegreya+Sans:100,300,400,500,700,800,900,100italic,300italic,400italic,500italic,700italic,800italic,900italic' rel='stylesheet' type='text/css'>\n",
"<link href='http://fonts.googleapis.com/css?family=Source+Code+Pro:300,400' rel='stylesheet' type='text/css'>\n",
"<link href=\"https://fonts.googleapis.com/css?family=Fira+Mono\" rel=\"stylesheet\"> \n",
"<style>\n",
" @font-face {\n",
" font-family: 'Fira Mono', monospace;\n",
" /*src: url('http://mirrors.ctan.org/fonts/cm-unicode/fonts/otf/cmunss.otf');*/\n",
" }\n",
" div.cell{\n",
" width:800px;\n",
" margin-left:16% !important;\n",
" margin-right:auto;\n",
" }\n",
" h1 {\n",
" font-family: 'Alegreya Sans', sans-serif;\n",
" }\n",
" h2 {\n",
" font-family: 'Fenix', serif;\n",
" }\n",
" h3{\n",
"\t\tfont-family: 'Fenix', serif;\n",
" margin-top:12px;\n",
" margin-bottom: 3px;\n",
" }\n",
"\th4{\n",
"\t\tfont-family: 'Fenix', serif;\n",
" }\n",
" h5 {\n",
" font-family: 'Alegreya Sans', sans-serif;\n",
" }\t \n",
" div.text_cell_render{\n",
" font-family: 'Fira Mono', 'Alegreya Sans',Computer Modern, \"Helvetica Neue\", Arial, Helvetica, Geneva, sans-serif;\n",
" line-height: 135%;\n",
" font-size: 120%;\n",
" width:700px;\n",
" margin-left:auto;\n",
" margin-right:auto;\n",
" }\n",
"\n",
" .text_cell_render h1 {\n",
" font-weight: 200;\n",
" font-size: 30pt;\n",
"\t\tline-height: 100%;\n",
" color:#CD2305;\n",
" margin-bottom: 0.5em;\n",
" margin-top: 0.5em;\n",
" display: block;\n",
" }\n",
"\t\n",
" .text_cell_render h2 {\n",
" font-weight: 200;\n",
" font-size: 25pt;\n",
"\t\tline-height: 100%;\n",
" color:#1a54b2;\n",
" margin-bottom: 0.5em;\n",
" margin-top: 0.5em;\n",
" display: block;\n",
" }\t\n",
"\t\n",
" .text_cell_render h5 {\n",
" font-weight: 300;\n",
" font-size: 16pt;\n",
" color: #CD2305;\n",
" font-style: italic;\n",
" margin-bottom: .5em;\n",
" margin-top: 0.5em;\n",
" display: block;\n",
" }\n",
" \n",
" .warning{\n",
" color: rgb( 240, 20, 20 )\n",
" } \n",
"</style>\n",
"<script>\n",
" MathJax.Hub.Config({\n",
" TeX: {\n",
" extensions: [\"AMSmath.js\"]\n",
" },\n",
" tex2jax: {\n",
" inlineMath: [ ['$','$'], [\"\\\\(\",\"\\\\)\"] ],\n",
" displayMath: [ ['$$','$$'], [\"\\\\[\",\"\\\\]\"] ]\n",
" },\n",
" displayAlign: 'center', // Change this to 'center' to center equations.\n",
" \"HTML-CSS\": {\n",
" styles: {'.MathJax_Display': {\"margin\": 4}}\n",
" }\n",
" });\n",
"</script>\n",
"</style>"
],
"text/plain": [
"<IPython.core.display.HTML object>"
]
},
"execution_count": 9,
"metadata": {},
"output_type": "execute_result"
}
],
"outputs": [],
"source": [
"from IPython.core.display import HTML\n",
"def _set_css_style(css_file_path):\n",
Expand Down Expand Up @@ -371,7 +200,7 @@
"name": "python",
"nbconvert_exporter": "python",
"pygments_lexer": "ipython3",
"version": "3.10.6"
"version": "3.11.7"
}
},
"nbformat": 4,
Expand Down
Loading

0 comments on commit 72c1ed0

Please sign in to comment.