Skip to content

Commit

Permalink
docs formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
MohamedNasser8 committed Jun 14, 2024
1 parent 66a4055 commit 979a3ce
Show file tree
Hide file tree
Showing 38 changed files with 742 additions and 674 deletions.
66 changes: 66 additions & 0 deletions docs/source/generated/backreferences/osipi.aif_parker.examples
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,70 @@ Examples using ``osipi.aif_parker``

<div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Simulating a Parker AIF with different settings.">

.. only:: html

.. image:: /generated/examples/aif/images/thumb/sphx_glr_plot_aif_parker_thumb.png
:alt:

:ref:`sphx_glr_generated_examples_aif_plot_aif_parker.py`

.. raw:: html

<div class="sphx-glr-thumbnail-title">The Parker AIF - a play with variables</div>
</div>


.. only:: not html

* :ref:`sphx_glr_generated_examples_aif_plot_aif_parker.py`

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Dummy script to illustrate structure of examples folder">

.. only:: html

.. image:: /generated/examples/aif/images/thumb/sphx_glr_plot_dummy_thumb.png
:alt:

:ref:`sphx_glr_generated_examples_aif_plot_dummy.py`

.. raw:: html

<div class="sphx-glr-thumbnail-title">A dummy script</div>
</div>


.. only:: not html

* :ref:`sphx_glr_generated_examples_aif_plot_dummy.py`

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Simulating tissue concentrations from Tofts model with different settings.">

.. only:: html

.. image:: /generated/examples/tissue/images/thumb/sphx_glr_plot_tofts_thumb.png
:alt:

:ref:`sphx_glr_generated_examples_tissue_plot_tofts.py`

.. raw:: html

<div class="sphx-glr-thumbnail-title">The Tofts model</div>
</div>


.. only:: not html

* :ref:`sphx_glr_generated_examples_tissue_plot_tofts.py`

.. raw:: html

Expand All @@ -33,6 +97,8 @@ Examples using ``osipi.aif_parker``

* :ref:`sphx_glr_generated_examples_tissue_plot_extended_tofts.py`

.. thumbnail-parent-div-close

.. raw:: html

</div>
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Examples using ``osipi.extended_tofts``

<div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

Expand All @@ -33,6 +34,8 @@ Examples using ``osipi.extended_tofts``

* :ref:`sphx_glr_generated_examples_tissue_plot_extended_tofts.py`

.. thumbnail-parent-div-close

.. raw:: html

</div>
3 changes: 3 additions & 0 deletions docs/source/generated/backreferences/osipi.tofts.examples
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ Examples using ``osipi.tofts``

<div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open

.. raw:: html

Expand All @@ -33,6 +34,8 @@ Examples using ``osipi.tofts``

* :ref:`sphx_glr_generated_examples_tissue_plot_tofts.py`

.. thumbnail-parent-div-close

.. raw:: html

</div>
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
9 changes: 5 additions & 4 deletions docs/source/generated/examples/aif/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,15 @@ Arterial Input Functions





.. raw:: html

<div class="sphx-glr-thumbnails">

.. thumbnail-parent-div-open
.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Simulating a Parker AIF with different settings. ">
<div class="sphx-glr-thumbcontainer" tooltip="Simulating a Parker AIF with different settings.">

.. only:: html

Expand All @@ -34,7 +33,7 @@ Arterial Input Functions

.. raw:: html

<div class="sphx-glr-thumbcontainer" tooltip="Dummy script to illustrate structure of examples folder ">
<div class="sphx-glr-thumbcontainer" tooltip="Dummy script to illustrate structure of examples folder">

.. only:: html

Expand All @@ -49,6 +48,8 @@ Arterial Input Functions
</div>


.. thumbnail-parent-div-close
.. raw:: html

</div>
Expand Down
204 changes: 94 additions & 110 deletions docs/source/generated/examples/aif/plot_aif_parker.ipynb
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
}
8 changes: 5 additions & 3 deletions docs/source/generated/examples/aif/plot_aif_parker.py
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
"""======================================
"""
======================================
The Parker AIF - a play with variables
======================================
The Parker AIF - a play with variables ====================================== Simulating a Parker
AIF with different settings.
Simulating a Parker AIF with different settings.
"""

Expand Down
2 changes: 1 addition & 1 deletion docs/source/generated/examples/aif/plot_aif_parker.py.md5
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2ad42a0f8a1b8aa8ec46f9a5f66e86e4
e93d51ea52bd242140d5fb616a34364e
Loading

0 comments on commit 979a3ce

Please sign in to comment.