SGFVector implements sampled functions on a uniform rectilinear grid as HCL_Vectors
Constructors and destructor
| |||||||||||||||||||||
Header and data access methods
| |||||||||||||||||||||
Write method
|
Vector operations (z is the object invoking the method).
Access to components.
Array operations - ``Matlab'' methods.
SGFVector implements sampled functions on a uniform rectilinear grid as HCL_Vectors. ``SGF'' stands for Sampled Grid Function. It designates a data structure for arbitrary (< 10) dimensional regularly sampled real single and double precision hypercubical data, plus auxiliary scalar data (integer, single or double precision doubleing point, or string) describing the grid geometry and other information necessary to properly interpret the data. Many natural data types in science and engineering fit this description. Other types of data do not conform to the SGF design, for example because the data sampling is geometrically irregular. Such data and associated processing tasks are beyond the scope of SGF.
From the user point of view, SGF is in fact identical to the Stanford Exploration Project's ``classic'' (pre-1996) disk data storage format, with a few restrictions and extensions noted below.
The SGFSpace_d class implements the vector spaces in which SGFVectors live. Grid and scalar attribute specification is proper to SGFSpace_d, and the user should consult the documentation on that class for details. Every SGFVector knows what space it belongs to (as does every HCL_Vector), and in particular has access to all of the dimensional anpd auxiliary information proper to the space. The SGFVector class provides convenient access functions, described below, which return values of these parameters by keyword (the keywords are described in the SGFSpace_d documentation).
Sample data of an SGFVector may be stored in a (native) binary data file, designated by the in keyword in the SGFSpace parameter table. The storage order is as indicated by the ordering of directions in the SGFSpace: the first direction has the fastest index, followed by the second, etc. For example if the first direction represents time, the second a space coordinate, then the fastest index is time.
If no in= keyword-value pair appears in the parameter table, then no file is associated with the SGFVector, and its data will be lost when the object is deleted.
The Data() method returns a double or double pointer to the data buffer holding the current in-core record.
SGFVector has two constructors, one for ``old'' vectors based on preexisting data files, the other for ``new'' vectors for which no data file need exist. The ``old'' vector constructor reads the data from disk, whereas the ``new'' vector constructor presumes that the data is either nonexistent or out-of-date, so does not populate the data buffer on construction.
Notes:
- The vector constructors take a filename argument - optional for ``new'' vectors, mandatory for ``old'' ones. Passing this argument causes standard SEP-format files to be created: an ascii header file and a binary data file, the latter having the same name as the former except for an appended @. Data in the buffer is flushed to the binary file on destruction, if the file exists.
- A ``new'' vector created without a filename argument is not connected to a file, and its data is lost on destruction. Such vectors are suitable as non-checkpointed workspace in applications programs. Note that this is the mode of creation implicit in the action of the Member method of the SGFSpace_d class.
alphabetic index hierarchy of classes
this page has been generated automatically by doc++
(c)opyright by Malte Zöckler, Roland Wunderling
contact: doc++@zib.de