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

Module(s) for scaling peaks
 
- Read in a series of columnfile type objects
    collection of columnfiles
 
- Read in some symmetry information: 
    there are 32 crystallographic point groups
    11 contain a centre of symmetry and are also laue groups 
 
- For each peak 
    assign it a unique "key" in a list of reflections
    typically h>=k>=l of the symmetry equivalents
    Give it a scale factor (or two)
    Compute the corrected intensity and derivative w.r.t scale factors
 
- For each uniq key compute the average group intensity
    with or without median style filtering
 
- Compute the overall R(int) merging statistic and minimise that w.r.t scaling 
    variables
 
- Optimise scale factor variables

 
Modules
       
ImageD11.columnfile

 
Classes
       
__builtin__.object
data_table
scalem

 
class data_table(__builtin__.object)
    Wraps a columnfile/hklf4/brukerraw file
Gives h,k,l
  -    variables [scales per frame, scan, grain etc]
  -    derivatives [of all variables]
To constrain grain scale factors across different scans imply
we need to have grains in same datafile.
 
  Methods defined here:
__init__(self)
Initialise some variables
calc(self)
get_hkls(self)
Return the hkl indices of the peaks
set_keys(self, keys)
Store a list of uniq keys which go with each peak
These are used to group peaks into symmetry equivalents

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
class scalem(__builtin__.object)
    This class holds a series of tables (assumes everything fits in memory)
... and does some fitting
 
  Methods defined here:
__init__(self)
Holds a list of unmerged data tables
These correspond to a single scans containing N grains
add_data(self, filename, format='ImageD11')
Read a columnfile object. Allowed to have format == ImageD11|bruker|hklf4
calc(self)
Compute for each data object:
    Columns: I_corr, sigma_corr
    Foreach scaling variable: dI_corr/dvar, dsigma_corr/dvar
set_sym(self, sym)
Set the symmetry to sym
 - list of matrices (3x3)
 - list of operators (4x4)
 - string (eg m3m etc)

Data descriptors defined here:
__dict__
dictionary for instance variables (if defined)
__weakref__
list of weak references to the object (if defined)

 
Functions
       
generate_key(hkl, symmops)
To be redone in C/fortran etc 
Expect identity to be in symmops
All symmetry matrices, not including inversion