Package diffpy :: Package srrietveld :: Module phase :: Class Phase
[frames] | no frames]

Class Phase

source code

                       object --+            
                                |            
refinementdata.hdf5.object.Object --+        
                                    |        
   refinementdata.refinable.Refinable --+    
                                        |    
       refinementdata.structure.Structure --+
                                            |
                                           Phase

A Phase object saves the structure to be refined. It contains the 
a list of variables to represent a structure. such as a, b, c, alpha, beta, 
gamma and so on. 

data member:
    spacegroup: space group of the structure
    a,b,c:  the lattice constant
    alpha,beta,gamma: the lattice angle

This class is also an interface for the Structure class in 
diffpy.refinementdata.structure package, to provide convenient access functions
to the structure data 

Instance Methods
 
__init__(self, owner, name=None, handle=None, shape=None)
Constructor.
source code
 
getAlpha(self)
Get the alpha value in degree
source code
 
getAlphaSigma(self)
Get the alpha value in degree
source code
 
getAtomByName(self, name)
Get the atom by its name
source code
 
getBeta(self)
Get the beta value in degree
source code
 
getBetaSigma(self)
Get the standard deviation beta value in degree
source code
 
getEngineType(self)
Get the engine type for this refinement
source code
 
getGamma(self)
Get the gamma value in degree
source code
 
getGammaSigma(self)
Get the standard deviation gamma value in degree
source code
 
getLatticeA(self)
Get the lattice parameter a in angstroms
source code
 
getLatticeASigma(self)
Get the standard deviation of lattice parameter a in angstroms
source code
 
getLatticeB(self)
Get the lattice parameter b in anstrom
source code
 
getLatticeBSigma(self)
Get the standard deviation of lattice parameter b in anstrom
source code
 
getLatticeC(self)
Get the lattice parameter c in anstrom
source code
 
getLatticeCSigma(self)
Get the standard deviation of lattice parameter c in anstrom
source code
 
getName(self)
Get the phase name
source code
 
getNumOfAtoms(self)
Get number of atoms in the phase
source code
 
getSpaceGroup(self)
Get the space group of the phase
source code
 
listAtomNames(self)
List the atom names
source code
 
listAtoms(self)
List the atoms
source code

Inherited from refinementdata.structure.Structure: readSource, writeSource

Inherited from refinementdata.refinable.Refinable: addHistory, addHistoryByPath, addSigma, addSigmaByPath, findRefinement, getHistory, getHistoryByPath, getSigma, getSigmaByPath, listHistories, listRefined, loadLocalObjects, removeHistory, update

Inherited from refinementdata.hdf5.object.Object: addObject, copy, copyMeta, delete, exportFile, get, getAttr, getByPath, getFlatIndex, getMetaData, getMultiDimIndex, getObject, getPyObj, hasAttr, hasMeta, importFile, isDescendant, list, listAttrs, listNames, listObjects, load, loadLocalData, loadObject, move, range, readStr, removeObject, rename, repeat, replicate, reshape, save, set, setAttr, setByPath, setLabels, setPyObj, unset, unsetAttr, writeStr

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Properties

Inherited from refinementdata.hdf5.object.Object: labels, name, ndim, path

Inherited from object: __class__

Method Details

__init__(self, owner, name=None, handle=None, shape=None)
(Constructor)

source code 

Constructor. The construction of a Phase object is taken care of by the
Project. Users do not have to call this function directly. 

@type owner:    a data object
@param owner:    the owner, which is usually a Refinement object.
@type name:    string
@param name:    the node name.
@type handle:    a HDF5Handle object
@param handle:    a HDF5Handle pointing to the underlying HDF5 node. 
@type shape:    tuple
@param shape:    the shape of the data object. Each element denotes 
                the number of elements in each dimension

A name is passed to the initialization method when creating a node.

A handle is passed to the inialization method in two cases:
    1.  when loading from a HDF5 file;
    2.  when creating a HDF5 file but the object is a hard link to 
        a preexisiting one.
        
In the case when both name and handle are given, name will be simply ignored.
In the case when neither name nor handle is given, an exception will be raised.

Overrides: object.__init__

getAlpha(self)

source code 

Get the alpha value in degree

Returns:
if index is None, return the alpha value list in a Dataset if index is a number or tuple, return the a value as a float

getAlphaSigma(self)

source code 

Get the alpha value in degree

Returns:
if index is None, return the alpha value list in a Dataset if index is a number or tuple, return the a value as a float

getAtomByName(self, name)

source code 

Get the atom by its name

Parameters:
  • name (string) - the atom name
Returns:
the atom object with the name if exists. None if no such phase object. The program will emit a warning if duplicate atom names exist, and the first atom obj with the same name will be returned

getBeta(self)

source code 

Get the beta value in degree

Returns:
if index is None, return the beta value list in a Dataset if index is a number or tuple, return the a value as a float

getBetaSigma(self)

source code 

Get the standard deviation beta value in degree

Returns:
the beta standard deviations

getEngineType(self)

source code 

Get the engine type for this refinement

Returns:
the string of the engine type, for example "gsas" or "fullprof"

getGamma(self)

source code 

Get the gamma value in degree

Returns:
return the gamma values

getGammaSigma(self)

source code 

Get the standard deviation gamma value in degree

Returns:
return the gamma standard deviations

getLatticeA(self)

source code 

Get the lattice parameter a in angstroms

Returns:
the lattice a values

getLatticeASigma(self)

source code 

Get the standard deviation of lattice parameter a in angstroms

Returns:
the lattice a values

getLatticeB(self)

source code 

Get the lattice parameter b in anstrom

Returns:
the lattice b values

getLatticeBSigma(self)

source code 

Get the standard deviation of lattice parameter b in anstrom

Returns:
the lattice b standard deviations

getLatticeC(self)

source code 

Get the lattice parameter c in anstrom

Returns:
the lattice c values

getLatticeCSigma(self)

source code 

Get the standard deviation of lattice parameter c in anstrom

Returns:
the lattice c standard deviations

getName(self)

source code 

Get the phase name

Returns:
string

getNumOfAtoms(self)

source code 

Get number of atoms in the phase

Returns:
number of atoms

getSpaceGroup(self)

source code 

Get the space group of the phase

Returns:
return the space group string list

listAtomNames(self)

source code 

List the atom names

Returns:
a list of atom names in this phase

listAtoms(self)

source code 

List the atoms

Returns:
a list of Atom objects