lasio icon indicating copy to clipboard operation
lasio copied to clipboard

Provide curve names as header row in ~A line

Open kinverarity1 opened this issue 3 years ago • 0 comments

Provide an option in LASFile.write to put curve names in the ~A row.

This is related to #30 and #90 which address reading this kind of data in.

What is the desired behaviour?

For this input LAS file:

~Curve Information
 DEPT.M        :    1   DEPTH
 CALI.mm       :    2   CALIPER
 DENS.g/cc     :    3   DENSITY
 Gamm.CPS      :    4   Gamma
~Parameter Information
~Other Information
~A
    0.05      -0.0      -0.0      -0.0      
    0.10      -0.0      -0.0      -0.0     

You would be able to do las.write(..., mnemonics_header_row=True):

~Curve Information
 DEPT.M        :    1   DEPTH
 CALI.mm       :    2   CALIPER
 DENS.g/cc     :    3   DENSITY
 Gamm.CPS      :    4   Gamma
~Parameter Information
~Other Information
~A Depth      CALI      DENS      Gamm
    0.05      -0.0      -0.0      -0.0
    0.10      -0.0      -0.0      -0.0

Edge cases to be handled with regression tests

  • [ ] where mnemonics are missing from the ~C section, there should be the appropriate lasio-generated UNKNOWN mnemonic in the ~A header row only (not in the ~C section)
  • [ ] where duplicate mnemonics exist, the ~A header row should contain these as duplicates, NOT the lasio-generated GAMM[1], GAMM[2] etc with suffixes
  • [ ] where mnemonics are longer than the specified write fmt, the width of the column in the data section will need to be increased to cater for the increased length of the mnemonic
  • [ ] when the data section is wrapped, specifying mnemonics_header_row=True should revert to False, and a logger.warning call made to inform the user/application that this doesn't work.

kinverarity1 avatar Jul 25 '20 06:07 kinverarity1