Skip to content

pk

The pharmacokinetic parameters of the scans of a model.

scan_nca is the non-compartmental analysis of pkpdutils of a timecourse at every point of a scan at once (pkpdutils.nca of a batch), instead of one analysis per point (nca_single):

# not executed
dose = Q(start_values(res, "PODOSE_hctz").values, res.units["PODOSE_hctz"]) / Mr
result = scan_nca(
    res, "[Cve_hctz]", dose=dose, route=Route.ORAL, substance="hctz",
    lloq_fraction=1e-6,
)
df = nca_frame(result)  # a row per point: its position, the parameters, the units

The labels and the units of the parameters in the figures are PK_LABELS and PK_UNITS; the keys are the parameters of the analysis, the base of the experiments of a model has them as pk_labels and pk_units.

scan_nca

scan_nca(
    res,
    key,
    *,
    dose,
    route,
    substance,
    lloq_fraction=None,
    options=None,
)

Get the non-compartmental analysis of a timecourse at every point of a scan.

The timecourses of all points are one batch of pkpdutils (ScanResult.to_timecourses: the state after a change at its time, the padding of a ragged result left out), which pkpdutils.nca analyses vectorized, with the parameters of nca_single of every point.

Parameters:

Name Type Description Default
res ScanResult

the result of the scan, of any number of dimensions.

required
key str

the variable, a concentration.

required
dose Quantity | None

the dose of every point as an amount of substance, a quantity whose magnitude has the shape of the dimensions of the scan, in their order (start_values(res, dose_id) converted with the molecular weight), or one dose of all points; None for a substance without a dose, e.g. a metabolite, whose analysis has no parameters of the dose (clearance, volume).

required
route Route | None

the route of the dose, None without a dose.

required
substance str

the name of the substance.

required
lloq_fraction float | None

the limit of quantification of every point relative to its maximum, None without; long simulations decay into the numerical noise of the integrator, which would be the terminal phase.

None
options NCAOptions | None

the options of the analysis, the defaults of pkpdutils by default.

None

Returns:

Type Description
NCAResult

The analysis over the dimensions of the scan; to_dataframe() has a

NCAResult

row per point with its position along every dimension.

nca_frame

nca_frame(result)

Get the parameters of an analysis as a row per point with their units.

The rows of nca_single(...).to_quantities() of every point: the position of the point along every dimension (a column named after the dimension, the index along it, also for a dimension with labels, e.g. the points of a local sensitivity design), every parameter of the analysis with its unit (<name>_unit) and the names of its flags, comma separated (nca_flags).

Parameters:

Name Type Description Default
result NCAResult

the analysis of a scan, see scan_nca.

required

Returns:

Type Description
DataFrame

A row per point.