OpenZGY/Python Public API (ALPHA)
Access seismic data stored in ZGY format.
Public Member Functions | List of all members
openzgy.api.ZgyMeta Class Reference

Base class shared betewwn ZgyReader and ZgyWriter. More...

Inheritance diagram for openzgy.api.ZgyMeta:
openzgy.api.ZgyMetaAndTools openzgy.api.ZgyReader openzgy.api.ZgyWriter

Public Member Functions

def __init__ (self, meta)
 
def size (self)
 
def datatype (self)
 
def datarange (self)
 
def zunitdim (self)
 
def hunitdim (self)
 
def zunitname (self)
 
def hunitname (self)
 
def zunitfactor (self)
 
def hunitfactor (self)
 
def zstart (self)
 
def zinc (self)
 
def annotstart (self)
 
def annotinc (self)
 
def corners (self)
 
def indexcorners (self)
 
def annotcorners (self)
 
def bricksize (self)
 
def brickcount (self)
 
def nlods (self)
 
def meta (self)
 
def numthreads (self)
 
def numthreads (self, x)
 
def dump (self, file=None)
 
def statistics (self)
 
def histogram (self)
 

Detailed Description

Base class shared betewwn ZgyReader and ZgyWriter.

Base class shared betewwn ZgyReader and ZgyWriter.

Constructor & Destructor Documentation

◆ __init__()

def openzgy.api.ZgyMeta.__init__ (   self,
  meta 
)
Create an instance, providing the ZgyInternalMeta to use.

Member Function Documentation

◆ annotcorners()

def openzgy.api.ZgyMeta.annotcorners (   self)
Redundant with Start, Inc, Size.
Annotation coordinates of each of the 4 corners, ordered as HCorners.

◆ annotinc()

def openzgy.api.ZgyMeta.annotinc (   self)
Inline and crossline number increments between adjacent
sections of the cube.

◆ annotstart()

def openzgy.api.ZgyMeta.annotstart (   self)
First inline and crossline numbers.

◆ brickcount()

def openzgy.api.ZgyMeta.brickcount (   self)
Number of bricks (including empties) ordered by [lod][dimension].

◆ bricksize()

def openzgy.api.ZgyMeta.bricksize (   self)
Size of a brick. Should always be (64, 64, 64).

◆ corners()

def openzgy.api.ZgyMeta.corners (   self)
World XY coordinates of each of the 4 corners.
The same coordinates in ordinal numbers are
((0, 0), (Size[0]-1, 0), (0, Size[1]-1), (Size[0]-1, Size[0]-1))

◆ datarange()

def openzgy.api.ZgyMeta.datarange (   self)
For integral data this is the lowest and highest sample value
than can be represented in storage. The lowest storage value
(e.g. -128 for SignedInt8 data) will be returned as DataMinMax[0]
when read as float. Similarly the highest storage value e.g. +127
will be returned as DataMinMax[1]. When integer data is read as
the "native" integral type then no automatic scaling is applied.
Note that in this case the actual range of the samples on file might
be smaller (for int8, not all of the range -128..+127 might be used)
but it cannot be larger.

For floating point data these numbers are supposed to be the actual
value range of the samples on file. It is a good idea to enforce
this here, as the values stored by older writers cannot be trusted.
Note: Also enforced on write in impl.meta.InfoHeaderV2.calculate_write.
TODO-Worry: In some float32 datasets the bulk data might have
ridiculously large spikes wich will be included in the statistical
range but not in the codingrange. So, codingrange is actually the
one that is correct. Also, can we have a situation where stats
are not filled in while the codingrange is set? I am not sure
this is currently handled.

◆ datatype()

def openzgy.api.ZgyMeta.datatype (   self)
Sample data type.
The ZGY-Public API uses enums: "int8", "int16", "float".
In some cases these are also passed as strings.
The old Python wrapper for ZGY-Public is stringly typed.
Instead of returning a real enum it returns the name.

◆ histogram()

def openzgy.api.ZgyMeta.histogram (   self)
Return the statistics stored in the file header as a named tuple.
NOTE, I might want to change this to another type if there is a
need to implement the same method in the ZGY-Public wrapper,
as it might be trickier to define a namedtuple there.

◆ hunitdim()

def openzgy.api.ZgyMeta.hunitdim (   self)
Dimension in the horizontal direction. Should always be "length".
The original specification called for supporting "arcangle" as well,
i.e. coordinates in degrees instead of a projection. But most
application code that use ZGY will not support this.
The old Python wrapper for ZGY-Public is stringly typed.
Instead of returning a real enum it returns the name.

◆ hunitfactor()

def openzgy.api.ZgyMeta.hunitfactor (   self)
Factor to multiply stored horizontal values with to get SI units.

◆ hunitname()

def openzgy.api.ZgyMeta.hunitname (   self)
Unit in the horizontal direction. E.g. "m" or "ft".

◆ indexcorners()

def openzgy.api.ZgyMeta.indexcorners (   self)
Redundant with Size.
Ordinal coordinates of each of the 4 corners, ordered as "corners".

◆ meta()

def openzgy.api.ZgyMeta.meta (   self)
A dictionary of all the meta information, which can
later be passed as **kwargs to the ZgyWriter constructor.
and "indexcorners", "annotcorners", "brickcount", "nlods"
are all derived properties that will never be settable.
"numthreads" is a property of the implementation, not the file.

◆ nlods()

def openzgy.api.ZgyMeta.nlods (   self)
Number of level-of-detail layers, including lod 0 a.k.a. full resolution.

◆ numthreads()

def openzgy.api.ZgyMeta.numthreads (   self)
How many threads to use when reading. Currently ignored.

◆ size()

def openzgy.api.ZgyMeta.size (   self)
Number of inlines, crosslines, and samples in that order.

◆ statistics()

def openzgy.api.ZgyMeta.statistics (   self)
Return the statistics stored in the file header as a named tuple.
NOTE, I might want to change this to another type if there is a
need to implement the same method in the ZGY-Public wrapper,
as it might be trickier to define a namedtuple there.

◆ zinc()

def openzgy.api.ZgyMeta.zinc (   self)
Sample interval, given in the vertical unit.

◆ zstart()

def openzgy.api.ZgyMeta.zstart (   self)
Distance from surface/MSL to first sample, given in the vertical unit.

◆ zunitdim()

def openzgy.api.ZgyMeta.zunitdim (   self)
Dimension in the vertical direction. "time" or "length".
"time" might on file be "SeismicTWT" or "SeismicOWT".
The old Python wrapper for ZGY-Public is stringly typed.
Instead of returning a real enum it returns the name.

◆ zunitfactor()

def openzgy.api.ZgyMeta.zunitfactor (   self)
Factor to multiply stored vertical values with to get SI units.
E.g. 0.001 for ms, 1.0 for m or 0.3048 for ft.

◆ zunitname()

def openzgy.api.ZgyMeta.zunitname (   self)
Unit in the horizontal direction. E.g. "ms", "m", or "ft".
Note that Petrel might ignore this settings and instead
prompt the user to state what the unit should be.

The documentation for this class was generated from the following file: