Geopsy: Waveform Scripting Language
The scripting language is based on the ECMAScript scripting language, as defined in standard ECMA-262. Basic structures, variables,... are described in this document. Other references:
- A quick reference guide
- A more comprehensive tutorial (JavaScript which is also an ECMAScript)
Geopsy provides several additional functions for processing signals details here below
Contents
- 1 Categories
- 2 Alphabetical list
- 3 save
- 4 restore
- 5 exportFile
- 6 signalCount
- 7 header
- 8 setHeader
- 9 fastFourierTransfrom
- 10 subtractValue
- 11 subtractSignal
- 12 subtractSignals
- 13 multiply
- 14 filter
- 15 agc
- 16 whiten
- 17 stddevClip
- 18 shift
- 19 overSample
- 20 taper
- 21 cut
- 22 merge
- 23 mergeStations
- 24 decimateAmplitude
- 25 decimateTime
- 26 waveletTransform
- 27 stalta
- 28 discreteFourierTransform
- 29 rotateComponents
- 30 correlations
Categories
Alphabetical list
save
Syntax
save(string tag);
Description
Saves the current signals onto the stack under tag. tag is an arbitrary string used to restore() previously saved signals. This function is systematically produced when using the waveform menu items.
Examples
filter(); save("Low pass 10 Hz"); whiten(); save("Whiten"); restore("Low pass 10 Hz"); clipStddev();
restore
Syntax
restore(string tag);
Description
Restore signals previously saved onto the stack under tag.
Examples
see save()
exportFile
signalCount
Syntax
integer signalCount();
Description
Returns the number of signals to process.
Examples
Sets the sampling frequency to 100 Hz for all signals
n=signalCount(); for(i=0;i<n;i++) { setHeader(i, "DeltaT", 0.01); }
header
Syntax
header(number index, string data, [number dataIndex,]);
Description
Returns the value of data from signal having index.
Examples
Removes the first and the last sample of all signals
n=signalCount(); for(i=0;i<n;i++) { dt=header(i, "DeltaT"); setHeader(i, "TimePick", 0, header(i, "T0")+dt); setHeader(i, "TimePick", 1, header(i, "EndTime")-dt); } cut("Pick", 0, "Pick", 1);
setHeader
Syntax
setHeader(number index, string data, [number dataIndex,] value);
Description
set data of signal having index to value. data may have an additional dataIndex for vectorial data (e.g. TimePick).
Examples
See signalCount()