describe

petrophys.function_schema.describe

describe(function)[source]

Describe a public analysis function’s parameters as plain data.

Parameters:

function (callable) – A function of SCOPE.

Returns:

name, module, summary, samplewise and parameters: one dict per parameter in signature order, with name, kind, required, default and description, and curve, unit, choices, many or role where they apply. A function that is not declared has kind None for every parameter.

Return type:

dict

Examples

>>> from petrophys.function_schema import describe
>>> from petrophys.interpretation.saturation.archie import archie
>>> {p["name"]: p["kind"] for p in describe(archie)["parameters"]}["rw"]
'curve'