-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
66a4055
commit 979a3ce
Showing
38 changed files
with
742 additions
and
674 deletions.
There are no files selected for viewing
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
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
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
Binary file modified
BIN
+600 Bytes
(100%)
docs/source/generated/examples/aif/images/sphx_glr_plot_aif_parker_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+442 Bytes
(100%)
docs/source/generated/examples/aif/images/sphx_glr_plot_aif_parker_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+600 Bytes
(100%)
docs/source/generated/examples/aif/images/sphx_glr_plot_dummy_001.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+442 Bytes
(100%)
docs/source/generated/examples/aif/images/sphx_glr_plot_dummy_002.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+53 Bytes
(100%)
docs/source/generated/examples/aif/images/thumb/sphx_glr_plot_aif_parker_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified
BIN
+53 Bytes
(100%)
docs/source/generated/examples/aif/images/thumb/sphx_glr_plot_dummy_thumb.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
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
204 changes: 94 additions & 110 deletions
204
docs/source/generated/examples/aif/plot_aif_parker.ipynb
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,113 +1,97 @@ | ||
{ | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"\n# The Parker AIF - a play with variables\n\nSimulating a Parker AIF with different settings. \n" | ||
] | ||
"cells": [ | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"\n# The Parker AIF - a play with variables\n\nSimulating a Parker AIF with different settings.\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import matplotlib.pyplot as plt" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Import necessary packages\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\nimport osipi" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Generate synthetic AIF with default settings and plot the result.\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Define time points in units of seconds - in this case we use a time\n# resolution of 0.5 sec and a total duration of 6 minutes.\nt = np.arange(0, 6 * 60, 0.5)\n\n# Create an AIF with default settings\nca = osipi.aif_parker(t)\n\n# Plot the AIF over the full range\nplt.plot(t, ca, \"r-\")\nplt.plot(t, 0 * t, \"k-\")\nplt.xlabel(\"Time (sec)\")\nplt.ylabel(\"Plasma concentration (mM)\")\nplt.show()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The bolus arrival time (BAT) defaults to 0s. What happens if we\nchange it? Let's try, by changing it in steps of 30s:\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"ca = osipi.aif_parker(t, BAT=0)\nplt.plot(t, ca, \"b-\", label=\"BAT = 0s\")\nca = osipi.aif_parker(t, BAT=30)\nplt.plot(t, ca, \"r-\", label=\"BAT = 30s\")\nca = osipi.aif_parker(t, BAT=60)\nplt.plot(t, ca, \"g-\", label=\"BAT = 60s\")\nca = osipi.aif_parker(t, BAT=90)\nplt.plot(t, ca, \"m-\", label=\"BAT = 90s\")\nplt.xlabel(\"Time (sec)\")\nplt.ylabel(\"Plasma concentration (mM)\")\nplt.legend()\nplt.show()\n\n# Choose the last image as a thumbnail for the gallery\n# sphinx_gallery_thumbnail_number = -1" | ||
] | ||
} | ||
], | ||
"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.10.8" | ||
} | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Import necessary packages\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"import numpy as np\n", | ||
"import matplotlib.pyplot as plt\n", | ||
"import osipi" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"Generate synthetic AIF with default settings and plot the result.\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"# Define time points in units of seconds - in this case we use a time resolution of 0.5 sec and a total duration of 6 minutes.\n", | ||
"t = np.arange(0, 6 * 60, 0.5)\n", | ||
"\n", | ||
"# Create an AIF with default settings\n", | ||
"ca = osipi.aif_parker(t)\n", | ||
"\n", | ||
"# Plot the AIF over the full range\n", | ||
"plt.plot(t, ca, \"r-\")\n", | ||
"plt.plot(t, 0 * t, \"k-\")\n", | ||
"plt.xlabel(\"Time (sec)\")\n", | ||
"plt.ylabel(\"Plasma concentration (mM)\")\n", | ||
"plt.show()" | ||
] | ||
}, | ||
{ | ||
"cell_type": "markdown", | ||
"metadata": {}, | ||
"source": [ | ||
"The bolus arrival time (BAT) defaults to 0s. What happens if we change it? Let's try, by changing it in steps of 30s:\n\n" | ||
] | ||
}, | ||
{ | ||
"cell_type": "code", | ||
"execution_count": null, | ||
"metadata": { | ||
"collapsed": false | ||
}, | ||
"outputs": [], | ||
"source": [ | ||
"ca = osipi.aif_parker(t, BAT=0)\n", | ||
"plt.plot(t, ca, \"b-\", label=\"BAT = 0s\")\n", | ||
"ca = osipi.aif_parker(t, BAT=30)\n", | ||
"plt.plot(t, ca, \"r-\", label=\"BAT = 30s\")\n", | ||
"ca = osipi.aif_parker(t, BAT=60)\n", | ||
"plt.plot(t, ca, \"g-\", label=\"BAT = 60s\")\n", | ||
"ca = osipi.aif_parker(t, BAT=90)\n", | ||
"plt.plot(t, ca, \"m-\", label=\"BAT = 90s\")\n", | ||
"plt.xlabel(\"Time (sec)\")\n", | ||
"plt.ylabel(\"Plasma concentration (mM)\")\n", | ||
"plt.legend()\n", | ||
"plt.show()\n", | ||
"\n", | ||
"# Choose the last image as a thumbnail for the gallery\n", | ||
"# sphinx_gallery_thumbnail_number = -1" | ||
] | ||
} | ||
], | ||
"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.9.16" | ||
} | ||
}, | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
"nbformat": 4, | ||
"nbformat_minor": 0 | ||
} |
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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1 @@ | ||
2ad42a0f8a1b8aa8ec46f9a5f66e86e4 | ||
e93d51ea52bd242140d5fb616a34364e |
Oops, something went wrong.