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. NOTE: This script uses the Python package "numpy" and c-style formatting of the numerical values.
import mic
import numpy as np
mic.table("My Tables")
mic.table.addtable( "My set A" )
mic.table.addcolumn( "x", ["1.0", "2.0", "3.0"] )
mic.table.addcolumn( "y", ["0.5", "1.0", "1.5"] )
x1 = 0.2
x2 = 0.5
x3 = 3.14159/2
mic.table.addtable( "My set B" )
mic.table.addcolumn( "x", ["%8.3f" % x1,
"%8.3f" % x2,
"%8.3f" % x3 ] )
mic.table.addcolumn( "sin(x)", ["%8.3f" % np.sin(x1),
"%8.3f" % np.sin(x2),
"%8.3f" % np.sin(x3)] )
mic.table.addcolumn( "cos(x)", ["%8.3f" % np.cos(x1),
"%8.3f" % np.cos(x2),
"%8.3f" % np.cos(x3)] )
The result is:
Micromeritics Learning Center Contact Us
Copyright © 2014 - 2017. Micromeritics Instrument Corporation. All rights reserved.




