calculate_patlak_x ============================================================= .. py:function:: 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 :math:`\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 :math:`y = mx+b`. This function calculates the :math:`x` variable for Patlak analysis where, .. math:: x = \frac{\int_{0}^{T} C_\mathrm{P}(t) \mathrm{d}t}{C_\mathrm{P}(t)}, where further :math:`C_\mathrm{P}` is usually the plasma TAC. :param tac_times: Array containing the sampled times. :type tac_times: np.ndarray :param tac_vals: Array for activity values at the sampled times. :type tac_vals: np.ndarray :returns: *(np.ndarray)* -- Patlak x-variable. Cumulative integral of activity divided by activity.