
Chapter 14. Extending Scream!
Scream! is a data communication, visualisation and recording tool. It is not intended for performing detailed analysis on the data received. However, extensions are available for Scream! which can carry out calculations on seismic data. These extensions can be stand-alone programs, or scripts written in MATLAB®. Some sample extension scripts are supplied in the Scream! program distribution.
14.1 Installing new extensions
There are two files that can reference a program extension; screamglobal.ini and scream.ini. The first is located in the installation directory of Scream, and will affect all instances of Scream! that run on the computer. The second is the normal configuration file for each instance of Scream, and so can be customised on a case-by-case basis. The following steps can apply to either file, but you only need to modify one.
To install a program extension:
Place the program file in a suitable directory, preferably one named in your PATH (i.e. you can launch it by typing its name at a command prompt).
Open the scream.ini (or screamglobal.ini) file (see section 16.3 for help finding this file).
Look for a section beginning with the line
[custom]
If it does not exist, add the following lines at the end of the file:
[custom]
SelectionMenu=executable-name
executable-name should be the name of the program if it is in your PATH, and the full file-name otherwise.
If you want the displayed menu entry to be different from the file-name, use the form
[custom]
SelectionMenu=executable-name|displayed-name
e.g.
SelectionMenu=art.exe|ART 3.0 Analysis Package
If the line [custom] exists, add the name of the new extension to the list after SelectionMenu, separating names with commas, e.g.
SelectionMenu=art.exe|ART 3.0 Analysis
Package,myextension.exe|My Analysis ExtensionNote: The SelectionMenu line can become very long. It has been split at the symbol in the example above in order to make it legible but it should always be entered on a single line with no new-line characters.
To install a MATLAB® extension:
Make sure MATLAB® 5 or later is installed on your computer, together with the MATLAB® signal processing toolbox.
If you have not done so, register MATLAB® as an “automation server”. See the MATLAB® documentation for more details.
Place the script file in MATLAB®'s PATH, so that MATLAB® can see it.
Make sure Scream! is not running (stop it if necessary) and open the scream.ini (or screamglobal.ini) file in Scream!'s directory using a text editor.
Add the name of the script to the SelectionMenu as detailed above.
When an extension is launched, Scream! first saves the selected data to a file named samplesn.txt in the standard temporary directory (using the WIndows TEMP environment variable, or /tmp under Linux). A second file, scrhdr.txt, is saved at the same time, which directs the script to the location of the data. The script or program is expected to fetch the data from this file. If you have problems, make sure that Scream! has the right permissions to create these files, and that your temporary space is not full.
14.2 Running extensions
To export data to a Scream! extension:
Open a WaveView window on the stream or streams of interest, and find the data you want to analyse.
If desired, click the Pause button
to or key to pause the window.Select the desired data as described in section 6.1.4.
When you release the mouse button, a menu will pop up showing the extensions available.
Click on the name of the extension you want to run.
The standard Scream! Package (depending on installer) includes a number of useful extensions:
ART Analysis Package : Güralp Systems' suite of tools for strong motion analysis. See the separate ART documentation (MAN‑SWA‑0003) for full details of this package.
PSD in Velocity Units and PSD in Acceleration Units : These extensions produce instant power spectral density plots of the selected time series.
Relative Orientation : This extension applies the Güralp-Blacknest correlation method to determine the orientation of an instrument (usually a borehole instrument). It uses coherence techniques to estimate the angle between the horizontal components of two sensors, where one is rotated with respect to the other.
Please see /www.guralp.com/howtos/determining-sensor-orientation.shtml for more information about this technique.
Sine Calibration, Step Calibration and Broadband Noise Calibration : These extensions help you to calibrate sensors using an input sinusoidal, step or pseudo-random noise signal. These signals can be generated by Güralp Systems DM24 and CD24 digitisers, allowing you to calibrate sensors quickly and easily.