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

## Automatically adapted for numpy.oldnumeric Sep 06, 2007 by alter_code1.py

 
Modules
       
logging
math
numpy

 
Classes
       
unitcell

 
class unitcell
     Methods defined here:
__init__(self, lattice_parameters, symmetry='P', verbose=0)
Unit cell class
supply a list (tuple etc) of a,b,c,alpha,beta,gamma
optionally a symmetry, one of "P","A","B","C","I","F","R"
anglehkls(self, h1, h2)
Compute the angle between reciprocal lattice vectors h1, h2
ds(self, h)
computes 1/d for this hkl = hgh
getanglehkls(self, ring1, ring2)
Cache the last pair called for
gethkls(self, dsmax)
Generate hkl list
Argument dsmax is the d* limit (eg 1/d)
Default of zero gives only the (000) reflection
 
assumes [h|k|l] < 200
makerings(self, limit, tol=0.001)
Makes a list of computed powder rings
The tolerance is the difference in d* to decide
if two peaks overlap
orient(self, ring1, g1, ring2, g2, verbose=0)
Compute an orientation matrix using cell parameters and the indexing
of two reflections
 
Orientation matrix:
A matrix such that h = A^1 g
define 3 vectors t1,t2,t3
t1 is parallel to first peak (unit vector along g1)
t2 is in the plane of both   (unit vector along g1x(g1xg2))
t3 is perpendicular to both  (unit vector along g1xg2)
tostring(self)
Write out a line containing unit cell information

 
Functions
       
A(h, k, l)
B(h, k, l)
C(h, k, l)
F(h, k, l)
I(h, k, l)
P(h, k, l)
R(h, k, l)
cellfromstring(s)
cross(a, b)
a x b has length |a||b|sin(theta)
degrees(x)
norm2(a)
Compute the unit 2 norm
radians(x)
unit(a)
Normalise vector a to unit length

 
Data
        outif = {'A': <function I at 0x2a9a212578>, 'B': <function B at 0x2a9a212488>, 'C': <function C at 0x2a9a212500>, 'F': <function F at 0x2a9a2125f0>, 'I': <function I at 0x2a9a212578>, 'P': <function P at 0x2a9a212398>, 'R': <function R at 0x2a9a212668>}