lasio
lasio copied to clipboard
Textual curves containing hyphens (like date-times) are split on parsing
Describe the bug When a column is separated by a hyphen, the substitution that I put in lasio to deal with very old-fashioned fixed-width Fortran-style formatted columns causes hell. Example file from here: https://github.com/ariewjy/triple_combo_web_plotter/files/8575670/time_dummy_example.zip
To Reproduce
>>> las = lasio.read('''
~VERSION INFORMATION
VERS. 2.0: CWLS LOG ASCII STANDARD -VERSION 2.0
WRAP. No: SINGLE LINE PER DEPTH STEP
~WELL INFORMATION BLOCK
STRT.DD/MM/YYYY-HH:MM:SS 03/09/2021-00:00:00 : Start Time
STOP.DD/MM/YYYY-HH:MM:SS 03/09/2021-00:00:15 : Stop Time
STEP.S 5.00 : Step Time
NULL. -999.25 : Null value
~CURVE INFORMATION
TIME.DD/MM/YYYY-HH:MM:SS : 0 Date
BITDEP.ft : 1 Bit Measured Depth
BLOCKCOMP.ft : 2 Block/Topdrive Position Compensated
ROP_AVG.ft/hr : 3 Time Averaged ROP
~O
~A
03/09/2021-00:00:00 76.8 16.3 0.0
03/09/2021-00:00:05 76.7 16.3 0.0
03/09/2021-00:00:10 76.8 16.3 0.0
03/09/2021-00:00:15 76.9 16.3 0.0
''')
>>> print(las.df())
BITDEP BLOCKCOMP ROP_AVG UNKNOWN
TIME
03/09/2021 -00:00:00 76.8 16.3 0.0
03/09/2021 -00:00:05 76.7 16.3 0.0
03/09/2021 -00:00:10 76.8 16.3 0.0
03/09/2021 -00:00:15 76.9 16.3 0.0
Expected behavior Output from above should be:
BITDEP BLOCKCOMP ROP_AVG
TIME
03/09/2021-00:00:00 76.8 16.3 0.0
03/09/2021-00:00:05 76.7 16.3 0.0
03/09/2021-00:00:10 76.8 16.3 0.0
03/09/2021-00:00:15 76.9 16.3 0.0
Software versions (please complete the following information):
- lasio v0.30
Additional context See here: https://github.com/ariewjy/triple_combo_web_plotter/issues/16