cigvis.io.vds module#

class cigvis.io.vds.VDSReader(filename)#

Bases: object

A vds file reader that mimics the numpy array style.

Examples#

>>> d = VDSReader('test.vds')
>>> d.shape
# (601, 203, 400) # (n-inline, n-xline, n-time)
>>> k = d[20:100, 100:200, 100:300] # k is np.array
>>> k = d[20, :, :] # shape is (203, 400)
>>> k = d[20, ...] # same as k = d[20, :, :]
>>> k = d[20] # same as k = d[20, :, :]
>>> k = d[:, 20, :]
>>> print(d.min(), d.max())
# will call `Layout.getChannelDescriptor(0).getValueRangeMin()`
# and `Layout.getChannelDescriptor(0).getValueRangeMax()`
close() None#
max() float#
min() float#
read(ib, ie, xb, xe, tb, te) ndarray#

read sub volume

property shape: Tuple#
to_numpy()#

like pandas

cigvis.io.vds.create_vds_from_array(d: ndarray, vdsf: str, clim: List = None, brick_size: int = 64)#

create a vds file from a np.ndarray, check the official repository to view the original examples, path: open-vds/examples/NpzToVds/npz_to_vds.py, repository: https://community.opengroup.org/osdu/platform/domain-data-mgmt-services/seismic/open-vds

Parameters#

darray-like

input data

vdsfstr

output vdsfile

climList

[vmin, vmax], if None, will use [d.min(), d.max()]

brick_sizeint

brick size, can be one of {32, 64, 128, 256, 512, 1024, 2048}