Package: petropy
.. image:: https://toddheitmann.github.io/PetroPy/_images/petropy_logo.pngPetroPy=======A python petrophysics package allowing scientific python computingof conventional and unconventional formation evaluation. Reads lasfiles using `lasio <https://github.com/kinverarity1/lasio>`__. Includesa petrophysical workflow and a log viewer based on XML templates... image:: https://toddheitmann.github.io/PetroPy/_images/university_6-18W_no1.pngRequirements-------------  `cchardet <https://github.com/PyYoshi/uchardet`__-  `lasio <https://github.com/kinverarity1/lasio>`__-  `numpy <http://www.numpy.org>`__-  `scipy <https://www.scipy.org>`__-  `pandas <http://pandas.pydata.org>`__-  `matplotlib <http://matplotlib.org>`__-  `scikit-learn <http://scikit-learn.org/stable/>`__Installation------------Install PetroPy through pip via the command line.. code-block:: bashpip install petropyTo read in an las file, pass the file reference:.. code-block:: pythonimport petropy as ptrfile_path = r'path/to/well.las'log = ptr.Log(file_path)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 fileprocessing, see the `example page`_... _example page: https://toddheitmann.github.io/PetroPy/auto_examples/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:: bashMnemonic   Unit  Value         Description--------   ----  -----         -----------DEPT       F     00 000 00 00  1  Depth CurveCALI       INCH  99 075 22 05  2  CALIPERDPHI       DECP  99 075 22 05  3  DENSITY POROSITY -LIME-GR         GAPI  99 075 22 05  4  GAMMA RAYNPHI       DECP  99 075 22 05  5  NEUTRON POROSITY -LIME-PE         B/E   99 075 22 05  6  PHOTO-ELECTRIC FACTORRHOB       G/C3  99 075 22 05  7  BULK DENSITYPHIX       DECP  99 075 22 05  8  CROSSPLOT POROSITYC13        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 TIMESPHI       DECP  99 075 22 05  12  SONIC POROSITY  -LIME-GR3              99 075 22 05  13  GAMMA RAYILD        OHMM  99 075 22 05  14  IL, DEEP RESISTIVITYILM        OHMM  99 075 22 05  15  IL, MEDIUM RESISTIVITYSGRD       OHMM  99 075 22 05  16  SHORT GUARD RESISTIVITYSP         MV    99 075 22 05  17  SPONTANEOUS POTENTIALCAL_N      INCH  99 075 22 05  9  CALIPER PADS 1 - 3    -FACT-GR_N       GAPI  99 075 22 05  4  GAMMA RAYRESMED_N   OHMM  99 075 22 05  15  IL, MEDIUM RESISTIVITYRESDEEP_N  OHMM  99 075 22 05  14  IL, DEEP RESISTIVITYNPHI_N     DECP  99 075 22 05  5  NEUTRON POROSITY -LIME-DPHI_N     DECP  99 075 22 05  3  DENSITY POROSITY -LIME-SPHI_N     DECP  99 075 22 05  12  SONIC POROSITY  -LIME-PE_N       B/E   99 075 22 05  6  PHOTO-ELECTRIC FACTORRHOB_N     G/C3  99 075 22 05  7  BULK DENSITYDTC_N      US/F  99 075 22 05  11  SONIC TRANSIT TIMESP_N       MV    99 075 22 05  17  SPONTANEOUS POTENTIAL.. code-block:: python>>> # read tops into Log object and print>>> log.tops_from_csv()>>> 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.fluid_properties_parameters_from_csv()>>> print(log.fluid_properties_parameters.keys()).. code-block:: bashdict_keys(['default', 'WFMP']).. code-block:: python>>> # specificy formation intervals>>> f = ['WFMPA', 'WFMPB', 'WFMPC']>>> # calculate fluid properties for defined formations>>> log.formation_fluid_properties(f, parameter = 'WFMP')>>> # print curves for description of calculated curves>>> print(log.curves).. code-block:: bashMnemonic    Unit  Value         Description--------    ----  -----         -----------DEPT        F     00 000 00 00  1  Depth CurveCALI        INCH  99 075 22 05  2  CALIPERDPHI        DECP  99 075 22 05  3  DENSITY POROSITY -LIME-GR          GAPI  99 075 22 05  4  GAMMA RAYNPHI        DECP  99 075 22 05  5  NEUTRON POROSITY -LIME-PE          B/E   99 075 22 05  6  PHOTO-ELECTRIC FACTORRHOB        G/C3  99 075 22 05  7  BULK DENSITYPHIX        DECP  99 075 22 05  8  CROSSPLOT POROSITYC13         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 TIMESPHI        DECP  99 075 22 05  12  SONIC POROSITY  -LIME-GR3               99 075 22 05  13  GAMMA RAYILD         OHMM  99 075 22 05  14  IL, DEEP RESISTIVITYILM         OHMM  99 075 22 05  15  IL, MEDIUM RESISTIVITYSGRD        OHMM  99 075 22 05  16  SHORT GUARD RESISTIVITYSP          MV    99 075 22 05  17  SPONTANEOUS POTENTIALCAL_N       INCH  99 075 22 05  9  CALIPER PADS 1 - 3    -FACT-GR_N        GAPI  99 075 22 05  4  GAMMA RAYRESMED_N    OHMM  99 075 22 05  15  IL, MEDIUM RESISTIVITYRESDEEP_N   OHMM  99 075 22 05  14  IL, DEEP RESISTIVITYNPHI_N      DECP  99 075 22 05  5  NEUTRON POROSITY -LIME-DPHI_N      DECP  99 075 22 05  3  DENSITY POROSITY -LIME-SPHI_N      DECP  99 075 22 05  12  SONIC POROSITY  -LIME-PE_N        B/E   99 075 22 05  6  PHOTO-ELECTRIC FACTORRHOB_N      G/C3  99 075 22 05  7  BULK DENSITYDTC_N       US/F  99 075 22 05  11  SONIC TRANSIT TIMESP_N        MV    99 075 22 05  17  SPONTANEOUS POTENTIALPORE_PRESS  psi                 Calculated Pore PressureRES_TEMP    F                   Calculated Reservoir TemperatureNES         psi                 Calculated Net Effective StressRW          ohmm                Calculated Resistivity WaterRMF         ohmm                Calculated Resistivity Mud FiltrateRHO_HC      g/cc                Calculated Density of HydrocarbonRHO_W       g/cc                Calculated Density of WaterRHO_MF      g/cc                Calculated Density of Mud FiltrateNPHI_HC     v/v                 Calculated Neutron Log Response of HydrocarbonNPHI_W      v/v                 Calculated Neutron Log Response of WaterNPHI_MF     v/v                 Calculated Neutron Log Response of Mud FiltrateMU_HC       cP                  Calculated Viscosity of HydrocarbonBO                              Calculated Oil Formation Volume FactorBP          psi                 Calcualted Bubble Point.. code-block:: python>>> # load default multimineral parameters>>> log.multimineral_parameters_from_csv()>>> # print available default formation parameters>>> print(log.multimineral_parameters.keys()).. code-block:: bashdict_keys(['default', 'WFMP']).. code-block:: python>>> # calculate mulitmineral model over defined formations>>> # with parameter 'WFMP'>>> log.formation_multimineral_model(f, parameter = 'WFMP')>>> log.write('processed_log.las')>>> # print curves for description of calculated curves>>> print(log.curves).. code-block:: bashMnemonic    Unit   Value         Description--------    ----   -----         -----------DEPT        F      00 000 00 00  1  Depth CurveCALI        INCH   99 075 22 05  2  CALIPERDPHI        DECP   99 075 22 05  3  DENSITY POROSITY -LIME-GR          GAPI   99 075 22 05  4  GAMMA RAYNPHI        DECP   99 075 22 05  5  NEUTRON POROSITY -LIME-PE          B/E    99 075 22 05  6  PHOTO-ELECTRIC FACTORRHOB        G/C3   99 075 22 05  7  BULK DENSITYPHIX        DECP   99 075 22 05  8  CROSSPLOT POROSITYC13         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 TIMESPHI        DECP   99 075 22 05  12  SONIC POROSITY  -LIME-GR3                99 075 22 05  13  GAMMA RAYILD         OHMM   99 075 22 05  14  IL, DEEP RESISTIVITYILM         OHMM   99 075 22 05  15  IL, MEDIUM RESISTIVITYSGRD        OHMM   99 075 22 05  16  SHORT GUARD RESISTIVITYSP          MV     99 075 22 05  17  SPONTANEOUS POTENTIALCAL_N       INCH   99 075 22 05  9  CALIPER PADS 1 - 3    -FACT-GR_N        GAPI   99 075 22 05  4  GAMMA RAYRESMED_N    OHMM   99 075 22 05  15  IL, MEDIUM RESISTIVITYRESDEEP_N   OHMM   99 075 22 05  14  IL, DEEP RESISTIVITYNPHI_N      DECP   99 075 22 05  5  NEUTRON POROSITY -LIME-DPHI_N      DECP   99 075 22 05  3  DENSITY POROSITY -LIME-SPHI_N      DECP   99 075 22 05  12  SONIC POROSITY  -LIME-PE_N        B/E    99 075 22 05  6  PHOTO-ELECTRIC FACTORRHOB_N      G/C3   99 075 22 05  7  BULK DENSITYDTC_N       US/F   99 075 22 05  11  SONIC TRANSIT TIMESP_N        MV     99 075 22 05  17  SPONTANEOUS POTENTIALPORE_PRESS  psi                  Calculated Pore PressureRES_TEMP    F                    Calculated Reservoir TemperatureNES         psi                  Calculated Net Effective StressRW          ohmm                 Calculated Resistivity WaterRMF         ohmm                 Calculated Resistivity Mud FiltrateRHO_HC      g/cc                 Calculated Density of HydrocarbonRHO_W       g/cc                 Calculated Density of WaterRHO_MF      g/cc                 Calculated Density of Mud FiltrateNPHI_HC     v/v                  Calculated Neutron Log Response of HydrocarbonNPHI_W      v/v                  Calculated Neutron Log Response of WaterNPHI_MF     v/v                  Calculated Neutron Log Response of Mud FiltrateMU_HC       cP                   Calculated Viscosity of HydrocarbonBO                               Calculated Oil Formation Volume FactorBP          psi                  Calcualted Bubble PointPHIE        v/v                  Effective PorositySW          v/v                  Water SaturationSHC         v/v                  Hydrocarbon SaturationBVH         v/v                  Bulk Volume HydrocarbonBVW         v/v                  Bulk Volume WaterBVWI        v/v                  Bulk Volume Water IrreducibleBVWF        v/v                  Bulk Volume Water FreeBVOM        v/v                  Bulk Volume Fraction Organic MatterBVCLAY      v/v                  Bulk Volume Fraction ClayBVPYR       v/v                  Bulk Volume Fraction PyriteVOM         v/v                  Matrix Volume Fraction Organic MatterVCLAY       v/v                  Matrix Volume Fraction ClayVPYR        v/v                  Matrix Volume Fraction PyriteRHOM        g/cc                 Matrix DensityTOC         wt/wt                Matrix Weight Fraction Organic MatterWTCLAY      wt/wt                Matrix Weight Fraction ClayWTPYR       wt/wt                Matrix Weight Fraction PyriteBVQTZ       v/v                  Bulk Volume Fraction QuartzVQTZ        v/v                  Matrix Volume Fraction QuartzWTQTZ       wt/wt                Matrix Weight Fraction QuartzBVCLC       v/v                  Bulk Volume Fraction CalciteVCLC        v/v                  Matrix Volume Fraction CalciteWTCLC       wt/wt                Matrix Weight Fraction CalciteBVDOL       v/v                  Bulk Volume Fraction DolomiteVDOL        v/v                  Matrix Volume Fraction DolomiteWTDOL       wt/wt                Matrix Weight Fraction DolomiteOIP         wt/wt                Matrix Weight Fraction Dolomite