read_uncertainty_table

petrophys.evaluation.uncertainty.read_uncertainty_table

Also available as petrophys.evaluation.read_uncertainty_table

read_uncertainty_table(source, *, sheet_name=None)[source]

Read input uncertainties from a table (CSV, Excel or DataFrame) for monte_carlo().

One row per input: a name (or parameter) column, a distribution (dist) column, and the parameter columns that distribution needs: mean/sd (normal), median/sd (lognormal, sd of ln), low/high (uniform), low/mode/high (triangular); low/high on a normal or lognormal row truncate it. A fixed (or constant) row takes its value (or mean).

>>> import pandas as pd
>>> read_uncertainty_table(pd.DataFrame({
...     "name": ["rw", "m"], "distribution": ["triangular", "uniform"],
...     "low": [0.05, 1.8], "mode": [0.07, None], "high": [0.09, 2.2]}))["m"]
('uniform', 1.8, 2.2)
Parameters:
  • source (Any)

  • sheet_name (Any)

Return type:

Dict[str, Any]