Skip to content
GitLab
Projects Groups Snippets
  • /
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
  • Register
  • Sign in
  • O Open ZGY
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
    • Locked Files
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
    • Iterations
    • Requirements
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
    • Test Cases
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Packages and registries
    • Packages and registries
    • Package Registry
    • Container Registry
    • Infrastructure Registry
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Code review
    • Insights
    • Issue
    • Repository
  • Wiki
    • Wiki
  • Snippets
    • Snippets
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • Open Subsurface Data Universe SoftwareOpen Subsurface Data Universe Software
  • Platform
  • Domain Data Management Services
  • Seismic
  • Open ZGY
  • Merge requests
  • !9

Handle several corner cases

  • Review changes

  • Download
  • Email patches
  • Plain diff
Merged Paal Kvamme requested to merge kvamme62/cornercases into master Oct 25, 2020
  • Overview 0
  • Commits 4
  • Pipelines 0
  • Changes 7

Make several changes to better handle corner cases such as the whole ZGY file containing the same sample value. Make sure the histogram range gets set to a reasonable value.

The histogram range will in this case be set so that the single value is inside one of the bins. Which bin the samples end up in is unspecified. In general the OpenZGY library is free to choose any histogram range although there is an expectation that the range will approximately cover the sample values in the file. In the single-value case the choice is almost arbitrary.

For integral files there is now an explicit check on create that forbids a range with just one value i.e. min==max. If an application really wants to create a file with just one sample value it will need to supply a wider data range.

If the library encounters an old file with a bad coding range it will silently substitute (-128,+127) or (-32768,+32767) which makes the int to float conversion a no-op.

Assignee
Assign to
Reviewers
Request review from
Time tracking
Source branch: kvamme62/cornercases