Geopsy: Set header
This section explains how to modify header information stored in a database in a very efficient way. Any information about signals can be viewed in a table. Signals can be modified one by one by cell editing (Ctrl+K). For huge number of signals this is boring and time consuming. Instead, you can create formulas and apply them with one single click. The syntax for these formulas is rather simple.
General presentation
From any active signal viewer (which is by definition a list of signals), click on menu item Edit/Set headers. A dialog box will appear. You can type any number of equations in the left editor. To assist you, for instance for a correct spelling of signal field names, you can use the combos Variables, usual operators and Functions
All formulas are separated by ; (like in C). If a line begins with //, all text is ignored until the end of the line (like C comments). The same way, all text included between /* and */ is considered as a comment. Commenting parts of an equation may be interesting to solve errors.
The general syntax is :
SignalData = value.
There are various assignment operators woking for numbers and character strings:
SignalData = value // Set SignalData to value value1 + value2 // Sum or concatenation operator SignalData += value // Set SignalData to the sum of its previous content with value value1 == value2 // Returns a bool value, true if value1 and value2 are equal value1 != value2 // Returns a bool value, true if value1 and value2 are not equal
Some assignment operators work only for numbers:
value1 - value2 // Difference operator value1 - value2 // Multiplication operator value1 / value2 // Floating point division operator value1 DIV value2 // Integer division operator. E.g. 5 DIV 2 produces 2 value1 < value2 // Returns a bool value, true if value1 is less than value2 value1 ≤ value2 // Returns a bool value, true if value1 is less than or equal to value2 value1 > value2 // Returns a bool value, true if value1 is greater than value2 value1 ≥ value2 // Returns a bool value, true if value1 is greater than or equal to value2 SignalData -= value // Set SignalData to the difference between its previous content and value SignalData *= value // Set SignalData to the product of its previous content with value SignalData /= value // Set SignalData to the ratio between its previous content and value A floating point division is performed value1 [ value2 ] // If value1 is an array, the value2 th element is returned. If value1 is not an array, value2 is ignored.
The equation list can be saved in file (*.headqu) by clicking on . This allows to load the header equation file and set the header of other signals in the same way. To do this hit the button
and search for the file in the browser window.
Examples
Modify the name of signal
Name=mid( ShortFileName,3,5 );
Set the components
tmp=mid( ShortFileName, 12, 1 ); if(tmp=="E",Component="East", if(tmp=="N", Component="North", Component="Vertical"));
Set the comments
Comments="RING01"