Pizza.py WWW Site - Pizza.py Documentation - Pizza.py Tools

clog tool

Purpose:

Read ChemCell log files and extract species data.

Description:

Read one or more ChemCell log files and combine their species statistical data into long, named vectors (versus time). The vectors can be used in Python for further processing and plotting, or they can be output to a file.

The log constructor reads one or more log files. If 2 arguments are specified, a single file is specified, and it is assumed to contain data for multiple runs, which are averaged.

The nvec, nlen, and names values give the # of vectors, their length, and names. The get() method returns one of more vectors as a Python list. The write() method outputs the numeric vectors to a file.

Usage:

c = clog("file1")                    read in one or more log files
c = clog("log1 log2.gz")             can be gzipped
c = clog("file*")                    wildcard expands to multiple files
c = clog("log.cell",0)               two args = average multiple runs 
  incomplete and duplicate thermo entries are deleted
  average assumes all runs start at time 0 
nvec = c.nvec                        # of vectors of thermo info
nlen = c.nlen                        length of each vectors
names = c.names                      list of vector names
a,b,... = c.get("A","B",...)         return one or more vectors of values
c.write("file.txt")	 	     write all vectors to a file
c.write("file.txt","A","B",...)      write listed vectors to a file 
  get and write allow abbreviated (uniquely) vector names 

Related tools:

plotview, gnu, log, matlab

Prerequisites: none