Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Non-vertical initial point and interpolated points to include 'inc' and 'azi' #21

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,11 @@ All notable changes to this project will be documented in this file.
The format is based on [Keep a Changelog](http://keepachangelog.com/)
and this project adheres to [Semantic Versioning](http://semver.org/).

## [v0.7.4] - 2023-06-02
### Changed
- if first row of survey starts with MD=0 and non-zero INC or AZ, those values are used
- added 'inc' and 'azi' to returned interpolated point for points in hold and vertical sections

## [v0.6.0] - 2021-06-16
### Added
- Top view plot
Expand Down
2 changes: 1 addition & 1 deletion setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
setup(
name='well_profile',
packages=['well_profile'],
version='0.7.3',
version='0.7.4',
license='LGPL v3',
description='Well Profile Builder',
long_description=long_description,
Expand Down
4 changes: 4 additions & 0 deletions well_profile/equations.py
Original file line number Diff line number Diff line change
Expand Up @@ -266,6 +266,8 @@ def interp_hold(inner_point, md, p1, p2):
inner_point['north'] = p1['north'] + (md - p1['md']) * dn
inner_point['east'] = p1['east'] + (md - p1['md']) * de
inner_point['tvd'] = p1['tvd'] + (md - p1['md']) * dv
inner_point['inc'] = p1['inc']
inner_point['azi'] = p1['azi']
inner_point['pointType'] = 'interpolated'
inner_point['sectionType'] = 'hold'

Expand All @@ -276,6 +278,8 @@ def interp_vertical(inner_point, md, p1):
inner_point['north'] = p1['north']
inner_point['east'] = p1['east']
inner_point['tvd'] = p1['tvd'] + (md - p1['md'])
inner_point['inc'] = p1['inc']
inner_point['azi'] = p1['azi']
inner_point['pointType'] = 'interpolated'
inner_point['sectionType'] = 'vertical'

Expand Down
7 changes: 6 additions & 1 deletion well_profile/load_trajectory.py
Original file line number Diff line number Diff line change
Expand Up @@ -110,7 +110,12 @@ def load(data, **kwargs):
az[a] += change_azimuth

# CREATING TRAJECTORY POINTS
trajectory = [{'md': 0, 'inc': 0, 'azi': 0, 'dl': 0, 'tvd': 0, 'sectionType': 'vertical', 'pointType': 'survey'}]

# if the first survey point is at MD=0, use it as the initial point
if md[0] == 0:
trajectory = [{'md': 0, 'inc': inc[0], 'azi': az[0], 'dl': 0, 'tvd': 0, 'sectionType': 'vertical', 'pointType': 'survey'}]
else:
trajectory = [{'md': 0, 'inc': 0, 'azi': 0, 'dl': 0, 'tvd': 0, 'sectionType': 'vertical', 'pointType': 'survey'}]
trajectory[-1].update(initial_point)
inner_pts += 2

Expand Down