A Advanced Reports - Python Module
Tabular Report
If more than one column is required, the call mic.table is employed. This script produces a tabular
report consisting of two tables.
This script uses the Python package numpy and c-style formatting of the numerical
values.
11 import mic
12 import numpy as np
13
14 mic.table("My Tables" )
15 mic.table.addtable("My Set A" )
16 mic.table.addcolumn("X", ["1.0", "2.0", "3.0"] )
17 mic.table.addcolumn("Y", ["0.5", "1.0", "1.5"] )
18 x1 = 0.2
19 x2 = 0.5
20 x3 = 3.14159/2
21 mic.table.addtable("My Set B" )
22 mic.table.addcolumn("X", ['{:8.3f}'.format(x1),
23 '{:8.3f}'.format(x2),
24 '{:8.3f}'.format(x3)] )
25 mic.table.addcolumn("sin(X)", ['{:8.3f}'.format(np.sin(x1)),
26 '{:8.3f}'.format(np.sin(x2)),
27 '{:8.3f}'.format(np.sin(x3))] )
28 mic.table.addcolumn("cos(X)", ['{:8.3f}'.format(np.cos(x1)),
29 '{:8.3f}'.format(np.cos(x2)),
30 '{:8.3f}'.format(np.cos(x3))] )
A - 8
TriStar II Plus Operator Manual
303-42800-01 (Rev M ) — Sep 2023