Need help with PetroPy?
Click the “chat” button below for chat support from the developer who created it, or find similar developers for support.

About the developer

toddheitmann
120 Stars 52 Forks MIT License 26 Commits 6 Opened issues

Description

A petrophysics python package for geoscience python computing of conventional and unconventional formation evaluation. Reads las files and creates a pandas dataframe of the log data. Includes a basic petrophysical workflow and a simple log viewer based on XML templates.

Services available

!
?

Need anything else?

Contributors list

# 270,113
Python
geophys...
geoscie...
26 commits

.. image:: https://toddheitmann.github.io/PetroPy/images/petropylogo.png

PetroPy

A python petrophysics package allowing scientific python computing of conventional and unconventional formation evaluation. Reads las files using

lasio 
__. Includes a petrophysical workflow and a log viewer based on XML templates.

.. image:: https://toddheitmann.github.io/PetroPy/images/university6-18W_no1.png

Requirements

  • cchardet 
    __
  • lasio 
    __
  • numpy 
    __
  • scipy 
    __
  • pandas 
    __
  • matplotlib 
    __
  • scikit-learn 
    __

Installation

Install PetroPy through pip via the command line

.. code-block:: bash

pip install petropy

To read in an las file, pass the file reference:

.. code-block:: python

import petropy as ptr filepath = r'path/to/well.las' log = ptr.Log(filepath)

Documentation

View the

online documentation
_ for classes and methods.

.. _online documentation: https://toddheitmann.github.io/PetroPy/

Las File Processing

To understanding using petropy in a petrophysical workflow for las file processing, see the

example page
_.

.. example page: https://toddheitmann.github.io/PetroPy/autoexamples/

Petrophysical Model Quick Look

.. code-block:: python

import petropy and print raw curves

import petropy as ptr log = ptr.log_data('WFMP') print(log.curves)

.. code-block:: bash

Mnemonic Unit Value Description


DEPT F 00 000 00 00 1 Depth Curve CALI INCH 99 075 22 05 2 CALIPER DPHI DECP 99 075 22 05 3 DENSITY POROSITY -LIME- GR GAPI 99 075 22 05 4 GAMMA RAY NPHI DECP 99 075 22 05 5 NEUTRON POROSITY -LIME- PE B/E 99 075 22 05 6 PHOTO-ELECTRIC FACTOR RHOB G/C3 99 075 22 05 7 BULK DENSITY PHIX DECP 99 075 22 05 8 CROSSPLOT POROSITY C13 INCH 99 075 22 05 9 CALIPER PADS 1 - 3 -FACT- C24 INCH 99 075 22 05 10 CALIPER PADS 2 - 4 -FACT- DT US/F 99 075 22 05 11 SONIC TRANSIT TIME SPHI DECP 99 075 22 05 12 SONIC POROSITY -LIME- GR3 99 075 22 05 13 GAMMA RAY ILD OHMM 99 075 22 05 14 IL, DEEP RESISTIVITY ILM OHMM 99 075 22 05 15 IL, MEDIUM RESISTIVITY SGRD OHMM 99 075 22 05 16 SHORT GUARD RESISTIVITY SP MV 99 075 22 05 17 SPONTANEOUS POTENTIAL CALN INCH 99 075 22 05 9 CALIPER PADS 1 - 3 -FACT- GRN GAPI 99 075 22 05 4 GAMMA RAY RESMEDN OHMM 99 075 22 05 15 IL, MEDIUM RESISTIVITY RESDEEPN OHMM 99 075 22 05 14 IL, DEEP RESISTIVITY NPHIN DECP 99 075 22 05 5 NEUTRON POROSITY -LIME- DPHIN DECP 99 075 22 05 3 DENSITY POROSITY -LIME- SPHIN DECP 99 075 22 05 12 SONIC POROSITY -LIME- PEN B/E 99 075 22 05 6 PHOTO-ELECTRIC FACTOR RHOBN G/C3 99 075 22 05 7 BULK DENSITY DTCN US/F 99 075 22 05 11 SONIC TRANSIT TIME SP_N MV 99 075 22 05 17 SPONTANEOUS POTENTIAL

.. code-block:: python

read tops into Log object and print

log.topsfromcsv() print(log.tops)

.. code-block:: bash

{'WFMPA': 6993.5, 'WFMPB': 7294.0, 'WFMPC': 7690.5, 'WFMPD': 8028.0}

.. code-block:: python

load default parameters and print values

log.fluidpropertiesparametersfromcsv() print(log.fluidpropertiesparameters.keys())

.. code-block:: bash

dict_keys(['default', 'WFMP'])

.. code-block:: python

specificy formation intervals

f = ['WFMPA', 'WFMPB', 'WFMPC']

calculate fluid properties for defined formations

log.formationfluidproperties(f, parameter = 'WFMP')

print curves for description of calculated curves

print(log.curves)

.. code-block:: bash

Mnemonic Unit Value Description


DEPT F 00 000 00 00 1 Depth Curve CALI INCH 99 075 22 05 2 CALIPER DPHI DECP 99 075 22 05 3 DENSITY POROSITY -LIME- GR GAPI 99 075 22 05 4 GAMMA RAY NPHI DECP 99 075 22 05 5 NEUTRON POROSITY -LIME- PE B/E 99 075 22 05 6 PHOTO-ELECTRIC FACTOR RHOB G/C3 99 075 22 05 7 BULK DENSITY PHIX DECP 99 075 22 05 8 CROSSPLOT POROSITY C13 INCH 99 075 22 05 9 CALIPER PADS 1 - 3 -FACT- C24 INCH 99 075 22 05 10 CALIPER PADS 2 - 4 -FACT- DT US/F 99 075 22 05 11 SONIC TRANSIT TIME SPHI DECP 99 075 22 05 12 SONIC POROSITY -LIME- GR3 99 075 22 05 13 GAMMA RAY ILD OHMM 99 075 22 05 14 IL, DEEP RESISTIVITY ILM OHMM 99 075 22 05 15 IL, MEDIUM RESISTIVITY SGRD OHMM 99 075 22 05 16 SHORT GUARD RESISTIVITY SP MV 99 075 22 05 17 SPONTANEOUS POTENTIAL CALN INCH 99 075 22 05 9 CALIPER PADS 1 - 3 -FACT- GRN GAPI 99 075 22 05 4 GAMMA RAY RESMEDN OHMM 99 075 22 05 15 IL, MEDIUM RESISTIVITY RESDEEPN OHMM 99 075 22 05 14 IL, DEEP RESISTIVITY NPHIN DECP 99 075 22 05 5 NEUTRON POROSITY -LIME- DPHIN DECP 99 075 22 05 3 DENSITY POROSITY -LIME- SPHIN DECP 99 075 22 05 12 SONIC POROSITY -LIME- PEN B/E 99 075 22 05 6 PHOTO-ELECTRIC FACTOR RHOBN G/C3 99 075 22 05 7 BULK DENSITY DTCN US/F 99 075 22 05 11 SONIC TRANSIT TIME SPN MV 99 075 22 05 17 SPONTANEOUS POTENTIAL POREPRESS psi Calculated Pore Pressure RESTEMP F Calculated Reservoir Temperature NES psi Calculated Net Effective Stress RW ohmm Calculated Resistivity Water RMF ohmm Calculated Resistivity Mud Filtrate RHOHC g/cc Calculated Density of Hydrocarbon RHOW g/cc Calculated Density of Water RHOMF g/cc Calculated Density of Mud Filtrate NPHIHC v/v Calculated Neutron Log Response of Hydrocarbon NPHIW v/v Calculated Neutron Log Response of Water NPHIMF v/v Calculated Neutron Log Response of Mud Filtrate MUHC cP Calculated Viscosity of Hydrocarbon BO Calculated Oil Formation Volume Factor BP psi Calcualted Bubble Point

.. code-block:: python

load default multimineral parameters

log.multimineralparametersfrom_csv()

print available default formation parameters

print(log.multimineral_parameters.keys())

.. code-block:: bash

dict_keys(['default', 'WFMP'])

.. code-block:: python

calculate mulitmineral model over defined formations

with parameter 'WFMP'

log.formationmultimineralmodel(f, parameter = 'WFMP') log.write('processed_log.las')

print curves for description of calculated curves

print(log.curves)

.. code-block:: bash

Mnemonic Unit Value Description


DEPT F 00 000 00 00 1 Depth Curve CALI INCH 99 075 22 05 2 CALIPER DPHI DECP 99 075 22 05 3 DENSITY POROSITY -LIME- GR GAPI 99 075 22 05 4 GAMMA RAY NPHI DECP 99 075 22 05 5 NEUTRON POROSITY -LIME- PE B/E 99 075 22 05 6 PHOTO-ELECTRIC FACTOR RHOB G/C3 99 075 22 05 7 BULK DENSITY PHIX DECP 99 075 22 05 8 CROSSPLOT POROSITY C13 INCH 99 075 22 05 9 CALIPER PADS 1 - 3 -FACT- C24 INCH 99 075 22 05 10 CALIPER PADS 2 - 4 -FACT- DT US/F 99 075 22 05 11 SONIC TRANSIT TIME SPHI DECP 99 075 22 05 12 SONIC POROSITY -LIME- GR3 99 075 22 05 13 GAMMA RAY ILD OHMM 99 075 22 05 14 IL, DEEP RESISTIVITY ILM OHMM 99 075 22 05 15 IL, MEDIUM RESISTIVITY SGRD OHMM 99 075 22 05 16 SHORT GUARD RESISTIVITY SP MV 99 075 22 05 17 SPONTANEOUS POTENTIAL CALN INCH 99 075 22 05 9 CALIPER PADS 1 - 3 -FACT- GRN GAPI 99 075 22 05 4 GAMMA RAY RESMEDN OHMM 99 075 22 05 15 IL, MEDIUM RESISTIVITY RESDEEPN OHMM 99 075 22 05 14 IL, DEEP RESISTIVITY NPHIN DECP 99 075 22 05 5 NEUTRON POROSITY -LIME- DPHIN DECP 99 075 22 05 3 DENSITY POROSITY -LIME- SPHIN DECP 99 075 22 05 12 SONIC POROSITY -LIME- PEN B/E 99 075 22 05 6 PHOTO-ELECTRIC FACTOR RHOBN G/C3 99 075 22 05 7 BULK DENSITY DTCN US/F 99 075 22 05 11 SONIC TRANSIT TIME SPN MV 99 075 22 05 17 SPONTANEOUS POTENTIAL POREPRESS psi Calculated Pore Pressure RESTEMP F Calculated Reservoir Temperature NES psi Calculated Net Effective Stress RW ohmm Calculated Resistivity Water RMF ohmm Calculated Resistivity Mud Filtrate RHOHC g/cc Calculated Density of Hydrocarbon RHOW g/cc Calculated Density of Water RHOMF g/cc Calculated Density of Mud Filtrate NPHIHC v/v Calculated Neutron Log Response of Hydrocarbon NPHIW v/v Calculated Neutron Log Response of Water NPHIMF v/v Calculated Neutron Log Response of Mud Filtrate MUHC cP Calculated Viscosity of Hydrocarbon BO Calculated Oil Formation Volume Factor BP psi Calcualted Bubble Point PHIE v/v Effective Porosity SW v/v Water Saturation SHC v/v Hydrocarbon Saturation BVH v/v Bulk Volume Hydrocarbon BVW v/v Bulk Volume Water BVWI v/v Bulk Volume Water Irreducible BVWF v/v Bulk Volume Water Free BVOM v/v Bulk Volume Fraction Organic Matter BVCLAY v/v Bulk Volume Fraction Clay BVPYR v/v Bulk Volume Fraction Pyrite VOM v/v Matrix Volume Fraction Organic Matter VCLAY v/v Matrix Volume Fraction Clay VPYR v/v Matrix Volume Fraction Pyrite RHOM g/cc Matrix Density TOC wt/wt Matrix Weight Fraction Organic Matter WTCLAY wt/wt Matrix Weight Fraction Clay WTPYR wt/wt Matrix Weight Fraction Pyrite BVQTZ v/v Bulk Volume Fraction Quartz VQTZ v/v Matrix Volume Fraction Quartz WTQTZ wt/wt Matrix Weight Fraction Quartz BVCLC v/v Bulk Volume Fraction Calcite VCLC v/v Matrix Volume Fraction Calcite WTCLC wt/wt Matrix Weight Fraction Calcite BVDOL v/v Bulk Volume Fraction Dolomite VDOL v/v Matrix Volume Fraction Dolomite WTDOL wt/wt Matrix Weight Fraction Dolomite OIP wt/wt Matrix Weight Fraction Dolomite

We use cookies. If you continue to browse the site, you agree to the use of cookies. For more information on our use of cookies please see our Privacy Policy.