Skip to main content

A library for interacting with borehole.io, a subsurface data management, delivery and visualisation platform.

Project description

boreholeio

A Python library for interacting with borehole.io, a subsurface data management, delivery and visualisation platform developed by ALT.

[!CAUTION] This package is not yet ready for general consumption. If you'd like more information or to get involved in the development, please get in touch.

Getting Started

Python developers can install the boreholeio package using pip. From the command line, run pip install boreholeio to pull the package into your current Python environment.

The package contains an API client and functionality to interact with data using standard scientific data libraries such as NumPy, SciPy and Matplotlib.

import boreholeio as bio
import matplotlib.pyplot as plt
import itertools

client_settings = bio.JsonClientSettings('~/borehole.io_client.json')
client = bio.Client(client_settings)

# Find ABI logging runs close to ALT HQ
logging_runs = client.logging_runs(
    filter={
        "tool": "ABI",
        "channel": "Amplitude-MN,TravelTime"
        "near": "49.75844052,5.894923998"
    },
    sort={
        "by": "started"
        "order": "descending"
    }
)

# Create a plot of the first 10 logs
figure = plt.figure()
subplots = figure.subplots(1, 10, sharex=True, sharey=True)
for subplot, run in zip(subplots, itertools.islice(logging_runs, 10)):
    # Plot the amplitude map
    amplitude = run.channels['Amplitude-MN'].data
    subplot.pcolormesh(
        bio.data.helpers.centers_to_edges(amplitude.axes[1].coordinates),
        bio.data.helpers.centers_to_edges(amplitude.axes[0].coordinates),
        amplitude
    )

    # Set the title of each plot to metadata from the logging run
    borehole = (run.borehole or {}).get("name")
    user = (run.device or {}).get("user")
    started = run.started.date().isoformat()
    subplot.set_title(f"{borehole}\n{user}\n{started}")

    # Set axis labels
    subplot.set_xlabel(f"{amplitude.axes[1].name} ({amplitude.axes[1].units})")
    subplot.set_ylabel(f"{amplitude.axes[0].name} ({amplitude.axes[0].units})")

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

boreholeio-0.1.0.tar.gz (16.0 kB view details)

Uploaded Source

Built Distribution

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

boreholeio-0.1.0-py3-none-any.whl (14.6 kB view details)

Uploaded Python 3

File details

Details for the file boreholeio-0.1.0.tar.gz.

File metadata

  • Download URL: boreholeio-0.1.0.tar.gz
  • Upload date:
  • Size: 16.0 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for boreholeio-0.1.0.tar.gz
Algorithm Hash digest
SHA256 5b862b2dac239a838679dc421388fb245f491e5ed462c74b38b9f981a633cc5d
MD5 4d51233d70ab998ca04ce3a9782c2b4c
BLAKE2b-256 93ec0b2e53ed6da7e0da64896947aa9434e16a39cd2d92c9c216995e5ea4cb1f

See more details on using hashes here.

File details

Details for the file boreholeio-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: boreholeio-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 14.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: python-httpx/0.28.1

File hashes

Hashes for boreholeio-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 d5d5216b331702184efcc0e9af4e2e3b4b5cd449718256332725ccde903a8a3b
MD5 7e042a23166b8ede19fc29d233a43a60
BLAKE2b-256 da59325f0a91b2b9816c107874bac2570bbc040cebeb5265ceb74f2c6491f557

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