Skip to main content

A tool for converting images to SEG-Y

Project description

Documentation

img2segy

A tool for converting images to SEG-Y files.

Installation

Install gjenta from the PyPI with pip:

python -m pip install img2segy

or if you have pipx and only want to run img2segy from the command line:

pipx install img2segy

Basic usage

Given an image file, such as a my_cross_section.png containing a vertical cross-section provide information about the location of the image in a text (TOML) file called my_cross_section.toml, and run the img2segy convert command, supplying the image filename. If the TOML file has the same filename stem it will be discovered and used.

img2segy convert my_cross_section.png

The resulting SEG-Y file will be called my_cross_section.segy.

Configuration file format

The configuration file contains subsections which describe the position of the image in geographical space, the coordinate reference system in use, and control over how the image should be represented in SEG-Y:

[position]
left.x = 527501
left.y = 4840781

right.x = 527326
right.y = 4829018

depth.top = 0
depth.bottom = 4300

[coordinate-reference-system]
map-projection = "WGS-84 UTM"
zone-id = 15
horizontal-units = "m"
vertical-units = "m"

[segy]
# encoding = "ASCII"
# byte-order = ">"
trace-position.use-source-coord-fields = true
trace-position.use-group-coord-fields = true
trace-position.use-cdp-coord-fields = true
trace-number.use-trace-number-field = true
trace-number.use-crossline-number-field = true

base-trace-number = 1

Some of the fields, such as map-projection are ignored, but it’s wise to include them anyway so that the date is more self-documenting and the meaning of the numbers is clear to others and your future self.

Development

Deployment

$ pip install -e .[dev] $ bumpversion minor $ python setup.py sdist bdist_wheel $ twine upload –config-file <path>/sixty-north.pypirc dist/* $ git push origin

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

img2segy-1.1.0.tar.gz (9.2 kB view details)

Uploaded Source

Built Distribution

img2segy-1.1.0-py3-none-any.whl (9.1 kB view details)

Uploaded Python 3

File details

Details for the file img2segy-1.1.0.tar.gz.

File metadata

  • Download URL: img2segy-1.1.0.tar.gz
  • Upload date:
  • Size: 9.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.0

File hashes

Hashes for img2segy-1.1.0.tar.gz
Algorithm Hash digest
SHA256 55ef9f847d9d9d306c353301ce4f3fab2345ad5a4a4307d88a07028638154dda
MD5 e721977a491506bbaf887c1d5054d059
BLAKE2b-256 a245336537b7a41f317aed43edb5c7d7d1b54b3d2ef0c6b5db151b8897e406d0

See more details on using hashes here.

File details

Details for the file img2segy-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: img2segy-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 9.1 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.3.0 pkginfo/1.7.0 requests/2.25.1 setuptools/46.1.3 requests-toolbelt/0.9.1 tqdm/4.59.0 CPython/3.8.0

File hashes

Hashes for img2segy-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e50dddea1dd5ae36fc0185fe599a4f6d1343692a0fc94e5ef7335363daf17dc9
MD5 e59cf2ffaf631b80d7ed208085a8958c
BLAKE2b-256 263314330cac4a711962b089331a52999071799756b9ed9b56809673045e636c

See more details on using hashes here.

Supported by

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