geomaster 0.0.1__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
geomaster/__init__.py ADDED
@@ -0,0 +1,6 @@
1
+ """GeoMaster: Python tools for geosteering and well data."""
2
+
3
+ from .survey import minimum_curvature
4
+
5
+ __all__ = ["minimum_curvature"]
6
+ __version__ = "0.0.1"
geomaster/survey.py ADDED
@@ -0,0 +1,53 @@
1
+ """Directional survey calculations."""
2
+
3
+ from math import acos, cos, radians, sin, tan
4
+ from typing import Dict, List, Sequence
5
+
6
+
7
+ def minimum_curvature(
8
+ md: Sequence[float],
9
+ inc: Sequence[float],
10
+ azi: Sequence[float],
11
+ tvd0: float = 0.0,
12
+ north0: float = 0.0,
13
+ east0: float = 0.0,
14
+ dls_course: float = 30.0,
15
+ ) -> Dict[str, List[float]]:
16
+ """Compute well positions from a survey with the minimum curvature method.
17
+
18
+ Args:
19
+ md: measured depths, increasing.
20
+ inc: inclinations in degrees.
21
+ azi: azimuths in degrees.
22
+ tvd0, north0, east0: position of the first station.
23
+ dls_course: course length for dogleg severity (30 for deg/30 m, 100 for deg/100 ft).
24
+
25
+ Returns:
26
+ A dict with lists "md", "tvd", "north", "east" and "dls" (one value per station,
27
+ same depth unit as md).
28
+ """
29
+ n = len(md)
30
+ if not (len(inc) == len(azi) == n):
31
+ raise ValueError("md, inc and azi must have the same length")
32
+ if n == 0:
33
+ return {"md": [], "tvd": [], "north": [], "east": [], "dls": []}
34
+
35
+ tvd, north, east, dls = [tvd0], [north0], [east0], [0.0]
36
+ for k in range(1, n):
37
+ d_md = md[k] - md[k - 1]
38
+ if d_md < 0:
39
+ raise ValueError("md must be increasing")
40
+ i1, i2 = radians(inc[k - 1]), radians(inc[k])
41
+ a1, a2 = radians(azi[k - 1]), radians(azi[k])
42
+
43
+ c = cos(i2 - i1) - sin(i1) * sin(i2) * (1.0 - cos(a2 - a1))
44
+ beta = acos(max(-1.0, min(1.0, c)))
45
+ rf = 1.0 if beta < 1e-9 else 2.0 / beta * tan(beta / 2.0)
46
+ half = d_md / 2.0 * rf
47
+
48
+ north.append(north[-1] + half * (sin(i1) * cos(a1) + sin(i2) * cos(a2)))
49
+ east.append(east[-1] + half * (sin(i1) * sin(a1) + sin(i2) * sin(a2)))
50
+ tvd.append(tvd[-1] + half * (cos(i1) + cos(i2)))
51
+ dls.append(0.0 if d_md == 0 else beta * 180.0 / 3.141592653589793 * dls_course / d_md)
52
+
53
+ return {"md": list(md), "tvd": tvd, "north": north, "east": east, "dls": dls}
@@ -0,0 +1,58 @@
1
+ Metadata-Version: 2.4
2
+ Name: geomaster
3
+ Version: 0.0.1
4
+ Summary: Python tools for geosteering and well data from GeoMaster: survey calculations, with LAS and more to come.
5
+ Author: Greenstone Energy
6
+ License: MIT
7
+ Project-URL: Homepage, https://geomaster.uk
8
+ Keywords: geosteering,well,survey,minimum curvature,tvd,las,petroleum,drilling,geology
9
+ Classifier: Development Status :: 2 - Pre-Alpha
10
+ Classifier: Intended Audience :: Science/Research
11
+ Classifier: License :: OSI Approved :: MIT License
12
+ Classifier: Programming Language :: Python :: 3
13
+ Classifier: Topic :: Scientific/Engineering
14
+ Requires-Python: >=3.9
15
+ Description-Content-Type: text/markdown
16
+ License-File: LICENSE
17
+ Dynamic: license-file
18
+
19
+ # geomaster
20
+
21
+ Python tools for geosteering and well data, from the team behind [GeoMaster](https://geomaster.uk), the geosteering software.
22
+
23
+ GeoMaster® is registered in the United Kingdom (UK00004424070).
24
+
25
+ This is an early release. It currently contains directional survey calculations. Reading and writing LAS files and more well data formats are planned.
26
+
27
+ ## Install
28
+
29
+ ```bash
30
+ pip install geomaster
31
+ ```
32
+
33
+ ## Calculate TVD from a directional survey (minimum curvature)
34
+
35
+ ```python
36
+ from geomaster import minimum_curvature
37
+
38
+ result = minimum_curvature(
39
+ md=[0, 500, 1000, 1500],
40
+ inc=[0, 10, 30, 60],
41
+ azi=[0, 45, 45, 50],
42
+ )
43
+
44
+ print(result["tvd"]) # true vertical depth at each station
45
+ print(result["north"]) # northing offset
46
+ print(result["east"]) # easting offset
47
+ print(result["dls"]) # dogleg severity, deg/30 by default (use dls_course=100 for deg/100 ft)
48
+ ```
49
+
50
+ No dependencies, pure Python 3.9+.
51
+
52
+ ## Work on the well in GeoMaster
53
+
54
+ To correlate logs, geosteer a horizontal well and share interpretations with your team, use [GeoMaster](https://geomaster.uk).
55
+
56
+ ## License
57
+
58
+ MIT
@@ -0,0 +1,7 @@
1
+ geomaster/__init__.py,sha256=kfNwmiIYvhpGims2QjX2npx5O-VpxIqtmNsOFitsqRk,155
2
+ geomaster/survey.py,sha256=qVG5SYYZ5ZyA_dWebezZIWdMSzyJGkfW810jfyvYKf8,1982
3
+ geomaster-0.0.1.dist-info/licenses/LICENSE,sha256=iL20CD14QnV_Mgr7QG33fbFgDChfNzH0Ifj1eYoUHV4,1074
4
+ geomaster-0.0.1.dist-info/METADATA,sha256=cbYvQ7-ekd-XySI37X_nnWwtsqu39rAlas_DviH1fpE,1779
5
+ geomaster-0.0.1.dist-info/WHEEL,sha256=aeYiig01lYGDzBgS8HxWXOg3uV61G9ijOsup-k9o1sk,91
6
+ geomaster-0.0.1.dist-info/top_level.txt,sha256=m5blJu-dbCuhNfdYqzhP36SmenGfvSk-I5_5BDFTZtE,10
7
+ geomaster-0.0.1.dist-info/RECORD,,
@@ -0,0 +1,5 @@
1
+ Wheel-Version: 1.0
2
+ Generator: setuptools (82.0.1)
3
+ Root-Is-Purelib: true
4
+ Tag: py3-none-any
5
+
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2026 Greenstone Energy
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
@@ -0,0 +1 @@
1
+ geomaster