The odtcalc utility reads an ODT file on stdin that contains one or more tables, and prints to stdout an ODT file consisting of the same tables augmented by additional columns as controlled by command line arguments. This utility enables the calculation and recording of new data table columns that can be computed from existing columns.
The odtcalc launch command is:
tclsh oommf.tcl odtcalc [standard options] [var expr unit ...] \ <infile >outfilewhere
The computation of a new data value for each row of each new column of data is performed by passing the corresponding expr command line argument to Tcl's expr command. The standard collection of operators and functions are available. The value of other columns in the same row may be accessed by use of the column label as a variable name. For example, the value of the Iteration column can be used in expr by including the variable substitution $Iteration. When column labels include colons, the expr has the option of using just the portion of the column label after the last colon as the variable name. For example, the value of the Oxs_UZeeman::Bx column can be used in expr by including the variable substitution $Bx. When multiple triples specifying new data columns are provided, the values of earlier new columns may be used to compute the values of later new columns. The order of command line arguments controls the order of the new columns that are added to the right side of the data table.