OrientedLattice

This is a Python binding to the C++ class Mantid::Geometry::OrientedLattice. The methods on this class follow naming conventions for parameters as defined in the International Tables for Crystallography. See also the note about orientation.

bases: mantid.geometry.UnitCell

class mantid.geometry.OrientedLattice
a((UnitCell)self) float :

Returns the length of the a direction of the unit cell in .

a1((UnitCell)self) float :

Returns the length of the a1=a direction of the unit cell. This is an alias for a().

a2((UnitCell)self) float :

Returns the length of the a2=b direction of the unit cell. This is an alias for b().

a3((UnitCell)self) float :

Returns the length of the a2=c direction of the unit cell. This is an alias for c().

alpha((UnitCell)self) float :

Returns the α angle for this unit cell in degrees.

alpha1((UnitCell)self) float :

Returns the α1=α angle of the unit cell in radians. See also alpha().

alpha2((UnitCell)self) float :

Returns the α2=β angle of the unit cell in radians. See also beta().

alpha3((UnitCell)self) float :

Returns the α3=γ angle of the unit cell in radians. See also gamma().

alphastar((UnitCell)self) float :

Returns the reciprocal α angle for this unit cell in degrees.

astar((UnitCell)self) float :

Returns the length of the reciprocal a direction for this unit cell in reciprocal .

b((UnitCell)self) float :

Returns the length of the b direction of the unit cell in .

b1((UnitCell)self) float :

Returns the length of the b1=a direction of the unit cell. This is an alias for astar().

b2((UnitCell)self) float :

Returns the length of the b2=b direction of the unit cell. This is an alias for bstar().

b3((UnitCell)self) float :

Returns the length of the b3=c direction of the unit cell. This is an alias for cstar().

beta((UnitCell)self) float :

Returns the β angle for this unit cell in degrees.

beta1((UnitCell)self) float :

Returns the β1=α angle of the unit cell in radians. See also alphastar().

beta2((UnitCell)self) float :

Returns the β2=β angle of the unit cell in radians. See also betastar().

beta3((UnitCell)self) float :

Returns the β3=γ angle of the unit cell in radians. See also gammastar().

betastar((UnitCell)self) float :

Returns the β angle for this unit cell in degrees.

bstar((UnitCell)self) float :

Returns the length of the b direction for this unit cell in reciprocal .

c((UnitCell)self) float :

Returns the length of the c direction of the unit cell in .

cosFromDir((OrientedLattice)self, (object)vec) V3D :

Direction cosine from direction vector

cstar((UnitCell)self) float :

Returns the length of the c direction for this unit cell in reciprocal .

d((UnitCell)self, (float)h, (float)k, (float)l) float :

Returns d-spacing for a given H, K, L coordinate in .

d( (UnitCell)self, (V3D)hkl) -> float :

Returns d-spacing for a given H, K, L coordinate in .

dstar((UnitCell)self, (float)h, (float)k, (float)l) float :

Returns d=1/d for a given H, K, L coordinate in 3.

errora((UnitCell)self) float :

Returns the error in the a unit cell length.

erroralpha((UnitCell)self[, (int)Unit=0]) float :

Returns the error in the α angle of the unit cell.

errorb((UnitCell)self) float :

Returns the error in the b unit cell length.

errorbeta((UnitCell)self[, (int)Unit=0]) float :

Returns the error in β angle of the unit cell.

errorc((UnitCell)self) float :

Returns the error in the c unit cell length.

errorgamma((UnitCell)self[, (int)Unit=0]) float :

Returns the error in γ angle of the unit cell.

gamma((UnitCell)self) float :

Returns the γ angle for this unit cell in degrees.

gammastar((UnitCell)self) float :

Returns the γ angle for this unit cell in degrees.

getB((UnitCell)self) numpy.ndarray :

Returns the B matrix for this unit cell. This will be in a right-handed coordinate system and using the Busing-Levy convention. This will return a numpy.ndarray with shape (3,3).

getBinv((UnitCell)self) numpy.ndarray :

Returns the inverse of the B matrix for this unit cell.This will return a numpy.ndarray with shape (3,3). See also getB().

getG((UnitCell)self) numpy.ndarray :

Returns the metric tensor for the unit cell. This will return a numpy.ndarray with shape (3,3).

getGstar((UnitCell)self) numpy.ndarray :

Returns the metric tensor for the reciprocal unit cell. This will return a numpy.ndarray with shape (3,3).

getMaxOrder((UnitCell)self) int :

Returns the number of modulation vectors. This will return an int.

getModHKL((UnitCell)self) numpy.ndarray :

Returns the ModHKL matrix for this unit cell. This will be in a right-handed coordinate system and using the Busing-Levy convention. This will return a numpy.ndarray with shape (3,3).

getModUB((OrientedLattice)self) numpy.ndarray :

Returns the ModUB matrix for this oriented lattice. This will return a numpy.ndarray with shape (3,3).

getModVec((UnitCell)self, (int)i) V3D :

Returns the ith modulation vector

getU((OrientedLattice)self) numpy.ndarray :

Returns the U rotation matrix. This will return a numpy.ndarray with shape (3,3).

getUB((OrientedLattice)self) numpy.ndarray :

Returns the UB matrix for this oriented lattice. This will return a numpy.ndarray with shape (3,3).

getuVector((OrientedLattice)self) V3D :

Returns the vector along the beam direction when Goniometer s are at 0.

getvVector((OrientedLattice)self) V3D :

Returns the vector along the horizontal plane, perpendicular to the beam direction when Goniometer s are at 0.

hklFromQ((OrientedLattice)self, (object)vec) V3D :

HKL value from Q vector

qFromHKL((OrientedLattice)self, (object)vec) V3D :

Q vector from HKL vector

recAngle((UnitCell)self, (float)h1, (float)k1, (float)l1, (float)h2, (float)k2, (float)l2[, (int)Unit=0]) float :

Returns the angle in reciprocal space between vectors given by (h1,k1,l1) and (h2,k2,l2) (in degrees or radians). The optional parameter Unit controls the units for the angles, and can have the value of Degrees or Radians. By default Unit = Degrees

recVolume((UnitCell)self) float :

Return the volume of the reciprocal unit cell (in 3)

recalculateFromGstar((UnitCell)self, (object)NewGstar) None :

Recalculate the unit cell parameters from a metric tensor. This method accepts a numpy.ndarray with shape (3,3).

set((UnitCell)self, (float)_a, (float)_b, (float)_c, (float)_alpha, (float)_beta, (float)_gamma[, (int)Unit=0]) None :

Set the parameters of the unit cell. Angles can be set in eitherdegrees or radians using the Unit parameter (0 = degrees, 1 = radians)

setError((UnitCell)self, (float)_aerr, (float)_berr, (float)_cerr, (float)_alphaerr, (float)_betaerr, (float)_gammaerr[, (int)Unit=0]) None :

Set the errors in the unit cell parameters.

setErrora((UnitCell)self, (float)_aerr) None :

Set the error in the length of the a direction of the unit cell.

setErroralpha((UnitCell)self, (float)_alphaerr[, (int)Unit=0]) None :

Set the error in the α angle of the unit cell.

setErrorb((UnitCell)self, (float)_berr) None :

Set the error in the length of the b direction of the unit cell.

setErrorbeta((UnitCell)self, (float)_betaerr[, (int)Unit=0]) None :

Set the error in the β angle of the unit cell using the Unit parameter.

setErrorc((UnitCell)self, (float)_cerr) None :

Set the error in the length of the c direction of the unit cell.

setErrorgamma((UnitCell)self, (float)_gammaerr[, (int)Unit=0]) None :

Set the error in the γ angle of the unit cell using the Unit parameter.

setMaxOrder((UnitCell)arg1, (int)arg2) None :

Set the maximum order of modulated vectors searched

setModUB((OrientedLattice)self, (object)newModUB) None :

Set the ModUB matrix. This methiod will calculate first the lattice parameters, then the B matrix, and then U. This method expects a numpy.ndarray with shape (3,3).

setModVec1((UnitCell)self, (V3D)vec) None :

Set the first modulated structure vector

setModVec2((UnitCell)self, (V3D)vec) None :

Set the second modulated structure vector

setModVec3((UnitCell)self, (V3D)vec) None :

Set the third modulated structure vector

setU((OrientedLattice)self, (object)newU[, (bool)force=True]) None :

Set the U rotation matrix. This method expects a numpy.ndarray with shape (3,3).

setUB((OrientedLattice)self, (object)newUB) None :

Set the UB matrix. This methiod will calculate first the lattice parameters, then the B matrix, and then U. This method expects a numpy.ndarray with shape (3,3).

setUFromVectors((OrientedLattice)self, (object)u, (object)v) None :

Set the U rotation matrix using two vectors to define a new coordinate system. This method with return the new U matrix as a numpy.ndarray with shape (3,3).

seta((UnitCell)self, (float)_a) None :

Set the length of the a direction of the unit cell.

setalpha((UnitCell)self, (float)_alpha[, (int)Unit=0]) None :

Set the α angle of the unit cell. The angle can be set either in degrees or radians using the Unit parameter.

setb((UnitCell)self, (float)_b) None :

Set the length of the b direction of the unit cell.

setbeta((UnitCell)self, (float)_beta[, (int)Unit=0]) None :

Set the β angle of the unit cell. The angle can be set either in degrees or radians using the Unit parameter.

setc((UnitCell)self, (float)_c) None :

Set the length of the c direction of the unit cell.

setgamma((UnitCell)self, (float)_gamma[, (int)Unit=0]) None :

Set the γ angle of the unit cell. The angle can be set either in degrees or radians using the Unit parameter.

volume((UnitCell)self) float :

Return the volume of the unit cell (in 3)