Skip to content

Commit

Permalink
Update check_response_functions.ipynb
Browse files Browse the repository at this point in the history
call plt.show() such that readthedocs shows figures. figures are not shown in readthedocs otherwise because black formatting does not accept a semicolumn.
  • Loading branch information
martinvonk committed Jan 19, 2023
1 parent eab10c9 commit ef922dc
Showing 1 changed file with 33 additions and 26 deletions.
59 changes: 33 additions & 26 deletions doc/concepts/check_response_functions.ipynb
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
"import numpy as np\n",
"import matplotlib.pyplot as plt\n",
"from scipy.integrate import quad\n",
"import pastas as ps"
"import pastas as ps\n"
]
},
{
Expand All @@ -37,7 +37,7 @@
"metadata": {},
"outputs": [],
"source": [
"ps.Gamma.impulse"
"ps.Gamma.impulse\n"
]
},
{
Expand All @@ -59,7 +59,7 @@
"step = gamma.step(p)\n",
"stepnum = np.zeros(len(t))\n",
"for i in range(1, len(t)):\n",
" stepnum[i] = quad(gamma.impulse, 0, t[i], args=(p))[0]"
" stepnum[i] = quad(gamma.impulse, 0, t[i], args=(p))[0]\n"
]
},
{
Expand All @@ -74,7 +74,8 @@
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"step (m)\")\n",
"plt.grid()\n",
"plt.legend()"
"plt.legend()\n",
"plt.show()\n"
]
},
{
Expand All @@ -92,7 +93,7 @@
"metadata": {},
"outputs": [],
"source": [
"ps.Exponential.impulse"
"ps.Exponential.impulse\n"
]
},
{
Expand All @@ -113,7 +114,7 @@
"step = exponential.step(p)\n",
"stepnum = np.zeros(len(t))\n",
"for i in range(1, len(t)):\n",
" stepnum[i] = quad(exponential.impulse, 0, t[i], args=(p))[0]"
" stepnum[i] = quad(exponential.impulse, 0, t[i], args=(p))[0]\n"
]
},
{
Expand All @@ -128,7 +129,8 @@
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"step (m)\")\n",
"plt.grid()\n",
"plt.legend()"
"plt.legend()\n",
"plt.show()\n"
]
},
{
Expand All @@ -146,7 +148,7 @@
"metadata": {},
"outputs": [],
"source": [
"ps.Hantush.impulse"
"ps.Hantush.impulse\n"
]
},
{
Expand All @@ -168,7 +170,7 @@
"step = hantush.step(p)\n",
"stepnum = np.zeros(len(t))\n",
"for i in range(1, len(t)):\n",
" stepnum[i] = quad(hantush.impulse, 0, t[i], args=(p))[0]"
" stepnum[i] = quad(hantush.impulse, 0, t[i], args=(p))[0]\n"
]
},
{
Expand All @@ -183,7 +185,8 @@
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"step (m)\")\n",
"plt.grid()\n",
"plt.legend()"
"plt.legend()\n",
"plt.show()\n"
]
},
{
Expand All @@ -201,7 +204,7 @@
"metadata": {},
"outputs": [],
"source": [
"ps.Polder.impulse"
"ps.Polder.impulse\n"
]
},
{
Expand All @@ -223,7 +226,7 @@
"step = polder.step(p)\n",
"stepnum = np.zeros(len(t))\n",
"for i in range(1, len(t)):\n",
" stepnum[i] = quad(polder.impulse, 0, t[i], args=(p))[0]"
" stepnum[i] = quad(polder.impulse, 0, t[i], args=(p))[0]\n"
]
},
{
Expand All @@ -238,7 +241,8 @@
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"step (m)\")\n",
"plt.grid()\n",
"plt.legend()"
"plt.legend()\n",
"plt.show()\n"
]
},
{
Expand All @@ -256,7 +260,7 @@
"metadata": {},
"outputs": [],
"source": [
"ps.FourParam.impulse"
"ps.FourParam.impulse\n"
]
},
{
Expand All @@ -270,7 +274,7 @@
"n = 1.5\n",
"a = 50\n",
"b = 10\n",
"p = [A, n, a, b]\n",
"p = [n, a, b]\n",
"\n",
"fourparam = ps.FourParam(quad=False) # use simple integration\n",
"tmax = fourparam.get_tmax(p)\n",
Expand All @@ -282,7 +286,7 @@
" stepnum[i] = quad(fourparam.impulse, 0, t[i], args=(p))[0]\n",
"stepnum = (\n",
" stepnum / quad(fourparam.impulse, 0, np.inf, args=p)[0]\n",
") # four param is scaled at the end"
") # four param is scaled at the end\n"
]
},
{
Expand All @@ -297,7 +301,8 @@
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"step (m)\")\n",
"plt.grid()\n",
"plt.legend()"
"plt.legend()\n",
"plt.show()\n"
]
},
{
Expand All @@ -315,7 +320,7 @@
"metadata": {},
"outputs": [],
"source": [
"ps.DoubleExponential.impulse"
"ps.DoubleExponential.impulse\n"
]
},
{
Expand All @@ -338,7 +343,7 @@
"step = doubexp.step(p)\n",
"stepnum = np.zeros(len(t))\n",
"for i in range(1, len(t)):\n",
" stepnum[i] = quad(doubexp.impulse, 0, t[i], args=(p))[0]"
" stepnum[i] = quad(doubexp.impulse, 0, t[i], args=(p))[0]\n"
]
},
{
Expand All @@ -353,7 +358,8 @@
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"step (m)\")\n",
"plt.grid()\n",
"plt.legend()"
"plt.legend()\n",
"plt.show()\n"
]
},
{
Expand All @@ -371,7 +377,7 @@
"metadata": {},
"outputs": [],
"source": [
"# ps.Edelman.impulse"
"# ps.Edelman.impulse\n"
]
},
{
Expand All @@ -391,7 +397,7 @@
"# #step = edel.step(p)\n",
"# stepnum = np.zeros(len(t))\n",
"# for i in range(1, len(t)):\n",
"# stepnum[i] = quad(edel.impulse, 1e-3, t[i], args=(p))[0]"
"# stepnum[i] = quad(edel.impulse, 1e-3, t[i], args=(p))[0]\n"
]
},
{
Expand All @@ -406,7 +412,7 @@
"# plt.xlabel(\"time (d)\")\n",
"# plt.ylabel(\"step (m)\")\n",
"# plt.grid()\n",
"# plt.legend();"
"# plt.legend();\n"
]
},
{
Expand Down Expand Up @@ -493,7 +499,7 @@
"metadata": {},
"outputs": [],
"source": [
"ps.Kraijenhoff.impulse"
"ps.Kraijenhoff.impulse\n"
]
},
{
Expand All @@ -516,7 +522,7 @@
"stepnum_brug = np.zeros(len(t))\n",
"\n",
"for i in range(1, len(t)):\n",
" stepnum_brug[i] = quad(khoff.impulse, 0, t[i], args=(p))[0]"
" stepnum_brug[i] = quad(khoff.impulse, 0, t[i], args=(p))[0]\n"
]
},
{
Expand All @@ -531,7 +537,8 @@
"plt.xlabel(\"time (d)\")\n",
"plt.ylabel(\"step (m)\")\n",
"plt.grid()\n",
"plt.legend()"
"plt.legend()\n",
"plt.show()\n"
]
}
],
Expand Down

0 comments on commit ef922dc

Please sign in to comment.