-
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.
Added 2CXM documentation and example
- Loading branch information
1 parent
1429150
commit 6dd6763
Showing
6 changed files
with
96 additions
and
1 deletion.
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
""" | ||
============= | ||
The Two Compartment Exchange Model | ||
============= | ||
Simulating tissue concentrations from two compartment models 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, plasma volume fraction of 0.3, extraction fraction of 0.15 | ||
# and flow rate of 0.2 ml/min | ||
E = 0.15 # Extraction fraction | ||
Fp = 0.2 # Flow rate in ml/min | ||
Ve = 0.2 # Extracellular volume fraction | ||
Vp = 0.3 # Plasma volume fraction | ||
ct = osipi.two_cxm(t, ca, E=E, Fp=Fp, Ve=Ve, Vp=Vp) | ||
plt.plot(t, ct, "b-", label=f"E = {E}, Fp = {Fp}, Ve = {Ve}, Vp = {Vp}") | ||
plt.xlabel("Time (sec)") | ||
plt.ylabel("Tissue concentration (mM)") | ||
plt.show() |
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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
# osipi.Two Compartment Exchange Model | ||
|
||
::: osipi.two_cxm | ||
|
||
## Example using `osipi.two_cxm` | ||
|
||
<figure class="mkd-glr-thumbcontainer" tooltip="Simulating tissue concentrations from two compartment exchange model with different settings."> | ||
<img alt="The Two Compartment Exchange Model" src="..\..\..\..\generated\gallery\tissue\images\thumb\mkd_glr_plot_two_cxm_thumb.png" /> | ||
<figcaption class="caption"> | ||
<span class="caption-text"> | ||
<a class="reference internal" href="..\..\..\..\generated\gallery\tissue\plot_two_cxm"> | ||
<span class="std std-ref">The Two Compartment Exchange Model</span> | ||
</a> | ||
</span> | ||
</figcaption> | ||
</figure> |
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,3 +1,4 @@ | ||
|
||
- [tofts](tofts.md) | ||
- [extended_tofts](extended_tofts.md) | ||
- [two_cxm](2cxm.md) |
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