Skip to content

Dynamic histogram, GIL, and more.

Paal Kvamme requested to merge kvamme62/dynamic-histo into master

Commit changes from the internal SLB repository.

Python GIL unlock

Merged from PR 477598

Opt-in feature where the Python GIL is released during long running I/O. This allows for multi-threaded Python scripts. The new feature is not default because the documentation is a bit vague about what the code can do when the GIL is not held. The feature is also not useful if the Python script configures OpenZGY to do multi-threading itself.

Dynamically extendable histogram

Merged from PR 483423

Implement a histogram that can collect information in a single pass. Without prior knowledge of the value range of the input samples.

The code will eventually be used inside OpenZGY. It is being exposed in the API as a convenience for applications that want to make a histogram but aren't about to write a ZGY file.

The histogram range will rarely be perfect. It might not make use of the entire range because of the heuristics used. There are also rare cases, e.g. a sample value range of 100,000 to 100,010, where the histogram will be useless. Most cases should give a reasonable result.

The histogram will be zero-centric, meaning that the sample value 0 will be at the center of a bin. Note that if the histogram is built with integral sample values that will later be scaled to float, then the application is responsible for keeping the result zero-centric.

Testing and bugfixing

Merged from PR 483669 Fix an obscure bug with constant value bricks where the value was "1".

Add unit tests for this corner case, and also several regression tests that I want to be in place before starting to push some significant changes.

Statistical range

Merged from PR 483652

If spikes are written to a ZGY file and later overwritten, the statistical min/max range will still include the spikes.

The PR removes code that tries to mitigate the problem by looking at the histogram. See comments in the source code for why.

Arguably the feature isn't that useful anyway. The feature might be put back later, but handled at a higher level outside the ExpandableBuilder.

Merge request reports