Acquire Report Results
Sample file report results may be accessed using the mic.report call. This script prints a summary of the results of the t-plot and BET reports.
Copy
import mic
sa = mic.report("bet", "surface area")
c = mic.report("bet", "bet constant")
vm = mic.report("bet", "monolayer capacity")
esa = mic.report("tplot", "external surface area")
vol = mic.report("tplot", "micropore volume")
mic.summary( "BET and T-plot Results" )
mic.summary.add( "Report Results",
[ "BET surface area:",
"BET constant:",
"BET monolayer capacity:",
"T-plot external surface area:",
"T-plot micropore volume:" ],
[ '{:10.5f}'.format(sa) + ' m²/g',
'{:10.5f}'.format(c),
'{:10.5f}'.format(vm) + ' cm³/g',
'{:10.5f}'.format(esa) + ' m²/g',
'{:10.5f}'.format(vol) + ' cm³/g' ] )
The result is:
Acquiring the results from a pore-distribution report such as the BJH method is done in a similar way as in the previous script except the return values from the mic.report call are slightly different since they involve lists of data. For example:
Copy
import mic
import numpy as np
xdat, ydat, desc = mic.report( 'bjhads', 'incremental distribution' )
if not (np.isnan(xdat[0]) or np.isnan(ydat[0])): # NaN indicates BJH calculation error.
mic.graph( 'BJH Adsorption/Desorption', 'Pore Diameter (Å)', 'Incremental Volume (cm³/g)' )
mic.graph.add( desc, xdat, ydat )
The result is: