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

Textual curves containing hyphens (like date-times) are split on parsing #511

Closed
kinverarity1 opened this issue May 13, 2022 · 1 comment
Labels

Comments

@kinverarity1
Copy link
Owner

kinverarity1 commented May 13, 2022

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: ariewjy/triple_combo_web_plotter#16

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant