interpret¶
petrophys.api.interpret
Also available as petrophys.interpret
- interpret(
- well,
- config=None,
- *,
- formations=None,
- lithology=None,
- output=None,
- inplace=False,
- depth_unit=None,
- context_profile=None,
- curve_aliases=None,
- **options,
Run the full petrophysical interpretation on one well or several.
The workflow standardizes vendor mnemonics and units, checks which curves and parameters are available and runs every step it can (clay volume, porosity, water saturation, permeability, net pay, …). Steps that cannot run are skipped with a recorded reason. Where a step has to assume a value (a default Rw, a 30 C/km temperature gradient, …), the trace records it and
result.warningssays so; no bit size is assumed. The"geolink"calculation profile (calculation_profile) keeps the eval package’s behaviour instead: no standardization, an 8.5 in bit size where the well records none, and of these assumptions only the default Rw is warned about.Several wells (a list of wells or files, the wells
read()returns for a folder, or a folder or file pattern) are each interpreted with the same settings, and LAS header values fill each well’s unset settings from its own header. The result is aMultiWellResult: one table across the wells fromformation_summary()andsummary(), a LAS file or plot per well fromto_las(folder)andsave_plots(folder), and each well’s result by name (results["15/9-12"]). A well whose interpretation raises is named inresults.failedand in a warning; the other wells are interpreted.- Parameters:
well (Well, str, Path or list) – Well to interpret, or a well file to read with
read(); several wells as above.config (DynamicWorkflowConfig or dict, optional) – Complete workflow settings, or a dict of settings (the same as keywords). When omitted, settings come from
optionsand theDynamicWorkflowConfigdefaults. Recognized LAS header parameters fill otherwise unspecified settings; explicit Python options take precedence.formations (path, DataFrame, mapping, or sequence, optional) – Formation tops or intervals, as for
read(). They calibrate core permeability per formation and annotateresult.plot().lithology (str, path or DataFrame, optional) – The lithology to interpret with: lithology intervals (a
top,bottom,lithologytable, as forread()), the name of the well’s lithology code curve (e.g."FACIES"), or a lithology domain ("clastic","carbonate","evaporite","auto").output (str or Path, optional) – Write the interpreted well to this LAS file; for several wells, a folder for one LAS file per well.
inplace (bool, default False) – If False, the well is copied and the caller’s well is left unchanged. If True, calculated curves are added to
wellitself.depth_unit ({"m", "ft"}, optional) – Depth unit of a CSV/TSV file given as
well. It applies only when a file is read; given with a Well it raises ValueError.context_profile (str, optional) –
"geolink","geolink_train","costa"or"danish": interpret a well of that context package exactly as its context does (petrophys.reporting.context_profiles.interpret_with_context_profile()), so the statistics ofresult.wellover a context group’s depths are that group’s context statistics.wellmust be the well’s raw LAS file from the package’s delivery; the profile fixes the settings, soconfigandoptionsare not accepted. Withcontext_profile="danish",formationsis the Danish tops workbook, which supplies the lithology of wells without a lithology log.curve_aliases (mapping, path or DataFrame, optional) – Your names for standard curves (
{"GAMMA_RAY_1": "GR"}or a CSV/Excel table), as forread(); added to any mapping the well already carries.**options – Individual
DynamicWorkflowConfigsettings, e.g.rw=0.07, rw_meas_temp="230 degF"orsw_model="indonesia". Withconfig, they override the corresponding fields of a copy ofconfig.
- Returns:
Interpreted well (
result.well), the settings actually used (result.config), and a step-by-step trace (result.print_trace(),result.to_trace_dict()). Callresult.raise_for_errors()to stop on failed steps.- Return type:
- Raises:
TypeError – If an option is not a DynamicWorkflowConfig setting, a setting is given both in a
configdict and as a keyword,wellis neither a Well nor a file path, orcontext_profileis combined with a Well,config,lithology,outputor other settings.ValueError – If a setting has an invalid value, the list of wells is empty, or
depth_unitis given with a Well.
Examples
>>> import petrophys as pp >>> result = pp.interpret(pp.read(pp.sample("30_6-5")), rw=0.07, rw_meas_temp="230 degF") >>> result.raise_for_errors().status 'interpreted' >>> result = pp.interpret("well.las", formations="tops.csv", lithology="FACIES", ... output="well_interpreted.las") >>> results = pp.interpret("logs/", formations="tops.xlsx") >>> table = results.formation_summary()