WorkflowRunResult¶
petrophys.workflow.custom.WorkflowRunResult
Also available as petrophys.workflow.WorkflowRunResult
- class WorkflowRunResult(workflow, well)[source]¶
The outcome of
Workflow.run()on one well.- steps¶
One trace record per executed step, in order: method, input and output curves, parameters, decisions and, for a failed step, the error message.
- Type:
list of StepResult
- artifacts¶
Non-curve outputs by step name, e.g. the table of
steps.formation_summary()or the full result ofsteps.interpret().- Type:
Attributes
Curves written by the run, in the order they were written.
"complete","partial"(steps skipped),"failed"or"not_run".True when no step failed (skipped steps are not failures).
Methods
Gross, net and average properties for each formation.
Plot the interpreted well; takes the same options as
petrophys.plot().Print a readable, step-by-step account of the run.
Raise
RuntimeErrorif a step failed; otherwise return this result.Statistics of curves of the run's well over a depth window: a row per curve with
unit,samples,mean,p10,medianandp90(default VCL, PHIT, PHIE, SW and PERM where present).The record of one step that ran: its
method,decisions,parameters,input_curvesandoutput_curves.Summarize the run as compact, JSON-serializable data.
Return the trace as a table, one row per workflow step.
Export the run as JSON; see
to_trace_dict().Write the interpreted well to LAS, with the workflow definition.
Export the run as a JSON-safe dictionary.
- step(name)[source]¶
The record of one step that ran: its
method,decisions,parameters,input_curvesandoutput_curves. A step that did not run raises KeyError, with the reason it was skipped.- Parameters:
name (str)
- Return type:
- statistics(curves=None, top=None, bottom=None)[source]¶
Statistics of curves of the run’s well over a depth window: a row per curve with
unit,samples,mean,p10,medianandp90(default VCL, PHIT, PHIE, SW and PERM where present).
- raise_for_errors()[source]¶
Raise
RuntimeErrorif a step failed; otherwise return this result.- Return type:
- summary(top=None, bottom=None)[source]¶
Summarize the run as compact, JSON-serializable data.
- Parameters:
- Returns:
petrophys_version,workflow,well,status,summary_interval,key_results(statistics of the curves the steps declare they produce),net_thickness(net rock, reservoir and pay),executed_steps,skipped_stepswith reasons,artifacts,warningsanderrors.- Return type:
Examples
>>> import petrophys as pp >>> from petrophys.workflow import Workflow, steps >>> run = Workflow("vcl", [steps.clay_volume()]).run(pp.read(pp.sample("30_6-5"))) >>> sorted(run.summary(top=2841, bottom=2958)["key_results"]) ['VCL']
- formation_summary(formations=None, *, rank=None)[source]¶
Gross, net and average properties for each formation.
Same table as
petrophys.workflow.DynamicWorkflowResult.formation_summary(): averages of PHIE, SW, VCL and PERM are over net-pay samples.- Parameters:
formations (path, DataFrame, mapping or sequence, optional) – Formation tops or intervals; defaults to the formations attached with
petrophys.read(path, formations=...).rank (str, optional) – Level to summarize when the tops mix levels, e.g.
"group"; tops that mix levels default to"formation".
- Returns:
One row per formation.
- Return type:
- Raises:
ValueError – If no formations are given or attached.
- to_dataframe()[source]¶
Return the trace as a table, one row per workflow step.
Skipped steps are included with status
SKIPPEDand their reason inMessage. For the curves themselves useresult.well.to_dataframe().- Returns:
Columns
Step,Kind,Status(OK,FAILorSKIPPED),Method,Input Curves,Output Curves,Parameters,Decisions,WarningsandMessage.- Return type:
- to_trace_dict(include_curves=None)[source]¶
Export the run as a JSON-safe dictionary.
- Parameters:
include_curves (sequence of str, optional) – Curves to add compact statistics for.
- Returns:
schema,schema_version,petrophys_version,workflow(the definition as run),well,status,success,steps(every trace record with its warnings),steps_skipped,warnings,errors,artifacts(tables as records) andcurve_summaries.- Return type:
- to_json(path=None, include_curves=None, indent=2)[source]¶
Export the run as JSON; see
to_trace_dict().
- to_las(path, **options)[source]¶
Write the interpreted well to LAS, with the workflow definition.
The
~Paramssection keeps the source header values and addsPP_VERSION,PP_WORKFLOW,PP_STATUSand onePP_STEPnnentry per step (its name, call and outcome).~Otherholds the full workflow definition as JSON, soWorkflow.from_dict()can rebuild it, and the reasons for skipped steps.- Parameters:
path (str or Path) – Output LAS file.
**options – Passed to
petrophys.io.export_las(), e.g.curves=[...].
- Returns:
The written file.
- Return type:
Path
- plot(**options)[source]¶
Plot the interpreted well; takes the same options as
petrophys.plot().