curves
curves
¶
Time-course visualization functions.
This module provides functions for visualizing time-course data, AIFs, and residue functions.
plot_time_course
¶
plot_time_course(time, signal, fitted=None, title='Time Course', xlabel='Time (s)', ylabel='Signal', label_measured='Measured', label_fitted='Fitted', ax=None, figsize=(10, 6))
Plot time-course data with optional fitted curve.
| PARAMETER | DESCRIPTION |
|---|---|
time
|
Time points.
TYPE:
|
signal
|
Measured signal values.
TYPE:
|
fitted
|
Fitted/predicted signal values.
TYPE:
|
title
|
Plot title.
TYPE:
|
xlabel
|
Axis labels.
TYPE:
|
ylabel
|
Axis labels.
TYPE:
|
label_measured
|
Legend labels.
TYPE:
|
label_fitted
|
Legend labels.
TYPE:
|
ax
|
Axes to plot on.
TYPE:
|
figsize
|
Figure size if creating new figure.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Axes
|
The axes with the plot. |
plot_aif
¶
plot_aif(aif, time=None, population_aif=None, title='Arterial Input Function', xlabel='Time (s)', ylabel='Concentration (mM)', ax=None, figsize=(10, 6))
Plot arterial input function.
| PARAMETER | DESCRIPTION |
|---|---|
aif
|
AIF to plot (or measured AIF array if using time parameter).
TYPE:
|
time
|
Time points (required if aif is an array).
TYPE:
|
population_aif
|
Population-based AIF to compare.
TYPE:
|
title
|
Plot title.
TYPE:
|
xlabel
|
Axis labels.
TYPE:
|
ylabel
|
Axis labels.
TYPE:
|
ax
|
Axes to plot on.
TYPE:
|
figsize
|
Figure size.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Figure or Axes
|
The figure or axes with the plot. |
plot_residue_function
¶
plot_residue_function(time, residue, title='Residue Function', xlabel='Time (s)', ylabel='R(t)', show_mtt=True, show_oscillation_warning=False, ax=None, figsize=(10, 6))
Plot residue function from deconvolution.
| PARAMETER | DESCRIPTION |
|---|---|
time
|
Time points.
TYPE:
|
residue
|
Residue function values.
TYPE:
|
title
|
Plot title.
TYPE:
|
xlabel
|
Axis labels.
TYPE:
|
ylabel
|
Axis labels.
TYPE:
|
show_mtt
|
Whether to mark MTT on the plot.
TYPE:
|
show_oscillation_warning
|
Whether to check and warn about oscillations.
TYPE:
|
ax
|
Axes to plot on.
TYPE:
|
figsize
|
Figure size.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Figure or Axes
|
The figure or axes with the plot. |
plot_multi_curves
¶
plot_multi_curves(time, curves, labels=None, colors=None, title='Time Courses', xlabel='Time (s)', ylabel='Signal', ax=None, figsize=(10, 6))
Plot multiple time courses on the same axes.
| PARAMETER | DESCRIPTION |
|---|---|
time
|
Time points.
TYPE:
|
curves
|
List of time courses to plot.
TYPE:
|
labels
|
Labels for each curve.
TYPE:
|
colors
|
Colors for each curve.
TYPE:
|
title
|
Plot title.
TYPE:
|
xlabel
|
Axis labels.
TYPE:
|
ylabel
|
Axis labels.
TYPE:
|
ax
|
Axes to plot on.
TYPE:
|
figsize
|
Figure size.
TYPE:
|
| RETURNS | DESCRIPTION |
|---|---|
Axes
|
The axes with the plot. |