calculate_patlak_x#

petpal.kinetic_modeling.graphical_analysis.calculate_patlak_x(tac_times: numpy.ndarray, tac_vals: numpy.ndarray) numpy.ndarray#

Calculates the x-variable in Patlak analysis \(\left(\frac{\int_{0}^{T}f(t)\mathrm{d}t}{f(T)}\right)\).

Patlak-Gjedde analysis is a linearization of the 2-TCM with irreversible uptake in the second compartment. Therefore, we essentially have to fit a line to some data \(y = mx+b\). This function calculates the \(x\) variable for Patlak analysis where,

\[x = \frac{\int_{0}^{T} C_\mathrm{P}(t) \mathrm{d}t}{C_\mathrm{P}(t)},\]

where further \(C_\mathrm{P}\) is usually the plasma TAC.

Parameters:
  • tac_times (np.ndarray) – Array containing the sampled times.

  • tac_vals (np.ndarray) – Array for activity values at the sampled times.

Returns:

(np.ndarray) – Patlak x-variable. Cumulative integral of activity divided by activity.