lasio icon indicating copy to clipboard operation
lasio copied to clipboard

STEP should only be recalculated if the depth index curve is modified

Open kinverarity1 opened this issue 3 years ago • 3 comments

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.

kinverarity1 avatar Sep 18 '20 01:09 kinverarity1

Or only recalculate if a quality-check is explicitly required. With the intention to pick up mismatch between header and data.

geolr avatar Sep 18 '20 08:09 geolr

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 avatar Mar 19 '21 23:03 dcslagel

@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.

kinverarity1 avatar Mar 20 '21 05:03 kinverarity1