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

One channel name is missing while extracting channels from logical_file #403

Closed AchyuthB closed 2 years ago

AchyuthB commented 2 years ago

Hi,

I am not sure if this is expected. For some LIS files, I see one channel name goes missing while extracting it from the logical file. One thing I noticed is that this happens when the index channel name is "INDEX", then the missing channel is the same "INDEX" channel.

Is this expected?

File content: image

image

Code snippet:

for logical_file in physical_file:
    print(format_spec.specs)

Thank you Achyuth

ErlendHaa commented 2 years ago

Hi there!

Most likely everything is fine. It seams you have hit upon an aspect of the LIS79 spec that is mostly abstracted away by dlisio. LIS79 specifies 2 different ways (modes) in which the index/depth channel is recorded. Which mode is being used is defined by depth_mode. Depth mode 0 is the most common, and means the index/depth channel is recorded just as any other channel. Depth mode 1 is 'memory-saving-mode' where the depth/index channel doesn't have it's own spec_block and the memory-layout of the actual channel-data is different from other channels. In this mode the units and type of the index/depth channel is defined by depth_units and depth_reprc. The mnemonic is not recorded in the file at all, but dlisio defaults it to 'INDEX'

Long story short, when depth mode 1 is used, there is one less spec block than there are actual channels, but the actual curve is still present when you call lis.curves

ErlendHaa commented 2 years ago

If you haven't already, I would recommend you to check out lis.curves_metadata, which makes it a bit easier to map between metadata and curves.

AchyuthB commented 2 years ago

Hi @ErlendHaa,

Thank you so much for the explanation. You are right. As you said, in my case, the depth_mode is 1. If I understand it correclty, which means, the actual "lis" file do not record the Index/Depth channel, and hence dlisio defaults it to 'INDEX'. So it is quite obvious why it is missing in lis.curves(), as it is not recorded by the lis.

image

Thank you again. Achyuth

ErlendHaa commented 2 years ago

If I understand it correclty, which means, the actual "lis" file do not record the Index/Depth channel, and hence dlisio defaults it to 'INDEX'. So it is quite obvious why it is missing in lis.curves(), as it is not recorded by the lis.

Not exactly, the index channel is there in lis.curves(). It's always the first channel, in both of the depth recording modes. The difference is how the channel (metadata and the channel itself) is stored in the file. The point of depth recording mode 1 is to store this information with fewer bites (size mattered in 80's), hence the metadata is represented without a designated spec_block and information such as its mnemonic isn't recorded at all. I.e. only a minimal set of information is there. dlisio (and the schlumberger tool it seems) default the mnemonic/name to INDEX.

AchyuthB commented 2 years ago

Hi @ErlendHaa, I think I get it. Thank you so much for the detailed explnation. Appreciate your patience. :)

Regards Achyuth