Step¶
petrophys.workflow.custom.Step
Also available as petrophys.workflow.Step
- class Step(
- kind,
- name,
- params,
- *,
- settings,
- runner,
- requirements=(),
- produces=None,
- description='',
- planner=None,
- produces_text='',
- factory=None,
- label=None,
- default_name=None,
One configured step of a
Workflow.Create steps with the factories in
petrophys.workflow.steps, for examplesteps.porosity(method="density"), or with a function decorated byworkflow_step(). Steps are immutable: usewith_params()to change a parameter.A step’s
nameis unique within a workflow and defaults to itskind(built-in steps) or function name (custom steps).paramsholds the parameters set when it was created;requiresandproducesstate its inputs and its output curves with their units.Examples
>>> from petrophys.workflow import Workflow, steps >>> step = steps.net_pay(sw_cutoff=0.5, name="pay_tight") >>> step.name, step.kind, step.params ('pay_tight', 'net_pay', {'sw_cutoff': 0.5}) >>> step.requires ('VCL', 'PHIE', 'SW')
Attributes
One-line summary of what the step does.
True for steps made with
workflow_step().Built-in step type, or
"module:function"for a custom step.Unique name of this step within a workflow.
Parameters set when the step was created (a copy).
Curves this step adds to the well, mapped to their units.
Inputs this step needs, e.g.
("PHIE", "RDEP or RT", "RW").Methods
Return the step as
{"name", "kind", "params"}(JSON-serializable).Return a copy of this step with some parameters changed.
- Parameters:
kind (str)
name (str)
params (Mapping[str, Any])
settings (Mapping[str, Any])
runner (Callable[..., None])
requirements (Sequence[_Requirement])
description (str)
planner (Optional[Callable[..., Iterable[str]]])
produces_text (str)
factory (Optional[Callable[..., 'Step']])
label (Optional[str])
default_name (Optional[str])
- property is_custom: bool¶
True for steps made with
workflow_step().
- with_params(**changes)[source]¶
Return a copy of this step with some parameters changed.
The new values are validated as when the step was created; the name is kept.
- Parameters:
**changes (Any) – Parameters to set, e.g.
n=2.2.- Returns:
A new step; this one is unchanged.
- Return type:
Examples
>>> from petrophys.workflow import Workflow, steps >>> steps.saturation(model="archie", n=2.0).with_params(n=2.2) steps.saturation(model='archie', n=2.2)