OpenZGY/Python API and Internals (ALPHA)
Access seismic data stored in ZGY format.
Classes | Functions | Variables
openzgy.impl.file Namespace Reference

Low level I/O, abstract layer. More...

Classes

class  Config
 
class  FileADT
 
class  FileConfig
 
class  LocalFile
 
class  LocalFileLinux
 
class  LocalFileOther
 
class  SDConfig
 
class  SeismicStoreFile
 
class  SeismicStoreFileDelayedWrite
 
class  UsageHint
 

Functions

def FileFactory (filename, mode, iocontext)
 

Variables

 sd = None
 

Detailed Description

Low level I/O, abstract layer.

Low level I/O, abstract layer.

This file contains classes that do low level I/O either to on-prem data
using the regular read and write methods of the OS or to seismic store
using SDAPI. Other back ends can easily be added.

Some work is done to consolidate read requests and to buffer write
requests in the cloud back end. This is needed to get acceptable
performance. This explains why this file is quite large.


    impl.file.Config:
      impl.file.FileConfig(Config):
      impl.file.SDConfig(Config):

        * Details such as user credentials etc. established when the
          file is open. Specific to the backend type.
        * Note that there is currently no way to pass a configuration
          object along with every read and write request. This might
          have been useful for a server type application but would
          require the config parameter to ripple across at least 50
          existing methods. I doubt this would be worth the trouble.

    impl.file.FileADT:
      impl.file.LocalFile(FileADT):
        impl.file.LocalFileOther(LocalFile):
        impl.file.LocalFileLinux(LocalFile):
      impl.file.SeismicStoreFile(FileADT):
      impl.file.SeismicStoreFileDelayedWrite(FileADT):

        * Higher level code should only access the polymorphic FileADT
          base class and the impl.file.FileFactory that creates an
          instance of the desired type.

Function Documentation

◆ FileFactory()

def openzgy.impl.file.FileFactory (   filename,
  mode,
  iocontext 
)
Return a FileADT instance able to read and/or write to the named file.
In the future the function might return different types of instances
e.g. if filename refers to something on the cloud.