run_formation_analysis

petrophys.evaluation.summaries.run_formation_analysis

run_formation_analysis(
las_path,
formations_csv_path,
well_name=None,
csv_format='auto',
workflow_config=None,
standardize=True,
*,
rank=None,
**workflow_kwargs,
)[source]

End-to-end formation analysis: load LAS, run workflow, analyze by formation.

This is a convenience function that combines:

  1. Loading the LAS file

  2. Standardizing curves

  3. Loading formation definitions from CSV and attaching them to the well, as petrophys.read(path, formations=...) does

  4. Running the dynamic workflow, which sees the formations

  5. Computing per-formation summaries

Parameters:
  • las_path (str or Path) – Path to LAS file

  • formations_csv_path (str or Path) – Path to formations CSV file

  • well_name (str, optional) – Well name for filtering formations (needed for NPD format)

  • csv_format (str) – CSV format: “auto”, “simple”, “npd”, “danish”

  • workflow_config (DynamicWorkflowConfig, optional) – Workflow configuration (if None, uses workflow_kwargs)

  • standardize (bool) – Whether to standardize curves before workflow

  • rank (str, optional) – Stratigraphic level to analyze when the tops mix levels, e.g. "group" or "formation". For NPD-style picks without a rank column, the level is read from the name suffix (GP./Fm./Mb.).

  • **workflow_kwargs – Additional workflow configuration parameters

Returns:

Formation-level analysis results. workflow_result holds the interpretation the summaries were computed from.

Return type:

FormationAnalysisResult

Raises:
  • RuntimeError – If the interpretation workflow fails; summaries are never computed from a failed interpretation.

  • ValueError – If no formations are found for the well.

Examples

>>> result = run_formation_analysis(
...     "well.las",
...     "formations.csv",
...     rw=0.05,
...     lithology="clastic",
... )
>>> result.print_report()
>>> result.to_csv("output.csv")