Using index_unit while creating new LAS #538
Replies: 3 comments 4 replies
-
I rummaged through the test files for an answer. It looks like this code converts the depth unit from meters to depth unit in feet.
Notice the index_unit is "f" instead of "ft". So I think you could try |
Beta Was this translation helpful? Give feedback.
-
Okay, I looked through the code, code-history, and documentation. The way that index_unit has evolved so far, it doesn't yet have the functionality to set the index_unit when initializing a LAS object for building a LAS file from scratch. It does seem like functionality that should be added. If you agree, one of us can click the "Create issue from discussion" link on this page and that will create an issue to track the change-request. In the current version of Lasio (0.30), what you are doing is probably the best way to quickly enable the creation of a LAS file with feet as the initial index_unit. I'm guessing. you are changing the index_unit from "m" to "f" in the section of defaults.py that has the Section items. Others can to that for now if they have the same need. "Well": SectionItems(
[
HeaderItem("STRT", "m", np.nan, "START DEPTH"),
HeaderItem("STOP", "m", np.nan, "STOP DEPTH"),
HeaderItem("STEP", "m", np.nan, "STEP"),
...
]
) Notes for enabling setting the index_unit when initializing a LAS object for building a LAS file from scratch:
|
Beta Was this translation helpful? Give feedback.
-
Thanks @dcslagel - spot on. I never anticipated this use case. I've created #542. |
Beta Was this translation helpful? Give feedback.
-
I've been a long time user of lasio and love the functionality it adds to python for those of us who utilize las files for import into various software packages. With that said I continue to struggle with one issue that I believe must have a simple fix. How do I initialize a blank las file with "ft" as the depth index units? I have always assumed the following code would give me correct units:
las.LASFile(index_unit = 'ft')
What am I missing? I have fooled lasio into doing my bidding by changing the units in defaults to 'ft', but that is just a cheap hack. How do I do this the correct way?
Beta Was this translation helpful? Give feedback.
All reactions