equinor / dlisio

Python library for working with the well log formats Digital Log Interchange Standard (DLIS V1) and Log Information Standard (LIS79)
https://dlisio.readthedocs.io/en/latest/
Other
121 stars 39 forks source link

Use frame.index_min & index_max or index channel.curves[0] and channel.curves[-1] #374

Closed sgallant-kdm closed 3 years ago

sgallant-kdm commented 3 years ago

Hello, I can see many DLIS have different frame.index_min & index_max values than what the Schlumberger InfoView tool reports... It appears Schlumberger always reports "Start" & "Stop" from each frame's index channel.curves[0] and channel.curves[-1] (first and last curves) INSTEAD of frame.index_min & frame.index_max. I can see very often from very many example DLIS that these 2 sets of values are often different but Schlumberger always reports from the channel.curves[]. So I'm not clear, what is the use of frame.index_min & frame.index_max?? I do often notice the (index) channel.curves[] can be the frame.index_min/max * multiplier_value_from_frame_attic_spacing_units... but that should be meant for spacing/sample-rate only, not start/stop. Or often frame.index_min == channel.curves[-1] and frame.index_max == channel.curves[0] (appears swapped) but not sure why. Am I correct to always use index channel.curves[0] and channel.curves[-1] for "Start" & "Stop" and if so then what is the use of frame.index_min & index_max?

Thanks for any help on this!

ErlendHaa commented 3 years ago

Hi!

Not sure I can give you a satisfactory answer here. First of all, dlisio does no attempt at understanding the information in DLIS files. It only reads what's in them and gives the users access to it, as is. I never used Schlumberger InfoView tool myself, but from your description it tries to be a tad more convenient and pick out some values for you. How they do that, and if that is always the correct pick, I cannot tell you. But using the actual data as source for such statistics, instead of the recorded metadata makes sense to me.

The best place to go to understand the intent of index min/max is the rp66v1 (DLIS) specification [1], which says this:

6.The INDEX-MIN Attribute specifies the minimum value of the Index Channel in all Frames of the Frame Type. If there is no Index Channel, then this is the minimum Frame Number, namely 1. 7.The INDEX-MAX Attribute specifies the maximum value of the Index Channel in all Frames of the Frame Type. If there is no Index Channel, then this is the number of Frames in the Frame Type.

Which, to me suggest that they should correspond to the first and last value of the data itself, serving as some sort of "shortcut" to get a quick idea about the index. However, it's up to the producers themselves to interpret the spec and write their files accordingly. And as you have experienced, they apparently use these property differently in some cases.

However, do note that it's not only frame.spacing that has units attached to the units. So can both frame.index_min and frame.index_max`. They can be read the same way as you read the spacing units.

[1] http://w3.energistics.org/rp66/v1/rp66v1_sec5.html#5_7_1

sgallant-kdm commented 3 years ago

Thanks very much @ErlendHaa for the detailed response! :) Understood... it doesn't appear all DLIS examples we have are following the standard but that is expected I suppose just like most other data formats, lol Just wanted to be sure I was using dlisio properly... it has been very useful to us. Thank-you