lasio
lasio copied to clipboard
STEP should only be recalculated if the depth index curve is modified
Prompted by #404.
Currently, by default (STEP=None
) writer.py:write
modifies the LASFile.well.STEP
header value to be the difference between the first two depth intervals in the file. This is intended so that if the user changes the data, they do see a correct STEP value e.g. #35. However, this is occurring even when the depth curve is not modified. That needs to be avoided.
I think we can handle this with a flag on the LASFile.set_data
methods and each CurveItem
and then check for those in the writer.py:write
function.
Or only recalculate if a quality-check is explicitly required. With the intention to pick up mismatch between header and data.
Should "Remove side-effects from write() #268": move STRT/STOP/STEP recalc to a new LASFile.update_start_stop_step()
be done first and would it then solve this issue also?
@dcslagel It would help, yes, because then I guess we would call LASFile.update_start_stop_step()
from LASFile.set_data
and from some code watching the index CurveItem
's data
attribute.