diff --git a/.gitignore b/.gitignore index cd03b8d..2ac6e53 100644 --- a/.gitignore +++ b/.gitignore @@ -7,3 +7,5 @@ tests/__pycache__ .coverage junit docs/build +docs/source/generated +docs/source/sg_execution_times.rst diff --git a/docs/source/generated/.DS_Store b/docs/source/generated/.DS_Store deleted file mode 100644 index 6e4d486..0000000 Binary files a/docs/source/generated/.DS_Store and /dev/null differ diff --git a/docs/source/generated/api/osipi.aif_georgiou.rst b/docs/source/generated/api/osipi.aif_georgiou.rst deleted file mode 100755 index 598737f..0000000 --- a/docs/source/generated/api/osipi.aif_georgiou.rst +++ /dev/null @@ -1,17 +0,0 @@ -osipi.aif\_georgiou -=================== - - -.. currentmodule:: osipi - - - -.. autofunction:: aif_georgiou - - - - - - -.. minigallery:: osipi.aif_georgiou - :add-heading: diff --git a/docs/source/generated/api/osipi.aif_parker.rst b/docs/source/generated/api/osipi.aif_parker.rst deleted file mode 100755 index f910623..0000000 --- a/docs/source/generated/api/osipi.aif_parker.rst +++ /dev/null @@ -1,17 +0,0 @@ -osipi.aif\_parker -================= - - -.. currentmodule:: osipi - - - -.. autofunction:: aif_parker - - - - - - -.. minigallery:: osipi.aif_parker - :add-heading: diff --git a/docs/source/generated/api/osipi.aif_weinmann.rst b/docs/source/generated/api/osipi.aif_weinmann.rst deleted file mode 100755 index 14f68bd..0000000 --- a/docs/source/generated/api/osipi.aif_weinmann.rst +++ /dev/null @@ -1,17 +0,0 @@ -osipi.aif\_weinmann -=================== - - -.. currentmodule:: osipi - - - -.. autofunction:: aif_weinmann - - - - - - -.. minigallery:: osipi.aif_weinmann - :add-heading: diff --git a/docs/source/generated/api/osipi.extended_tofts.rst b/docs/source/generated/api/osipi.extended_tofts.rst deleted file mode 100755 index 5a9d3c5..0000000 --- a/docs/source/generated/api/osipi.extended_tofts.rst +++ /dev/null @@ -1,17 +0,0 @@ -osipi.extended\_tofts -===================== - - -.. currentmodule:: osipi - - - -.. autofunction:: extended_tofts - - - - - - -.. minigallery:: osipi.extended_tofts - :add-heading: diff --git a/docs/source/generated/api/osipi.tofts.rst b/docs/source/generated/api/osipi.tofts.rst deleted file mode 100755 index 48f8f3c..0000000 --- a/docs/source/generated/api/osipi.tofts.rst +++ /dev/null @@ -1,17 +0,0 @@ -osipi.tofts -=========== - - -.. currentmodule:: osipi - - - -.. autofunction:: tofts - - - - - - -.. minigallery:: osipi.tofts - :add-heading: diff --git a/docs/source/generated/backreferences/osipi.aif_georgiou.examples b/docs/source/generated/backreferences/osipi.aif_georgiou.examples deleted file mode 100755 index e69de29..0000000 diff --git a/docs/source/generated/backreferences/osipi.aif_parker.examples b/docs/source/generated/backreferences/osipi.aif_parker.examples deleted file mode 100755 index 19ff462..0000000 --- a/docs/source/generated/backreferences/osipi.aif_parker.examples +++ /dev/null @@ -1,104 +0,0 @@ - - -Examples using ``osipi.aif_parker`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -.. start-sphx-glr-thumbnails - - -.. raw:: html - -
- -.. thumbnail-parent-div-open - -.. raw:: html - -
- -.. 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 - -
The Parker AIF - a play with variables
-
- - -.. only:: not html - - * :ref:`sphx_glr_generated_examples_aif_plot_aif_parker.py` - -.. raw:: html - -
- -.. 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 - -
A dummy script
-
- - -.. only:: not html - - * :ref:`sphx_glr_generated_examples_aif_plot_dummy.py` - -.. raw:: html - -
- -.. 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 - -
The Tofts model
-
- - -.. only:: not html - - * :ref:`sphx_glr_generated_examples_tissue_plot_tofts.py` - -.. raw:: html - -
- -.. only:: html - - .. image:: /generated/examples/tissue/images/thumb/sphx_glr_plot_extended_tofts_thumb.png - :alt: - - :ref:`sphx_glr_generated_examples_tissue_plot_extended_tofts.py` - -.. raw:: html - -
The Extended Tofts model
-
- - -.. only:: not html - - * :ref:`sphx_glr_generated_examples_tissue_plot_extended_tofts.py` - -.. thumbnail-parent-div-close - -.. raw:: html - -
diff --git a/docs/source/generated/backreferences/osipi.aif_weinmann.examples b/docs/source/generated/backreferences/osipi.aif_weinmann.examples deleted file mode 100755 index e69de29..0000000 diff --git a/docs/source/generated/backreferences/osipi.extended_tofts.examples b/docs/source/generated/backreferences/osipi.extended_tofts.examples deleted file mode 100755 index 945a7bb..0000000 --- a/docs/source/generated/backreferences/osipi.extended_tofts.examples +++ /dev/null @@ -1,41 +0,0 @@ - - -Examples using ``osipi.extended_tofts`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -.. start-sphx-glr-thumbnails - - -.. raw:: html - -
- -.. thumbnail-parent-div-open - -.. raw:: html - -
- -.. only:: html - - .. image:: /generated/examples/tissue/images/thumb/sphx_glr_plot_extended_tofts_thumb.png - :alt: - - :ref:`sphx_glr_generated_examples_tissue_plot_extended_tofts.py` - -.. raw:: html - -
The Extended Tofts model
-
- - -.. only:: not html - - * :ref:`sphx_glr_generated_examples_tissue_plot_extended_tofts.py` - -.. thumbnail-parent-div-close - -.. raw:: html - -
diff --git a/docs/source/generated/backreferences/osipi.tofts.examples b/docs/source/generated/backreferences/osipi.tofts.examples deleted file mode 100755 index 78bbfe4..0000000 --- a/docs/source/generated/backreferences/osipi.tofts.examples +++ /dev/null @@ -1,41 +0,0 @@ - - -Examples using ``osipi.tofts`` -^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ - - -.. start-sphx-glr-thumbnails - - -.. raw:: html - -
- -.. thumbnail-parent-div-open - -.. raw:: html - -
- -.. 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 - -
The Tofts model
-
- - -.. only:: not html - - * :ref:`sphx_glr_generated_examples_tissue_plot_tofts.py` - -.. thumbnail-parent-div-close - -.. raw:: html - -
diff --git a/docs/source/generated/examples/aif/images/sphx_glr_plot_aif_parker_001.png b/docs/source/generated/examples/aif/images/sphx_glr_plot_aif_parker_001.png deleted file mode 100755 index b08ebc8..0000000 Binary files a/docs/source/generated/examples/aif/images/sphx_glr_plot_aif_parker_001.png and /dev/null differ diff --git a/docs/source/generated/examples/aif/images/sphx_glr_plot_aif_parker_002.png b/docs/source/generated/examples/aif/images/sphx_glr_plot_aif_parker_002.png deleted file mode 100755 index 326d195..0000000 Binary files a/docs/source/generated/examples/aif/images/sphx_glr_plot_aif_parker_002.png and /dev/null differ diff --git a/docs/source/generated/examples/aif/images/sphx_glr_plot_dummy_001.png b/docs/source/generated/examples/aif/images/sphx_glr_plot_dummy_001.png deleted file mode 100755 index b08ebc8..0000000 Binary files a/docs/source/generated/examples/aif/images/sphx_glr_plot_dummy_001.png and /dev/null differ diff --git a/docs/source/generated/examples/aif/images/sphx_glr_plot_dummy_002.png b/docs/source/generated/examples/aif/images/sphx_glr_plot_dummy_002.png deleted file mode 100755 index 326d195..0000000 Binary files a/docs/source/generated/examples/aif/images/sphx_glr_plot_dummy_002.png and /dev/null differ diff --git a/docs/source/generated/examples/aif/images/thumb/sphx_glr_plot_aif_parker_thumb.png b/docs/source/generated/examples/aif/images/thumb/sphx_glr_plot_aif_parker_thumb.png deleted file mode 100755 index 22d8ed5..0000000 Binary files a/docs/source/generated/examples/aif/images/thumb/sphx_glr_plot_aif_parker_thumb.png and /dev/null differ diff --git a/docs/source/generated/examples/aif/images/thumb/sphx_glr_plot_dummy_thumb.png b/docs/source/generated/examples/aif/images/thumb/sphx_glr_plot_dummy_thumb.png deleted file mode 100755 index 22d8ed5..0000000 Binary files a/docs/source/generated/examples/aif/images/thumb/sphx_glr_plot_dummy_thumb.png and /dev/null differ diff --git a/docs/source/generated/examples/aif/index.rst b/docs/source/generated/examples/aif/index.rst deleted file mode 100755 index c83c965..0000000 --- a/docs/source/generated/examples/aif/index.rst +++ /dev/null @@ -1,62 +0,0 @@ - - -.. _sphx_glr_generated_examples_aif: - -************************ -Arterial Input Functions -************************ - - - -.. raw:: html - -
- -.. thumbnail-parent-div-open - -.. raw:: html - -
- -.. 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 - -
The Parker AIF - a play with variables
-
- - -.. raw:: html - -
- -.. 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 - -
A dummy script
-
- - -.. thumbnail-parent-div-close - -.. raw:: html - -
- - -.. toctree:: - :hidden: - - /generated/examples/aif/plot_aif_parker - /generated/examples/aif/plot_dummy diff --git a/docs/source/generated/examples/aif/plot_aif_parker.ipynb b/docs/source/generated/examples/aif/plot_aif_parker.ipynb deleted file mode 100755 index 3276336..0000000 --- a/docs/source/generated/examples/aif/plot_aif_parker.ipynb +++ /dev/null @@ -1,97 +0,0 @@ -{ - "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" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/docs/source/generated/examples/aif/plot_aif_parker.py b/docs/source/generated/examples/aif/plot_aif_parker.py deleted file mode 100755 index 374cbce..0000000 --- a/docs/source/generated/examples/aif/plot_aif_parker.py +++ /dev/null @@ -1,52 +0,0 @@ -""" -====================================== -The Parker AIF - a play with variables -====================================== - -Simulating a Parker AIF with different settings. - -""" - -import matplotlib.pyplot as plt - -# %% -# Import necessary packages -import numpy as np -import osipi - -# %% -# Generate synthetic AIF with default settings and plot the result. - -# 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. -t = np.arange(0, 6 * 60, 0.5) - -# Create an AIF with default settings -ca = osipi.aif_parker(t) - -# Plot the AIF over the full range -plt.plot(t, ca, "r-") -plt.plot(t, 0 * t, "k-") -plt.xlabel("Time (sec)") -plt.ylabel("Plasma concentration (mM)") -plt.show() - -# %% -# The bolus arrival time (BAT) defaults to 0s. What happens if we -# change it? Let's try, by changing it in steps of 30s: - -ca = osipi.aif_parker(t, BAT=0) -plt.plot(t, ca, "b-", label="BAT = 0s") -ca = osipi.aif_parker(t, BAT=30) -plt.plot(t, ca, "r-", label="BAT = 30s") -ca = osipi.aif_parker(t, BAT=60) -plt.plot(t, ca, "g-", label="BAT = 60s") -ca = osipi.aif_parker(t, BAT=90) -plt.plot(t, ca, "m-", label="BAT = 90s") -plt.xlabel("Time (sec)") -plt.ylabel("Plasma concentration (mM)") -plt.legend() -plt.show() - -# Choose the last image as a thumbnail for the gallery -# sphinx_gallery_thumbnail_number = -1 diff --git a/docs/source/generated/examples/aif/plot_aif_parker.py.md5 b/docs/source/generated/examples/aif/plot_aif_parker.py.md5 deleted file mode 100755 index 3b68fca..0000000 --- a/docs/source/generated/examples/aif/plot_aif_parker.py.md5 +++ /dev/null @@ -1 +0,0 @@ -e93d51ea52bd242140d5fb616a34364e diff --git a/docs/source/generated/examples/aif/plot_aif_parker.rst b/docs/source/generated/examples/aif/plot_aif_parker.rst deleted file mode 100755 index f5df0a9..0000000 --- a/docs/source/generated/examples/aif/plot_aif_parker.rst +++ /dev/null @@ -1,156 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "generated\examples\aif\plot_aif_parker.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - :ref:`Go to the end ` - to download the full example code. - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_generated_examples_aif_plot_aif_parker.py: - - -====================================== -The Parker AIF - a play with variables -====================================== - -Simulating a Parker AIF with different settings. - -.. GENERATED FROM PYTHON SOURCE LINES 9-12 - -.. code-block:: Python - - - import matplotlib.pyplot as plt - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 13-14 - -Import necessary packages - -.. GENERATED FROM PYTHON SOURCE LINES 14-17 - -.. code-block:: Python - - import numpy as np - import osipi - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 18-19 - -Generate synthetic AIF with default settings and plot the result. - -.. GENERATED FROM PYTHON SOURCE LINES 19-34 - -.. code-block:: Python - - - # 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. - t = np.arange(0, 6 * 60, 0.5) - - # Create an AIF with default settings - ca = osipi.aif_parker(t) - - # Plot the AIF over the full range - plt.plot(t, ca, "r-") - plt.plot(t, 0 * t, "k-") - plt.xlabel("Time (sec)") - plt.ylabel("Plasma concentration (mM)") - plt.show() - - - - -.. image-sg:: /generated/examples/aif/images/sphx_glr_plot_aif_parker_001.png - :alt: plot aif parker - :srcset: /generated/examples/aif/images/sphx_glr_plot_aif_parker_001.png - :class: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 35-37 - -The bolus arrival time (BAT) defaults to 0s. What happens if we -change it? Let's try, by changing it in steps of 30s: - -.. GENERATED FROM PYTHON SOURCE LINES 37-53 - -.. code-block:: Python - - - ca = osipi.aif_parker(t, BAT=0) - plt.plot(t, ca, "b-", label="BAT = 0s") - ca = osipi.aif_parker(t, BAT=30) - plt.plot(t, ca, "r-", label="BAT = 30s") - ca = osipi.aif_parker(t, BAT=60) - plt.plot(t, ca, "g-", label="BAT = 60s") - ca = osipi.aif_parker(t, BAT=90) - plt.plot(t, ca, "m-", label="BAT = 90s") - plt.xlabel("Time (sec)") - plt.ylabel("Plasma concentration (mM)") - plt.legend() - plt.show() - - # Choose the last image as a thumbnail for the gallery - # sphinx_gallery_thumbnail_number = -1 - - - -.. image-sg:: /generated/examples/aif/images/sphx_glr_plot_aif_parker_002.png - :alt: plot aif parker - :srcset: /generated/examples/aif/images/sphx_glr_plot_aif_parker_002.png - :class: sphx-glr-single-img - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** (0 minutes 0.183 seconds) - - -.. _sphx_glr_download_generated_examples_aif_plot_aif_parker.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: plot_aif_parker.ipynb ` - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: plot_aif_parker.py ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/docs/source/generated/examples/aif/plot_aif_parker_codeobj.pickle b/docs/source/generated/examples/aif/plot_aif_parker_codeobj.pickle deleted file mode 100755 index 51b6d51..0000000 Binary files a/docs/source/generated/examples/aif/plot_aif_parker_codeobj.pickle and /dev/null differ diff --git a/docs/source/generated/examples/aif/plot_dummy.ipynb b/docs/source/generated/examples/aif/plot_dummy.ipynb deleted file mode 100755 index 2565681..0000000 --- a/docs/source/generated/examples/aif/plot_dummy.ipynb +++ /dev/null @@ -1,97 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n# A dummy script\n\nDummy script to illustrate structure of examples folder\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 30s. 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" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/docs/source/generated/examples/aif/plot_dummy.py b/docs/source/generated/examples/aif/plot_dummy.py deleted file mode 100755 index 13cbac2..0000000 --- a/docs/source/generated/examples/aif/plot_dummy.py +++ /dev/null @@ -1,51 +0,0 @@ -""" -============== -A dummy script -============== - -Dummy script to illustrate structure of examples folder -""" - -import matplotlib.pyplot as plt - -# %% -# Import necessary packages -import numpy as np -import osipi - -# %% -# Generate synthetic AIF with default settings and plot the result. - -# 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. -t = np.arange(0, 6 * 60, 0.5) - -# Create an AIF with default settings -ca = osipi.aif_parker(t) - -# Plot the AIF over the full range -plt.plot(t, ca, "r-") -plt.plot(t, 0 * t, "k-") -plt.xlabel("Time (sec)") -plt.ylabel("Plasma concentration (mM)") -plt.show() - -# %% -# The bolus arrival time (BAT) defaults to 30s. What happens if we -# change it? Let's try, by changing it in steps of 30s: - -ca = osipi.aif_parker(t, BAT=0) -plt.plot(t, ca, "b-", label="BAT = 0s") -ca = osipi.aif_parker(t, BAT=30) -plt.plot(t, ca, "r-", label="BAT = 30s") -ca = osipi.aif_parker(t, BAT=60) -plt.plot(t, ca, "g-", label="BAT = 60s") -ca = osipi.aif_parker(t, BAT=90) -plt.plot(t, ca, "m-", label="BAT = 90s") -plt.xlabel("Time (sec)") -plt.ylabel("Plasma concentration (mM)") -plt.legend() -plt.show() - -# Choose the last image as a thumbnail for the gallery -# sphinx_gallery_thumbnail_number = -1 diff --git a/docs/source/generated/examples/aif/plot_dummy.py.md5 b/docs/source/generated/examples/aif/plot_dummy.py.md5 deleted file mode 100755 index 481354c..0000000 --- a/docs/source/generated/examples/aif/plot_dummy.py.md5 +++ /dev/null @@ -1 +0,0 @@ -80d36b7d06c5985854776b4c11214ab1 diff --git a/docs/source/generated/examples/aif/plot_dummy.rst b/docs/source/generated/examples/aif/plot_dummy.rst deleted file mode 100755 index 06dee68..0000000 --- a/docs/source/generated/examples/aif/plot_dummy.rst +++ /dev/null @@ -1,156 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "generated\examples\aif\plot_dummy.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - :ref:`Go to the end ` - to download the full example code. - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_generated_examples_aif_plot_dummy.py: - - -============== -A dummy script -============== - -Dummy script to illustrate structure of examples folder - -.. GENERATED FROM PYTHON SOURCE LINES 8-11 - -.. code-block:: Python - - - import matplotlib.pyplot as plt - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 12-13 - -Import necessary packages - -.. GENERATED FROM PYTHON SOURCE LINES 13-16 - -.. code-block:: Python - - import numpy as np - import osipi - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 17-18 - -Generate synthetic AIF with default settings and plot the result. - -.. GENERATED FROM PYTHON SOURCE LINES 18-33 - -.. code-block:: Python - - - # 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. - t = np.arange(0, 6 * 60, 0.5) - - # Create an AIF with default settings - ca = osipi.aif_parker(t) - - # Plot the AIF over the full range - plt.plot(t, ca, "r-") - plt.plot(t, 0 * t, "k-") - plt.xlabel("Time (sec)") - plt.ylabel("Plasma concentration (mM)") - plt.show() - - - - -.. image-sg:: /generated/examples/aif/images/sphx_glr_plot_dummy_001.png - :alt: plot dummy - :srcset: /generated/examples/aif/images/sphx_glr_plot_dummy_001.png - :class: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 34-36 - -The bolus arrival time (BAT) defaults to 30s. What happens if we -change it? Let's try, by changing it in steps of 30s: - -.. GENERATED FROM PYTHON SOURCE LINES 36-52 - -.. code-block:: Python - - - ca = osipi.aif_parker(t, BAT=0) - plt.plot(t, ca, "b-", label="BAT = 0s") - ca = osipi.aif_parker(t, BAT=30) - plt.plot(t, ca, "r-", label="BAT = 30s") - ca = osipi.aif_parker(t, BAT=60) - plt.plot(t, ca, "g-", label="BAT = 60s") - ca = osipi.aif_parker(t, BAT=90) - plt.plot(t, ca, "m-", label="BAT = 90s") - plt.xlabel("Time (sec)") - plt.ylabel("Plasma concentration (mM)") - plt.legend() - plt.show() - - # Choose the last image as a thumbnail for the gallery - # sphinx_gallery_thumbnail_number = -1 - - - -.. image-sg:: /generated/examples/aif/images/sphx_glr_plot_dummy_002.png - :alt: plot dummy - :srcset: /generated/examples/aif/images/sphx_glr_plot_dummy_002.png - :class: sphx-glr-single-img - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** (0 minutes 0.118 seconds) - - -.. _sphx_glr_download_generated_examples_aif_plot_dummy.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: plot_dummy.ipynb ` - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: plot_dummy.py ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/docs/source/generated/examples/aif/plot_dummy_codeobj.pickle b/docs/source/generated/examples/aif/plot_dummy_codeobj.pickle deleted file mode 100755 index 51b6d51..0000000 Binary files a/docs/source/generated/examples/aif/plot_dummy_codeobj.pickle and /dev/null differ diff --git a/docs/source/generated/examples/aif/sg_execution_times.rst b/docs/source/generated/examples/aif/sg_execution_times.rst deleted file mode 100755 index 9b8a507..0000000 --- a/docs/source/generated/examples/aif/sg_execution_times.rst +++ /dev/null @@ -1,40 +0,0 @@ - -:orphan: - -.. _sphx_glr_generated_examples_aif_sg_execution_times: - - -Computation times -================= -**00:00.301** total execution time for 2 files **from generated\examples\aif**: - -.. container:: - - .. raw:: html - - - - - - - - .. list-table:: - :header-rows: 1 - :class: table table-striped sg-datatable - - * - Example - - Time - - Mem (MB) - * - :ref:`sphx_glr_generated_examples_aif_plot_aif_parker.py` (``plot_aif_parker.py``) - - 00:00.183 - - 0.0 - * - :ref:`sphx_glr_generated_examples_aif_plot_dummy.py` (``plot_dummy.py``) - - 00:00.118 - - 0.0 diff --git a/docs/source/generated/examples/index.rst b/docs/source/generated/examples/index.rst deleted file mode 100755 index 1f44f23..0000000 --- a/docs/source/generated/examples/index.rst +++ /dev/null @@ -1,142 +0,0 @@ -:orphan: - -######## -Examples -######## - -Illustrating common use cases of osipi. - - - -.. raw:: html - -
- -.. thumbnail-parent-div-open - -.. thumbnail-parent-div-close - -.. raw:: html - -
- -************************ -Arterial Input Functions -************************ - - - -.. raw:: html - -
- -.. thumbnail-parent-div-open - -.. raw:: html - -
- -.. 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 - -
The Parker AIF - a play with variables
-
- - -.. raw:: html - -
- -.. 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 - -
A dummy script
-
- - -.. thumbnail-parent-div-close - -.. raw:: html - -
- -********************* -Tissue concentrations -********************* - - - -.. raw:: html - -
- -.. thumbnail-parent-div-open - -.. raw:: html - -
- -.. 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 - -
The Tofts model
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: /generated/examples/tissue/images/thumb/sphx_glr_plot_extended_tofts_thumb.png - :alt: - - :ref:`sphx_glr_generated_examples_tissue_plot_extended_tofts.py` - -.. raw:: html - -
The Extended Tofts model
-
- - -.. thumbnail-parent-div-close - -.. raw:: html - -
- - -.. toctree:: - :hidden: - :includehidden: - - - /generated/examples/aif/index.rst - /generated/examples/tissue/index.rst - - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/docs/source/generated/examples/sg_execution_times.rst b/docs/source/generated/examples/sg_execution_times.rst deleted file mode 100755 index e8da946..0000000 --- a/docs/source/generated/examples/sg_execution_times.rst +++ /dev/null @@ -1,37 +0,0 @@ - -:orphan: - -.. _sphx_glr_generated_examples_sg_execution_times: - - -Computation times -================= -**00:00.000** total execution time for 0 files **from generated/examples**: - -.. container:: - - .. raw:: html - - - - - - - - .. list-table:: - :header-rows: 1 - :class: table table-striped sg-datatable - - * - Example - - Time - - Mem (MB) - * - N/A - - N/A - - N/A diff --git a/docs/source/generated/examples/tissue/images/sphx_glr_plot_extended_tofts_001.png b/docs/source/generated/examples/tissue/images/sphx_glr_plot_extended_tofts_001.png deleted file mode 100755 index d1fd592..0000000 Binary files a/docs/source/generated/examples/tissue/images/sphx_glr_plot_extended_tofts_001.png and /dev/null differ diff --git a/docs/source/generated/examples/tissue/images/sphx_glr_plot_extended_tofts_002.png b/docs/source/generated/examples/tissue/images/sphx_glr_plot_extended_tofts_002.png deleted file mode 100755 index 579b30a..0000000 Binary files a/docs/source/generated/examples/tissue/images/sphx_glr_plot_extended_tofts_002.png and /dev/null differ diff --git a/docs/source/generated/examples/tissue/images/sphx_glr_plot_tofts_001.png b/docs/source/generated/examples/tissue/images/sphx_glr_plot_tofts_001.png deleted file mode 100755 index 7ef6265..0000000 Binary files a/docs/source/generated/examples/tissue/images/sphx_glr_plot_tofts_001.png and /dev/null differ diff --git a/docs/source/generated/examples/tissue/images/sphx_glr_plot_tofts_002.png b/docs/source/generated/examples/tissue/images/sphx_glr_plot_tofts_002.png deleted file mode 100755 index 0276780..0000000 Binary files a/docs/source/generated/examples/tissue/images/sphx_glr_plot_tofts_002.png and /dev/null differ diff --git a/docs/source/generated/examples/tissue/images/thumb/sphx_glr_plot_extended_tofts_thumb.png b/docs/source/generated/examples/tissue/images/thumb/sphx_glr_plot_extended_tofts_thumb.png deleted file mode 100755 index 13e5769..0000000 Binary files a/docs/source/generated/examples/tissue/images/thumb/sphx_glr_plot_extended_tofts_thumb.png and /dev/null differ diff --git a/docs/source/generated/examples/tissue/images/thumb/sphx_glr_plot_tofts_thumb.png b/docs/source/generated/examples/tissue/images/thumb/sphx_glr_plot_tofts_thumb.png deleted file mode 100755 index bd0ec5f..0000000 Binary files a/docs/source/generated/examples/tissue/images/thumb/sphx_glr_plot_tofts_thumb.png and /dev/null differ diff --git a/docs/source/generated/examples/tissue/index.rst b/docs/source/generated/examples/tissue/index.rst deleted file mode 100755 index f2e344d..0000000 --- a/docs/source/generated/examples/tissue/index.rst +++ /dev/null @@ -1,62 +0,0 @@ - - -.. _sphx_glr_generated_examples_tissue: - -********************* -Tissue concentrations -********************* - - - -.. raw:: html - -
- -.. thumbnail-parent-div-open - -.. raw:: html - -
- -.. 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 - -
The Tofts model
-
- - -.. raw:: html - -
- -.. only:: html - - .. image:: /generated/examples/tissue/images/thumb/sphx_glr_plot_extended_tofts_thumb.png - :alt: - - :ref:`sphx_glr_generated_examples_tissue_plot_extended_tofts.py` - -.. raw:: html - -
The Extended Tofts model
-
- - -.. thumbnail-parent-div-close - -.. raw:: html - -
- - -.. toctree:: - :hidden: - - /generated/examples/tissue/plot_tofts - /generated/examples/tissue/plot_extended_tofts diff --git a/docs/source/generated/examples/tissue/plot_extended_tofts.ipynb b/docs/source/generated/examples/tissue/plot_extended_tofts.ipynb deleted file mode 100755 index b4d9c3c..0000000 --- a/docs/source/generated/examples/tissue/plot_extended_tofts.ipynb +++ /dev/null @@ -1,115 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n# The Extended Tofts model\n\nSimulating tissue concentrations from extended Tofts model 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 Parker AIF with default settings.\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 1 sec and a total duration of 6 minutes.\nt = np.arange(0, 6 * 60, 1)\n\n# Create an AIF with default settings\nca = osipi.aif_parker(t)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Plot the tissue concentrations for an extracellular volume fraction\nof 0.2 and 3 different plasma volumes of 0.05, 0.2 and 0.6\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "Ktrans = 0.2 # in units of 1/min\nve = 0.2 # volume fraction between 0 and 1\nvp = [0.05, 0.2, 0.6] # volume fraction between 0 and 1\nct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[0])\nplt.plot(t, ct, \"b-\", label=f\"vp = {vp[0]}\")\nct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[1])\nplt.plot(t, ct, \"g-\", label=f\"vp = {vp[1]}\")\nct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[2])\nplt.plot(t, ct, \"m-\", label=f\"vp = {vp[2]}\")\nplt.xlabel(\"Time (sec)\")\nplt.ylabel(\"Tissue concentration (mM)\")\nplt.legend()\nplt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Comparing different discretization methods for an extracellular\nvolume fraction of 0.2, Ktrans of 0.2 /min and vp of 0.05\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "ct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[0]) # Defaults to Convolution\nplt.plot(t, ct, \"b-\", label=\"Convolution\")\nct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[0], discretization_method=\"exp\")\nplt.plot(t, ct, \"g-\", label=\"Exponential Convolution\")\nplt.title(f\"Ktrans = {Ktrans} /min\")\nplt.xlabel(\"Time (sec)\")\nplt.ylabel(\"Tissue 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" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/docs/source/generated/examples/tissue/plot_extended_tofts.py b/docs/source/generated/examples/tissue/plot_extended_tofts.py deleted file mode 100755 index f2df6fb..0000000 --- a/docs/source/generated/examples/tissue/plot_extended_tofts.py +++ /dev/null @@ -1,57 +0,0 @@ -""" -==================== -The Extended Tofts model -==================== - -Simulating tissue concentrations from extended Tofts model with different settings. -""" - -import matplotlib.pyplot as plt - -# %% -# Import necessary packages -import numpy as np -import osipi - -# %% -# Generate Parker AIF with default settings. - -# Define time points in units of seconds - in this case we use a time -# resolution of 1 sec and a total duration of 6 minutes. -t = np.arange(0, 6 * 60, 1) - -# Create an AIF with default settings -ca = osipi.aif_parker(t) - -# %% -# Plot the tissue concentrations for an extracellular volume fraction -# of 0.2 and 3 different plasma volumes of 0.05, 0.2 and 0.6 -Ktrans = 0.2 # in units of 1/min -ve = 0.2 # volume fraction between 0 and 1 -vp = [0.05, 0.2, 0.6] # volume fraction between 0 and 1 -ct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[0]) -plt.plot(t, ct, "b-", label=f"vp = {vp[0]}") -ct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[1]) -plt.plot(t, ct, "g-", label=f"vp = {vp[1]}") -ct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[2]) -plt.plot(t, ct, "m-", label=f"vp = {vp[2]}") -plt.xlabel("Time (sec)") -plt.ylabel("Tissue concentration (mM)") -plt.legend() -plt.show() - -# %% -# Comparing different discretization methods for an extracellular -# volume fraction of 0.2, Ktrans of 0.2 /min and vp of 0.05 -ct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[0]) # Defaults to Convolution -plt.plot(t, ct, "b-", label="Convolution") -ct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[0], discretization_method="exp") -plt.plot(t, ct, "g-", label="Exponential Convolution") -plt.title(f"Ktrans = {Ktrans} /min") -plt.xlabel("Time (sec)") -plt.ylabel("Tissue concentration (mM)") -plt.legend() -plt.show() - -# Choose the last image as a thumbnail for the gallery -# sphinx_gallery_thumbnail_number = -1 diff --git a/docs/source/generated/examples/tissue/plot_extended_tofts.py.md5 b/docs/source/generated/examples/tissue/plot_extended_tofts.py.md5 deleted file mode 100755 index 1e726a8..0000000 --- a/docs/source/generated/examples/tissue/plot_extended_tofts.py.md5 +++ /dev/null @@ -1 +0,0 @@ -67f6424a8ea349ea69f2a6e0993d78c7 diff --git a/docs/source/generated/examples/tissue/plot_extended_tofts.rst b/docs/source/generated/examples/tissue/plot_extended_tofts.rst deleted file mode 100755 index 13d638f..0000000 --- a/docs/source/generated/examples/tissue/plot_extended_tofts.rst +++ /dev/null @@ -1,175 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "generated\examples\tissue\plot_extended_tofts.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - :ref:`Go to the end ` - to download the full example code. - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_generated_examples_tissue_plot_extended_tofts.py: - - -========================= -The Extended Tofts model -========================= - -Simulating tissue concentrations from extended Tofts model with different settings. - -.. GENERATED FROM PYTHON SOURCE LINES 8-11 - -.. code-block:: Python - - - import matplotlib.pyplot as plt - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 12-13 - -Import necessary packages - -.. GENERATED FROM PYTHON SOURCE LINES 13-16 - -.. code-block:: Python - - import numpy as np - import osipi - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 17-18 - -Generate Parker AIF with default settings. - -.. GENERATED FROM PYTHON SOURCE LINES 18-26 - -.. code-block:: Python - - - # Define time points in units of seconds - in this case we use a time - # resolution of 1 sec and a total duration of 6 minutes. - t = np.arange(0, 6 * 60, 1) - - # Create an AIF with default settings - ca = osipi.aif_parker(t) - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 27-29 - -Plot the tissue concentrations for an extracellular volume fraction -of 0.2 and 3 different plasma volumes of 0.05, 0.2 and 0.6 - -.. GENERATED FROM PYTHON SOURCE LINES 29-43 - -.. code-block:: Python - - Ktrans = 0.2 # in units of 1/min - ve = 0.2 # volume fraction between 0 and 1 - vp = [0.05, 0.2, 0.6] # volume fraction between 0 and 1 - ct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[0]) - plt.plot(t, ct, "b-", label=f"vp = {vp[0]}") - ct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[1]) - plt.plot(t, ct, "g-", label=f"vp = {vp[1]}") - ct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[2]) - plt.plot(t, ct, "m-", label=f"vp = {vp[2]}") - plt.xlabel("Time (sec)") - plt.ylabel("Tissue concentration (mM)") - plt.legend() - plt.show() - - - - -.. image-sg:: /generated/examples/tissue/images/sphx_glr_plot_extended_tofts_001.png - :alt: plot extended tofts - :srcset: /generated/examples/tissue/images/sphx_glr_plot_extended_tofts_001.png - :class: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 44-46 - -Comparing different discretization methods for an extracellular -volume fraction of 0.2, Ktrans of 0.2 /min and vp of 0.05 - -.. GENERATED FROM PYTHON SOURCE LINES 46-58 - -.. code-block:: Python - - ct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[0]) # Defaults to Convolution - plt.plot(t, ct, "b-", label="Convolution") - ct = osipi.extended_tofts(t, ca, Ktrans, ve, vp[0], discretization_method="exp") - plt.plot(t, ct, "g-", label="Exponential Convolution") - plt.title(f"Ktrans = {Ktrans} /min") - plt.xlabel("Time (sec)") - plt.ylabel("Tissue concentration (mM)") - plt.legend() - plt.show() - - # Choose the last image as a thumbnail for the gallery - # sphinx_gallery_thumbnail_number = -1 - - - -.. image-sg:: /generated/examples/tissue/images/sphx_glr_plot_extended_tofts_002.png - :alt: Ktrans = 0.2 /min - :srcset: /generated/examples/tissue/images/sphx_glr_plot_extended_tofts_002.png - :class: sphx-glr-single-img - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** (0 minutes 0.136 seconds) - - -.. _sphx_glr_download_generated_examples_tissue_plot_extended_tofts.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: plot_extended_tofts.ipynb ` - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: plot_extended_tofts.py ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/docs/source/generated/examples/tissue/plot_extended_tofts_codeobj.pickle b/docs/source/generated/examples/tissue/plot_extended_tofts_codeobj.pickle deleted file mode 100755 index b58f99b..0000000 Binary files a/docs/source/generated/examples/tissue/plot_extended_tofts_codeobj.pickle and /dev/null differ diff --git a/docs/source/generated/examples/tissue/plot_tofts.ipynb b/docs/source/generated/examples/tissue/plot_tofts.ipynb deleted file mode 100755 index 1e137aa..0000000 --- a/docs/source/generated/examples/tissue/plot_tofts.ipynb +++ /dev/null @@ -1,115 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "\n# The Tofts model\n\nSimulating tissue concentrations from Tofts model 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 Parker AIF with default settings.\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 1 sec and a total duration of 6 minutes.\nt = np.arange(0, 6 * 60, 1)\n\n# Create an AIF with default settings\nca = osipi.aif_parker(t)" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Plot the tissue concentrations for an extracellular volume fraction\nof 0.2 and 3 different transfer rate constants of 0.05, 0.2 and 0.6\n/min\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "Ktrans = [0.05, 0.2, 0.6] # in units of 1/min\nve = 0.2 # volume fraction between 0 and 1\nct = osipi.tofts(t, ca, Ktrans=Ktrans[0], ve=ve)\nplt.plot(t, ct, \"b-\", label=f\"Ktrans = {Ktrans[0]} /min\")\nct = osipi.tofts(t, ca, Ktrans[1], ve)\nplt.plot(t, ct, \"g-\", label=f\"Ktrans = {Ktrans[1]} /min\")\nct = osipi.tofts(t, ca, Ktrans[2], ve)\nplt.plot(t, ct, \"m-\", label=f\"Ktrans = {Ktrans[2]} /min\")\nplt.xlabel(\"Time (sec)\")\nplt.ylabel(\"Tissue concentration (mM)\")\nplt.legend()\nplt.show()" - ] - }, - { - "cell_type": "markdown", - "metadata": {}, - "source": [ - "Comparing different discretization methods for an extracellular\nvolume fraction of 0.2 and Ktrans of 0.2 /min\n\n" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "metadata": { - "collapsed": false - }, - "outputs": [], - "source": [ - "ct = osipi.tofts(t, ca, Ktrans=Ktrans[1], ve=ve) # Defaults to Convolution\nplt.plot(t, ct, \"b-\", label=\"Convolution\")\nct = osipi.tofts(t, ca, Ktrans=Ktrans[1], ve=ve, discretization_method=\"exp\")\nplt.plot(t, ct, \"g-\", label=\"Exponential Convolution\")\nplt.title(f\"Ktrans = {Ktrans[1]} /min\")\nplt.xlabel(\"Time (sec)\")\nplt.ylabel(\"Tissue 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" - } - }, - "nbformat": 4, - "nbformat_minor": 0 -} diff --git a/docs/source/generated/examples/tissue/plot_tofts.py b/docs/source/generated/examples/tissue/plot_tofts.py deleted file mode 100755 index d623da9..0000000 --- a/docs/source/generated/examples/tissue/plot_tofts.py +++ /dev/null @@ -1,57 +0,0 @@ -""" -==================== -The Tofts model -==================== - -Simulating tissue concentrations from Tofts model with different settings. -""" - -import matplotlib.pyplot as plt - -# %% -# Import necessary packages -import numpy as np -import osipi - -# %% -# Generate Parker AIF with default settings. - -# Define time points in units of seconds - in this case we use a time -# resolution of 1 sec and a total duration of 6 minutes. -t = np.arange(0, 6 * 60, 1) - -# Create an AIF with default settings -ca = osipi.aif_parker(t) - -# %% -# Plot the tissue concentrations for an extracellular volume fraction -# of 0.2 and 3 different transfer rate constants of 0.05, 0.2 and 0.6 -# /min -Ktrans = [0.05, 0.2, 0.6] # in units of 1/min -ve = 0.2 # volume fraction between 0 and 1 -ct = osipi.tofts(t, ca, Ktrans=Ktrans[0], ve=ve) -plt.plot(t, ct, "b-", label=f"Ktrans = {Ktrans[0]} /min") -ct = osipi.tofts(t, ca, Ktrans[1], ve) -plt.plot(t, ct, "g-", label=f"Ktrans = {Ktrans[1]} /min") -ct = osipi.tofts(t, ca, Ktrans[2], ve) -plt.plot(t, ct, "m-", label=f"Ktrans = {Ktrans[2]} /min") -plt.xlabel("Time (sec)") -plt.ylabel("Tissue concentration (mM)") -plt.legend() -plt.show() - -# %% -# Comparing different discretization methods for an extracellular -# volume fraction of 0.2 and Ktrans of 0.2 /min -ct = osipi.tofts(t, ca, Ktrans=Ktrans[1], ve=ve) # Defaults to Convolution -plt.plot(t, ct, "b-", label="Convolution") -ct = osipi.tofts(t, ca, Ktrans=Ktrans[1], ve=ve, discretization_method="exp") -plt.plot(t, ct, "g-", label="Exponential Convolution") -plt.title(f"Ktrans = {Ktrans[1]} /min") -plt.xlabel("Time (sec)") -plt.ylabel("Tissue concentration (mM)") -plt.legend() -plt.show() - -# Choose the last image as a thumbnail for the gallery -# sphinx_gallery_thumbnail_number = -1 diff --git a/docs/source/generated/examples/tissue/plot_tofts.py.md5 b/docs/source/generated/examples/tissue/plot_tofts.py.md5 deleted file mode 100755 index 2ef949a..0000000 --- a/docs/source/generated/examples/tissue/plot_tofts.py.md5 +++ /dev/null @@ -1 +0,0 @@ -00e98a230054047d6b50baaf857b22b3 diff --git a/docs/source/generated/examples/tissue/plot_tofts.rst b/docs/source/generated/examples/tissue/plot_tofts.rst deleted file mode 100755 index 2b0b9e0..0000000 --- a/docs/source/generated/examples/tissue/plot_tofts.rst +++ /dev/null @@ -1,175 +0,0 @@ - -.. DO NOT EDIT. -.. THIS FILE WAS AUTOMATICALLY GENERATED BY SPHINX-GALLERY. -.. TO MAKE CHANGES, EDIT THE SOURCE PYTHON FILE: -.. "generated\examples\tissue\plot_tofts.py" -.. LINE NUMBERS ARE GIVEN BELOW. - -.. only:: html - - .. note:: - :class: sphx-glr-download-link-note - - :ref:`Go to the end ` - to download the full example code. - -.. rst-class:: sphx-glr-example-title - -.. _sphx_glr_generated_examples_tissue_plot_tofts.py: - - -==================== -The Tofts model -==================== - -Simulating tissue concentrations from Tofts model with different settings. - -.. GENERATED FROM PYTHON SOURCE LINES 8-11 - -.. code-block:: Python - - - import matplotlib.pyplot as plt - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 12-13 - -Import necessary packages - -.. GENERATED FROM PYTHON SOURCE LINES 13-16 - -.. code-block:: Python - - import numpy as np - import osipi - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 17-18 - -Generate Parker AIF with default settings. - -.. GENERATED FROM PYTHON SOURCE LINES 18-26 - -.. code-block:: Python - - - # Define time points in units of seconds - in this case we use a time - # resolution of 1 sec and a total duration of 6 minutes. - t = np.arange(0, 6 * 60, 1) - - # Create an AIF with default settings - ca = osipi.aif_parker(t) - - - - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 27-30 - -Plot the tissue concentrations for an extracellular volume fraction -of 0.2 and 3 different transfer rate constants of 0.05, 0.2 and 0.6 -/min - -.. GENERATED FROM PYTHON SOURCE LINES 30-43 - -.. code-block:: Python - - Ktrans = [0.05, 0.2, 0.6] # in units of 1/min - ve = 0.2 # volume fraction between 0 and 1 - ct = osipi.tofts(t, ca, Ktrans=Ktrans[0], ve=ve) - plt.plot(t, ct, "b-", label=f"Ktrans = {Ktrans[0]} /min") - ct = osipi.tofts(t, ca, Ktrans[1], ve) - plt.plot(t, ct, "g-", label=f"Ktrans = {Ktrans[1]} /min") - ct = osipi.tofts(t, ca, Ktrans[2], ve) - plt.plot(t, ct, "m-", label=f"Ktrans = {Ktrans[2]} /min") - plt.xlabel("Time (sec)") - plt.ylabel("Tissue concentration (mM)") - plt.legend() - plt.show() - - - - -.. image-sg:: /generated/examples/tissue/images/sphx_glr_plot_tofts_001.png - :alt: plot tofts - :srcset: /generated/examples/tissue/images/sphx_glr_plot_tofts_001.png - :class: sphx-glr-single-img - - - - - -.. GENERATED FROM PYTHON SOURCE LINES 44-46 - -Comparing different discretization methods for an extracellular -volume fraction of 0.2 and Ktrans of 0.2 /min - -.. GENERATED FROM PYTHON SOURCE LINES 46-58 - -.. code-block:: Python - - ct = osipi.tofts(t, ca, Ktrans=Ktrans[1], ve=ve) # Defaults to Convolution - plt.plot(t, ct, "b-", label="Convolution") - ct = osipi.tofts(t, ca, Ktrans=Ktrans[1], ve=ve, discretization_method="exp") - plt.plot(t, ct, "g-", label="Exponential Convolution") - plt.title(f"Ktrans = {Ktrans[1]} /min") - plt.xlabel("Time (sec)") - plt.ylabel("Tissue concentration (mM)") - plt.legend() - plt.show() - - # Choose the last image as a thumbnail for the gallery - # sphinx_gallery_thumbnail_number = -1 - - - -.. image-sg:: /generated/examples/tissue/images/sphx_glr_plot_tofts_002.png - :alt: Ktrans = 0.2 /min - :srcset: /generated/examples/tissue/images/sphx_glr_plot_tofts_002.png - :class: sphx-glr-single-img - - - - - - -.. rst-class:: sphx-glr-timing - - **Total running time of the script:** (0 minutes 0.143 seconds) - - -.. _sphx_glr_download_generated_examples_tissue_plot_tofts.py: - -.. only:: html - - .. container:: sphx-glr-footer sphx-glr-footer-example - - .. container:: sphx-glr-download sphx-glr-download-jupyter - - :download:`Download Jupyter notebook: plot_tofts.ipynb ` - - .. container:: sphx-glr-download sphx-glr-download-python - - :download:`Download Python source code: plot_tofts.py ` - - -.. only:: html - - .. rst-class:: sphx-glr-signature - - `Gallery generated by Sphinx-Gallery `_ diff --git a/docs/source/generated/examples/tissue/plot_tofts_codeobj.pickle b/docs/source/generated/examples/tissue/plot_tofts_codeobj.pickle deleted file mode 100755 index deefd59..0000000 Binary files a/docs/source/generated/examples/tissue/plot_tofts_codeobj.pickle and /dev/null differ diff --git a/docs/source/generated/examples/tissue/sg_execution_times.rst b/docs/source/generated/examples/tissue/sg_execution_times.rst deleted file mode 100755 index b41261a..0000000 --- a/docs/source/generated/examples/tissue/sg_execution_times.rst +++ /dev/null @@ -1,40 +0,0 @@ - -:orphan: - -.. _sphx_glr_generated_examples_tissue_sg_execution_times: - - -Computation times -================= -**00:00.279** total execution time for 2 files **from generated\examples\tissue**: - -.. container:: - - .. raw:: html - - - - - - - - .. list-table:: - :header-rows: 1 - :class: table table-striped sg-datatable - - * - Example - - Time - - Mem (MB) - * - :ref:`sphx_glr_generated_examples_tissue_plot_tofts.py` (``plot_tofts.py``) - - 00:00.143 - - 0.0 - * - :ref:`sphx_glr_generated_examples_tissue_plot_extended_tofts.py` (``plot_extended_tofts.py``) - - 00:00.136 - - 0.0