Skip to main content

A python package for working with MB Century downhole data.

Project description

MB Century Downhole Data Toolkit

https://www.mbcentury.com/services

This toolkit provides easy access to data that has been exported from one of MB Century's data logging applications. It is primarily used to access downhole data that has been collected using MB Century's data collection systems.

Example use

Use pip to import the package.

pip import pymbc

Example python code

Open a CSV file containing PTS data, plot it against depth and time, and convert it to Well Test Analysis format.

import pymbc as mbc
from pathlib import Path

csvfile = Path(r'tests\_20230626_PTS__A.csv')
mb = mbc.MbcLog()
mb.ReadMbCsv(csvfile)
fnotes = csvfile.parent / (csvfile.stem + '_notes' + csvfile.suffix)
mb.ReadNotes(fnotes)
mb.CreateRunLogGuess()
plotdef = [mbc.PlotDefinition('TIMEDELTA', 'DEPTH', 'slategray', '-', False),
		   mbc.PlotDefinition('TIMEDELTA', 'PTS_PRES', 'royalblue', '-', False),
		   mbc.PlotDefinition('TIMEDELTA', 'PTS_FREQ', 'limegreen', '-', False),
		   mbc.PlotDefinition('TIMEDELTA', 'PTS_TEMP', 'tomato', '--', True)]
st,figt = mbc.PlotLog(mb, plotdef, title=mb.name, depthaxis=False)

plotdef = [mbc.PlotDefinition('DEPTH', 'TIMEDELTA', 'black', '-', False),
		   mbc.PlotDefinition('DEPTH', 'PTS_FREQ', 'limegreen', '--', True),
		   mbc.PlotDefinition('DEPTH', 'PTS_PRES', 'royalblue', '-', False),
		   mbc.PlotDefinition('DEPTH', 'PTS_TEMP', 'tomato', '-', True)]
sd,figd = mbc.PlotLog(mb, plotdef, title=mb.name, depthaxis=True) 
pts = mb.PtsWellTestAnalysis()
	

CHANGELOG

Version 1.2.1 28/1/2026

  • Force units to be capital

Version 1.2.0 27/1/2026

  • Can resample data in time or depth
  • Export to CSV, LAS and LINEWISE
  • Fixes to handle some unusually formatted CSV files

Version 1.1.4 21/10/2024

  • Can work with open file streams.
  • rounded TIMEDELTA and TIMESTAMPISO to 10us
  • Changed encoding to ISO-8859-1 to avoid problems reading unicode in utf-8

Version 1.1.3 13/09/2024

  • Now works with TIMESTAMPISO when plotting vs. time.
  • Updated sample data

Version 1.1.2 29/07/2024

  • Updated sample code in README.md

Version 1.1.1 19/06/2024

  • Improved CreateRunLogGuess method to split log in to multiple runs automatically.

Version 1.1.0 12/06/2024

  • Changed the column names to be consistant with industry norms.
  • Added CreateRunLogGuess method to split log in to multiple runs automatically.

Version 1.0.0 21/05/2024

  • Released to PyPI

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

pymbc-1.2.1.tar.gz (32.0 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

pymbc-1.2.1-py3-none-any.whl (28.1 kB view details)

Uploaded Python 3

File details

Details for the file pymbc-1.2.1.tar.gz.

File metadata

  • Download URL: pymbc-1.2.1.tar.gz
  • Upload date:
  • Size: 32.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for pymbc-1.2.1.tar.gz
Algorithm Hash digest
SHA256 4aa5210751b789259eaf56ff7de22e48b00209eb5ae1ad20026947ab7104782b
MD5 764d12298df99b3a2662f08a93e78575
BLAKE2b-256 a1187060147a23011f410aee2bc92ef7d31b59ffe54b7419ffef286cd331ee41

See more details on using hashes here.

File details

Details for the file pymbc-1.2.1-py3-none-any.whl.

File metadata

  • Download URL: pymbc-1.2.1-py3-none-any.whl
  • Upload date:
  • Size: 28.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.0 CPython/3.12.3

File hashes

Hashes for pymbc-1.2.1-py3-none-any.whl
Algorithm Hash digest
SHA256 b029ddf1c6a74b7bc1e403d9587bf9fcda4d4813d138cf8eefed1600026d30a9
MD5 763a9a41a6317316dd669799d6fa3c07
BLAKE2b-256 c5680e846bb8013f8696bf555dfc031a422fe960d547a66240bf3852cc97c398

See more details on using hashes here.

Supported by

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