Open topic with navigation
PICScript - Creating Your Own Scripts
PICScript is a powerful programming language that enables you to manipulate
horizons or grids. A Horizon Script
can even include statistics extracted from your seismic data.
You may create a PICScript by typing the entire script into the
PICScript text window or by using automatic declarations and function buttons.
Experienced programmers can write scripts in a flat text editor then load
them to PICScript. For more information,
see and .
In either case, you will find the PICScript
Manual useful. This manual, written by the programmer who developed
PICScript, describes the syntax
and use of PICScript declarations and functions. It is a PDF file so you can print a
copy and keep it near your keyboard for reference. See Support
Documents on the WinPICS Help menu for the PICScript
Manual.
Understand the following areas of the script:
"Aliases" represent surfaces and seismic attributes in scripts.
This allows you to reuse the script with different inputs or in other
projects by simply reassigning the aliases at run time. See .
Aliases are assigned by entering a declaration into the script. Declarations
identify input surfaces and seismic data, output surfaces, and temporary
variables for use in the script functions. See
and .
Aliases may not begin with a number or be words "reserved"
by PICScript for its own use.
Scripts create an output grid or horizon by processing and
seismic functions. In a grid script,
input surfaces are grids created in the gridding module. (See .) In horizon scripts, surfaces are horizon values stored
in the horizon database. Seismic Functions allow you to extract attributes
or statistics over a window of seismic time.
A surface function may be an expression (or series of expressions) contained
in a function block or a whole surface function. (dip, azimuth, and smoothing). Whole surface functions
are stand alone and may not be used inside a function block.
A script may contain one or more functions. Each function creates a
result. The result of a function may be the final output of the script
or the result may be used in another function. For an example you can
declare a temporary surface () to store the results of a function and use it in another function.
Global variables can also be used to accumulate values for use in functions.
You will declare an output attribute (type) when you construct a PICScript. The output attribute's name
will be used as an alias in the script. The actual name of the output
grid or horizon is assigned at "run time".
A horizon script can output a time, amplitude or both to the horizon
database. Time results should be stored as time, all other horizon script
results should be output as amplitude.
A grid script can output time, amplitude, interval velocity, average
velocity, or depth. Grids of any other type should be output as amplitude.
Any line in a script that begins with two slashes is a comment line.
Use these lines to place explanations and notes into your script. A well
commented script is easier to use.
Comment lines are all ignored by the PICScript processor with one exception: script mode statements.
//GridScriptMode
//HorizonScriptMode
These comments are read by PICScript a saved file is opened to determine
whether the script is a grid script or a horizon script. If a script does
not have a script mode statement, you will have to select grid mode or horizon mode manually.
What do you want to do?
Learn about PICScript - an overview
Learn how to build PICScripts - click by click