You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
Confusing overloaded behaviour with LASFile.__setitem__ which creates duplicate mnemonics with appended :1, :2 when trying to update curves.
To Reproduce
>>> import lasio.examples
>>> las = lasio.examples.open("sample.las")
>>> print(las.curves)
Mnemonic Unit Value Description
-------- ---- ----- -----------
DEPT M 1 DEPTH
DT US/M 2 SONIC TRANSIT TIME
RHOB K/M3 3 BULK DENSITY
NPHI V/V 4 NEUTRON POROSITY
SFLU OHMM 5 RXO RESISTIVITY
SFLA OHMM 6 SHALLOW RESISTIVITY
ILM OHMM 7 MEDIUM RESISTIVITY
ILD OHMM 8 DEEP RESISTIVITY
>>> las["ILD_MSM"] = 100 / las["ILD"]
>>> print(las.curves)
Mnemonic Unit Value Description
-------- ---- ----- -----------
DEPT M 1 DEPTH
DT US/M 2 SONIC TRANSIT TIME
RHOB K/M3 3 BULK DENSITY
NPHI V/V 4 NEUTRON POROSITY
SFLU OHMM 5 RXO RESISTIVITY
SFLA OHMM 6 SHALLOW RESISTIVITY
ILM OHMM 7 MEDIUM RESISTIVITY
ILD OHMM 8 DEEP RESISTIVITY
ILD_MSM
>>> # Whoops, typo, let's do that again
>>> las["ILD_MSM"] = 1000 / las["ILD"]
>>> print(las.curves)
Mnemonic Unit Value Description
-------- ---- ----- -----------
DEPT M 1 DEPTH
DT US/M 2 SONIC TRANSIT TIME
RHOB K/M3 3 BULK DENSITY
NPHI V/V 4 NEUTRON POROSITY
SFLU OHMM 5 RXO RESISTIVITY
SFLA OHMM 6 SHALLOW RESISTIVITY
ILM OHMM 7 MEDIUM RESISTIVITY
ILD OHMM 8 DEEP RESISTIVITY
ILD_MSM:1
ILD_MSM:2
Describe the bug
Confusing overloaded behaviour with
LASFile.__setitem__
which creates duplicate mnemonics with appended:1
,:2
when trying to update curves.To Reproduce
Expected behavior
This line:
Should have resulted in this:
Not this:
Software versions (please complete the following information):
import lasio; print(lasio.__version__)
)master
branchAdditional context
The addition of
:1
,:2
etc should only happen when usingLASFile.read
The text was updated successfully, but these errors were encountered: