EasyManua.ls Logo

Micromeritics ASAP 2460 - G. mic MODULE FOR PYTHON SCRIPTED USER-DEFINED REPORTS; TABLE 1: Example Python Script for User-defined Reports

Default Icon
468 pages
Print Icon
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Loading...
ASAP 2460 Operator’s Manual Appendix G
246-42800-01 - Aug 2013 G-1
G. "mic" MODULE FOR PYTHON SCRIPTED USER-DEFINED
REPORTS
The mic Python module allows you to access primary and overlay isotherm data and create graphical,
tabular, and summary reports. Graphical reports consist of a single graph with one or more curves on
one or two y-axes. Tabular reports consist of one or more tables consisting of one or more labeled col-
umns of data. Summary reports consist of summary sections, each containing a two-column table of
label and value pairs.
TABLE 1: Example Python Script for User-defined Reports
1. import mic Import the mic (required) and
numpy (optional) packages.
2. import numpy as np
3. # Isotherms as list of components
4. # Isotherms as list of components
5. iso_rel = mic.isotherm('rel')
Get the isotherm data.
6. iso_abs = mic.isotherm('abs')
7. # or as components.
8. prel, qads, num_ads, warm_fs, cold_fs, mass, desc =
mic.isotherm('rel')
9. pabs, qads, num_ads, warm_fs, cold_fs, mass, desc =
mic.isotherm('abs')
10. # Overlays work the same way but are not guaranteed to be
valid.
11. overlays = [] Get the overlay isotherm data.
12. for i in range( 8 ) :
13. ov = mic.overlay(i, 'rel')
14. overlays.append( ov if ov[0].any() else None )
15. # A graphical report with 3 curves.
16. mic.graph( 'Graphical Report 1', 'Rel. Press', 'Qads' ) Add a graphical report.
17. mic.graph.add( 'Sample isotherm', prel, qads ) Add some curves to the report.
18. mic.graph.add( 'Linear transform', prel, qads * 4.0 + 1.0 )
19. mic.graph.addyy( 'Another transform', prel, np.log( qads *
qads ) )
20. # Another graphical report, this time with 1 curve
21. mic.graph( 'Graphical Report 2' ) Add another graphical report.
22. mic.graph.add( 'Sample isotherm', pabs, qads )
23. # A tabular report with 2 tables.
24. mic.table() Add a tabular report.
25. mic.table.addtable( "Table 1" ) Add a table to the report.

Table of Contents

Related product manuals