Difference between revisions of "Geopsy: Waveform Scripting Language"
(→header) |
|||
Line 62: | Line 62: | ||
== setHeader == | == 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|signalCount()]] | ||
+ | |||
== fastFourierTransfrom == | == fastFourierTransfrom == | ||
== subtractValue == | == subtractValue == |
Revision as of 02:48, 22 October 2009
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, 0.01); }
header
Syntax
;
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, 0.01); }
QString("setHeader(%1, \"%2\", %3, %4);\n")
.arg( signalIndex ) .arg( SignalData::dataIndex2Name( dataIndex ) ) .arg( dataIndex._index ) .arg( value.toString() )
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()