Skip to main content

TotalDepth is a software collection that can process petrophysical data such as wireline logs.

Project description

https://img.shields.io/pypi/v/TotalDepth.svg https://img.shields.io/travis/paulross/TotalDepth.svg Documentation Status

Petrophysical software capable of processing wireline logs.

Features

  • Reads LIS, LAS (1.2, 2.0), RP66V1 (DLIS), Western Atlas BIT, and DAT Mud Log file formats for analysis or conversion to other formats.

  • Creates Numpy arrays of log data.

  • Plots log data as SVG viewable in any modern browser.

  • Plots can be made with a wide variety of plot formats.

  • TotalDepth can generate HTML summaries of log data.

  • TotalDepth is written in Python so it is fast to develop with.

  • Special indexing techniques are used to be able to randomly access sequential files.

Wireline Plots

Here is an example of a LAS file plotted with the Triple Combo plot format as seen in a browser which includes the API header:

Tripple Combo

An example of a High Resolution Dipmeter plotted at 1:25 scale:

High Resolution Dipmeter

Accessing Frame Data as a numpy Array

Here is an example of accessing RP66V1 (DLIS) data as a numpy array and using np.info() to describe each array:

import numpy as np

from TotalDepth.RP66V1.core import LogicalFile

# path_in is expected to be the path to a RP66V1 file.
# Try this with an example RP66V1 file at TotalDepth/example_data/RP66V1/data/206_05a-_3_DWL_DWL_WIRE_258276498.DLIS
with LogicalFile.LogicalIndex(path_in) as logical_index:
    for logical_file in logical_index.logical_files:
        if logical_file.has_log_pass:
            for frame_array in logical_file.log_pass:
                print(frame_array)
                frame_count = logical_file.populate_frame_array(frame_array)
                print(
                    f'Loaded {frame_count} frames and {len(frame_array)} channels'
                    f' from {frame_array.ident} using {frame_array.sizeof_array} bytes.'
                )
                for channel in frame_array.channels:
                    print(channel)
                    # channel.array is a numpy array
                    np.info(channel.array)
                    print()

The output will be something like:

FrameArray: ID: OBNAME: O: 2 C: 0 I: b'2000T' b''
  <FrameChannel: 'TIME' "b'1 second River Time'" units: 'b'ms'' count: 1 dimensions: (1,) frames: 1>
  <FrameChannel: 'TDEP' "b'1 second River Depth'" units: 'b'0.1 in'' count: 1 dimensions: (1,) frames: 0>
  <FrameChannel: 'TENS_SL' "b'Cable Tension'" units: 'b'lbf'' count: 1 dimensions: (1,) frames: 0>
  <FrameChannel: 'DEPT_SL' "b'Station logging depth'" units: 'b'0.1 in'' count: 1 dimensions: (1,) frames: 0>
Loaded 921 frames and 4 channels from OBNAME: O: 2 C: 0 I: b'2000T' using 14736 bytes.

<FrameChannel: 'TIME' "b'1 second River Time'" units: 'b'ms'' count: 1 dimensions: (1,) frames: 921>
class:  ndarray
shape:  (921, 1)
strides:  (4, 4)
itemsize:  4
aligned:  True
contiguous:  True
fortran:  True
data pointer: 0x102a08a00
byteorder:  little
byteswap:  False
type: float32

<FrameChannel: 'TDEP' "b'1 second River Depth'" units: 'b'0.1 in'' count: 1 dimensions: (1,) frames: 921>
class:  ndarray
shape:  (921, 1)
strides:  (4, 4)
itemsize:  4
aligned:  True
contiguous:  True
fortran:  True
data pointer: 0x102a09a00
byteorder:  little
byteswap:  False
type: float32

<FrameChannel: 'TENS_SL' "b'Cable Tension'" units: 'b'lbf'' count: 1 dimensions: (1,) frames: 921>
class:  ndarray
shape:  (921, 1)
strides:  (4, 4)
itemsize:  4
aligned:  True
contiguous:  True
fortran:  True
data pointer: 0x102a0aa00
byteorder:  little
byteswap:  False
type: float32

<FrameChannel: 'DEPT_SL' "b'Station logging depth'" units: 'b'0.1 in'' count: 1 dimensions: (1,) frames: 921>
class:  ndarray
shape:  (921, 1)
strides:  (4, 4)
itemsize:  4
aligned:  True
contiguous:  True
fortran:  True
data pointer: 0x102a0ba00
byteorder:  little
byteswap:  False
type: float32
...

Installing TotalDepth

To install TotalDepth, run this command in your terminal:

$ pip install TotalDepth

This is the preferred method to install TotalDepth, as it will always install the most recent stable release from PyPi.

If you don’t have pip installed, this Python installation guide can guide you through the process.

From sources

If you are using a virtual environment in your virtual environment directory, for example ~/pyvenvs:

$ python3 -m venv ~/pyvenvs/TotalDepth
$ source ~/pyvenvs/TotalDepth/bin/activate
(TotalDepth) $

Or if you have a Conda environment (here using Python 3.8, adjust as necessary):

$ conda create --name TotalDepth python=3.8 pip
$ source activate TotalDepth

Install the dependencies, numpy and Cython:

If you are using a virtual environment:

(TotalDepth) $ pip install numpy
(TotalDepth) $ pip install Cython

Or if you have a Conda environment:

(TotalDepth) $ conda install numpy
(TotalDepth) $ conda install Cython

The sources for TotalDepth can be downloaded from the Github repo.

You can either clone the public repository:

(TotalDepth) $ git clone git://github.com/paulross/TotalDepth.git

Or download the tarball:

(TotalDepth) $ curl  -OL https://github.com/paulross/TotalDepth/tarball/master

Once you have a copy of the source, you can install it with:

(TotalDepth) $ cd TotalDepth
(TotalDepth) $ python setup.py install

Install the test dependencies and run TotalDepth’s tests:

(TotalDepth) $ pip install pytest
(TotalDepth) $ pip install pytest-runner
(TotalDepth) $ python setup.py test

Credits

This package was created with Cookiecutter and the audreyr/cookiecutter-pypackage project template.

History

0.4.0 (2021-09-18)

  • General
    • Add SLB parameter and unit online lookup.

    • Add detection of CFBF, EBCDIC, RCD, SEG-Y, STK, PDS binary file types.

    • Python 3.6 no longer supported, although it will most likely work.

  • Specific File formats

    • BIT

      • Support Western Atlas BIT files.

      • Add BIT file conversion to LAS.

      • BIT float to bytes (ISINGL) encoding.

    • DAT

      • Add DAT file support using the common FrameArray.

    • LAS

      • Add tdlastohtml as an entry point.

      • Parser improvements.

      • LAS reader now ignores duplicate channels if requested.

      • Add LAS variants to binary_file_type.

      • LAS FrameArray writing now in TotalDepth.common.LogPass

    • LIS

      • Add LIS to LAS conversion.

      • Kill off XNAM LIS support.

      • Better handling of LIS Physical Record padding.

      • Fix for LIS indexer when the DFSR is missing.

      • Adds generation of AREA patterns in SVG.

      • Creates PNG pattern files from XML data. Provides an API to pattern files and Data URI Scheme inline implementations.

    • RP66V1

      • Prepare for RP66V1 C/C++ code. Update to Python 3.8, 3.9, 3.10.

      • Add units conversion.

0.3.1 (2020-06-15)

  • Fixes for builds on Linux and Windows.

0.3.0 (2020-01-01)

  • Adds full RP66V1 support.

  • Tested against multi GB data set.

0.2.1 (2018-04-21)

  • Minor fixes.

0.2.0 (2017-09-25)

0.1.0 (2012-03-03)

Earlier versions (unreleased):

  • OpenLis - 2010-11-11 to 2011-08-01

  • PyLis - 2009 to 2010

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

TotalDepth-0.4.0.tar.gz (76.4 MB view details)

Uploaded Source

Built Distributions

TotalDepth-0.4.0-cp39-cp39-macosx_10_9_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.9 macOS 10.9+ x86-64

TotalDepth-0.4.0-cp38-cp38-macosx_10_9_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.8 macOS 10.9+ x86-64

TotalDepth-0.4.0-cp37-cp37m-macosx_10_9_x86_64.whl (1.3 MB view details)

Uploaded CPython 3.7m macOS 10.9+ x86-64

File details

Details for the file TotalDepth-0.4.0.tar.gz.

File metadata

  • Download URL: TotalDepth-0.4.0.tar.gz
  • Upload date:
  • Size: 76.4 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.9.0

File hashes

Hashes for TotalDepth-0.4.0.tar.gz
Algorithm Hash digest
SHA256 b4a8796072d73b48908a9f5d43a17a2a2f9071abb62f175a082cd39f5dabe762
MD5 d8abdac3b0829d859c107a26d0297c1f
BLAKE2b-256 6b7e09263ae1e949d77715ae83e328a3936c398b48f02d313a5c83c15a3e2b15

See more details on using hashes here.

File details

Details for the file TotalDepth-0.4.0-cp39-cp39-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: TotalDepth-0.4.0-cp39-cp39-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.9, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.9.0

File hashes

Hashes for TotalDepth-0.4.0-cp39-cp39-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 1c27ec2e18b0d9adac7f1a7ab54d85d2bb614129c58c9e48e8f16b99fc3fe86a
MD5 d09984bb404b65516e0d56fbd7119fd7
BLAKE2b-256 b66431b61e208cd22b26004735b036c86a38ab6997487a30585a1a78c2e470f7

See more details on using hashes here.

File details

Details for the file TotalDepth-0.4.0-cp38-cp38-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: TotalDepth-0.4.0-cp38-cp38-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.8, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.9.0

File hashes

Hashes for TotalDepth-0.4.0-cp38-cp38-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 76bf998e693d34faf21c20e32eb2d7ef79fa642784540dc3357e7f882f539ed3
MD5 b117dd3d200a7108780a3fda0fe41156
BLAKE2b-256 6a5d8d2f96ffaf59c8118421324df5a7b7a381682149aba272714dec29c36c4d

See more details on using hashes here.

File details

Details for the file TotalDepth-0.4.0-cp37-cp37m-macosx_10_9_x86_64.whl.

File metadata

  • Download URL: TotalDepth-0.4.0-cp37-cp37m-macosx_10_9_x86_64.whl
  • Upload date:
  • Size: 1.3 MB
  • Tags: CPython 3.7m, macOS 10.9+ x86-64
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.1.1 pkginfo/1.5.0.1 requests/2.22.0 setuptools/50.3.2 requests-toolbelt/0.9.1 tqdm/4.41.0 CPython/3.9.0

File hashes

Hashes for TotalDepth-0.4.0-cp37-cp37m-macosx_10_9_x86_64.whl
Algorithm Hash digest
SHA256 7ec7dd093b6a66567caaa1f5672b9cc099b57a2261663bf01ef0fc8ea17a4f76
MD5 1baaf933e8f0fbfa73902d625bad4482
BLAKE2b-256 cb283f08456326e2f35bf76fe3c77719e2c6306fe11d265a34c38a93bc71be99

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page