read_core

petrophys.io.read_core

read_core(
source,
*,
columns=None,
depth_unit=None,
well=None,
sheet_name=None,
porosity_unit=None,
permeability_unit=None,
)[source]

Read a core analysis table into CoreData.

Parameters:
  • source (path or DataFrame) – CSV/TSV/Excel file or DataFrame with one row per plug.

  • columns (dict, optional) – Explicit headers for any role: depth, porosity, permeability (horizontal), kv, grain_density, sw, so, lithology.

  • depth_unit (str, optional) – "m" or "ft" of the core depths; read from a header such as Depth (ft) otherwise, else taken as the well’s unit.

  • well (Well, optional) – Converts core depths to the well’s depth unit.

  • sheet_name (optional) – Excel sheet (required when a workbook has several).

  • porosity_unit (str, optional) – Override the units of those columns ("%", "v/v", "mD", "D") when the headers do not state them.

  • permeability_unit (str, optional) – Override the units of those columns ("%", "v/v", "mD", "D") when the headers do not state them.

Returns:

Depth, porosity and saturations (v/v), horizontal permeability (mD), grain density; vertical permeability and other columns in metadata; decisions in metadata["import_report"].

Return type:

CoreData