-
Notifications
You must be signed in to change notification settings - Fork 153
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
Colons in date formats for STRT/STOP confuse parser #419
Comments
Thanks for raising this issue, we will look into it 👍🏻 |
Hi @dmendres , @kinverarity1 , It looks like this issue was fixed after lasio (0.24.1). You should be able to upgrade to the current version 0.28 and get the correct parsing of the time value into the value field. To verify, I added the above example as a test to the pull-request: #420. In the pull-request checks, it has passed on all versions of Python. Could you update your Laiso version and re-try the las file? DC |
Thanks! I've confirmed that the STRT, STOP fields containing DateTime values with embedded colons are properly parsed in version 0.28.1. However, if the header is written back to a string, the unit is incorrect. Using the attached test file:
|
Hi @dmendres, Thank you for verifying/confirming that Lasio 0.28.1 resolves the DateTime parsing correctly! For the issue of writing the Unit incorrectly, I added an addition check in the new test case #420 to verify the unit is correctly 'Datetime'. It still passes. So the issue of the unit reverting to 'M' happens later in the processing. Is LAS2Text.py calling Lasio's write() function? |
Seems likely - this code looks pretty dodgy: Lines 106 to 127 in 817fb82
I've already raised it as an issue for other reasons (#268), but haven't had time to address it. |
What would you think of creating a separate GitHub issue for this specific unit writing error and closing this issue? It is different enough from the problem this issue started that it will be clearer to track as a separate issue. Also since it is possible to fix this specific unit writing error without the whole #268 change, so a separate issue from #268 makes sense in that way too. |
Agreed, makes sense! |
Running lasio (0.24.1) on Python 3.6.8.
The LAS2 specification states that the text FOLLOWING the last colon is a delimiter.
Quoting LAS_20_Update_Jan2014.pdf:
However, LASIO parses the description starting with the first colon so the following DateTime STRT and STOP are parsed as follows:
~Well
STRT.DateTime 2012-09-16T07:44:12-05:00 : START DEPTH
STOP.DateTime 2012-09-18T08:36:10-05:00 : STOP DEPTH
…
With the following result:
(Pdb) p las.well.STRT
HeaderItem(mnemonic=STRT, unit=DateTime, value=2012-09-16T07, descr=44:12-05...)
The text was updated successfully, but these errors were encountered: