Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Data section containing non-numeric chars is parsed entirely as str #439

Closed
kinverarity1 opened this issue Apr 10, 2021 · 1 comment · Fixed by #461
Closed

Data section containing non-numeric chars is parsed entirely as str #439

kinverarity1 opened this issue Apr 10, 2021 · 1 comment · Fixed by #461
Labels
bug data-section-parser A bug or enhancement relating to the data section parser las3 stuff relating to LAS 3.0

Comments

@kinverarity1
Copy link
Owner

Describe the bug
If the data section contains any non-numeric characters, all of it is parsed as str, instead of data types being per-column. This is the fundamental blocker to supporting many LAS 3 files in a useful way and has been touched on before e.g. #5 (comment)

To Reproduce
Steps to reproduce the behavior:

Expected behavior
Each curve in las.curves should have an appropriate data type. For the attached example, the curves Colour and Type should be type str and all the others should have type float, effectively.

Software versions (please complete the following information):

  • Python version: N/A
  • Python distribution N/A
  • lasio version (import lasio; print(lasio.__version__)) master
@kinverarity1 kinverarity1 added bug las3 stuff relating to LAS 3.0 data-section-parser A bug or enhancement relating to the data section parser labels Apr 10, 2021
@kinverarity1
Copy link
Owner Author

This has been resolved in master. This shows that the COLOUR and TYPE curves have been correctly interpreted as str and the remainder as float:

image

TDEP                              [7393.229222636634, 7394.201200198771]
AVGCALI                           [6.781719, 8.168356]
AZIMUTH                           [147.6105, 132.9622]
BREAKOUT_AZIMUTH_N                [nan, nan]
BREAKOUT_DIP_AZIMUTH              [nan, nan]
BREAKOUT_HEIGHT_N                 [nan, nan]
BREAKOUT_OMEGA_ANGLE_N            [nan, nan]
BREAKOUT_WIDTH_N                  [nan, nan]
CENTERED_DEPTH                    [7393.229, 7394.263]
COLOUR                            ['0.0', '#0000ff']
DIP_TRU                           [31.34024, 37.51989]
FMI_DYN_AZIMUTH                   [150.676, 134.433]
FMI_DYN_DIP_APP                   [29.1211, 34.88485]
FMI_DYN_DIPHEIGHT                 [0.3514086604118347, 0.5235607624053955]
FRACTURE_APERTURE[1]              [35.16279, 8.470589]
...
FVA                               [0.100928, 0.09125548]
FVAH                              [0.1446539, 0.1058358]
HAZI                              [290.1083, 291.5356]
HDEV                              [2.853298, 2.850765]
INDUCED_FRACTURE_AZIMUTH_N        [nan, nan]
INDUCED_FRACTURE_DIP_AZIMUTH      [nan, nan]
INDUCED_FRACTURE_HEIGHT_N         [nan, nan]
INDUCED_FRACTURE_OMEGA_ANGLE_N    [nan, nan]
INFOARRAY[1]                      [nan, 76.47171]
...
QUALITY                           [1.0, 1.0]
SHAPE                             [3.0, 3.0]
TERZAGHI_CORRECTION_FACTOR        [1.144722, 1.218981]
TYPE                              ['Conductive_Part_Resistive_Fracture', 'Conductive_Part_Resistive_Fracture']

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
bug data-section-parser A bug or enhancement relating to the data section parser las3 stuff relating to LAS 3.0
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant