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

fixes issue 90: unwanted conversion of depth from 'ft' to 'm' #102

Closed
wants to merge 1 commit into from

Conversation

mharty3
Copy link

@mharty3 mharty3 commented Feb 10, 2019

Issue 90

When loading *.las files with the depth units in ft, the depth track was converted to m.

It looks like this is because in the well.from_lasio() method sets the curve_params['depth'] from the laiso property depth_m rather than index. It seems to me that the from_lasio() method should read in whatever units are in the .las file rather than force any unit conversion.

The lasio property index returns the first column of the las file.

@kwinkunks
Copy link
Member

Thank you for this... I'm hesitating because I think there was a reason why I wanted metres... but I can't remember what it was. Maybe just not quite ready to dive into managing units everywhere. We should bite the bullet, as you say, and maybe even start using pint or similar.

@mharty3
Copy link
Author

mharty3 commented Feb 25, 2019

Yeah, I knew you must have had a reason for choosing to default to meters. I understand it will probably be quite a project to start handling units everywhere. I haven't heard of pint before. It looks like an interesting tool. In the meantime, do you think it would be a good idea to raise a warning when the depth units are converted by default? It was a very confusing behavior for me.

@kinverarity1
Copy link
Contributor

What about a keyword argument from_lasio(..., index="existing") (other options being m or ft going to lasio's depth_m and depth_ft). Or something like that...?

@kwinkunks
Copy link
Member

Just to say I haven't forgotten about this. I'm refactoring indexing and might come at this another way.

kinverarity1 added a commit to kinverarity1/welly that referenced this pull request Jul 11, 2019
…ic#102)

The keyword argument index="existing", "m", "ft"
is now implemented in Well.from_lasio (and passed
through from Well.from_las).

If index == "existing", depth_curve is created
using las.index (per mharty3's PR).

If index == "m" (the default, as index=None),
depth_curve is created using las.depth_m.

If index == "ft", depth_curve is created using
las.depth_ft.
@mharty3
Copy link
Author

mharty3 commented Oct 10, 2019

Matt, I wonder if you have thought about this particular change any more? I like @kinverarity1's idea of the keyword argument for the units of the index. It would make the default behavior of coercing the depth units to m explicit, and allow people who want to to work in feet, or really whatever crazy units they have in their las files :)

( @ThomasMGeo FYI)

@kwinkunks
Copy link
Member

This was fixed by Kent

@kwinkunks kwinkunks closed this Jun 23, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants