dcmri.conc_nscomp#

dcmri.conc_nscomp(J, T, t=None, dt=1.0)[source]#

Indicator concentration inside a non-stationary compartment.

See section Non-stationary compartment for more detail.

Parameters:
  • J (array_like) – the indicator flux entering the compartment.

  • T (array_like) – array with the mean transit time as a function of time, with the same length as J. Only finite and strictly positive values are allowed.

  • t (array_like, optional) – the time points of the indicator flux J, in the same units as T. If t=None, the time points are assumed to be uniformly spaced with spacing dt. Defaults to None.

  • dt (float, optional) – spacing between time points for uniformly spaced time points, in the same units as T. This parameter is ignored if t is explicity provided. Defaults to 1.0.

Returns:

Concentration as a 1D array.

Return type:

numpy.ndarray

Raises:

ValueError – if one of the parameters is out of bounds.

See also

flux_nscomp

Example

>>> import dcmri as dc
>>> t = [0,5,15,30,60]
>>> J = [1,2,3,3,2]
>>> T = [1,2,3,4,5]
>>> dc.conc_nscomp(J, T, t)
array([ 0.        ,  3.09885687,  7.96130923, 11.53123615, 10.28639254])