ImageD11.columnfile | index /sware/exp/fable/standalone/redhate4-a64/lib/python2.5/site-packages/ImageD11/columnfile.py

`columnfile represents an ascii file with titles begining "#"
and multiple lines of data
An equals sign "=" on a "#" line implies a parameter = value pair`

Modules
`` |  |
numpy.oldnumeric | ImageD11.parameters |  |

Classes
`` |  | columnfile newcolumnfile
class columnfile
`` | `Class to represent an ascii file containing multiple named columns`
| Methods defined here: __init__(self, filename=None, new=False) addcolumn(self, col, name) `Add a new column col to the object with name "name" Overwrites in the case that the column already exists` chkarray(self) `Ensure self.bigarray holds our attributes` copy(self) `Returns a (deep) copy of the columnfile` filter(self, mask) `mask is an nrows long array of true/false` getcolumn(self, name) `Gets data, if column exists` readfile(self, filename) `Reads in an ascii columned file` set_attributes(self) `Set object vars to point into the big array` setcolumn = addcolumn(self, col, name) writefile(self, filename) `write an ascii columned file`
class newcolumnfile(columnfile)
`` | `Just like a columnfile, but for creating new files`
| Methods defined here: __init__(self, titles) Methods inherited from columnfile: addcolumn(self, col, name) `Add a new column col to the object with name "name" Overwrites in the case that the column already exists` chkarray(self) `Ensure self.bigarray holds our attributes` copy(self) `Returns a (deep) copy of the columnfile` filter(self, mask) `mask is an nrows long array of true/false` getcolumn(self, name) `Gets data, if column exists` readfile(self, filename) `Reads in an ascii columned file` set_attributes(self) `Set object vars to point into the big array` setcolumn = addcolumn(self, col, name) `Add a new column col to the object with name "name" Overwrites in the case that the column already exists` writefile(self, filename) `write an ascii columned file`

Functions
`` |  | clean(str_lst) `trim whitespace from titles`

Data
`` |  | FLOATS = ['fc', 'sc', 'omega', 'f_raw', 's_raw', 'sigf', 'sigs', 'covsf', 'sigo', 'covso', 'covfo', 'sum_intensity', 'IMax_int', 'IMax_o', 'avg_intensity', 'Min_o', 'Max_o', 'dety', 'detz', 'gx', ...] FORMATS = {'Grain': '%.0f', 'IMax_f': '%.0f', 'IMax_int': '%.4f', 'IMax_o': '%.4f', 'IMax_s': '%.0f', 'Max_f': '%.0f', 'Max_o': '%.4f', 'Max_s': '%.0f', 'Min_f': '%.0f', 'Min_o': '%.4f', ...} INTS = ['Number_of_pixels', 'IMax_f', 'IMax_s', 'Min_f', 'Max_f', 'Min_s', 'Max_s', 'spot3d_id', 'h', 'k', 'l', 'labels', 'Grain'] f = 'Grain'