Package diffpy :: Package srrietveld :: Module pattern :: Class Pattern
[frames] | no frames]

Class Pattern

source code

                       object --+            
                                |            
refinementdata.hdf5.object.Object --+        
                                    |        
   refinementdata.refinable.Refinable --+    
                                        |    
           refinementdata.pattern.Pattern --+
                                            |
                                           Pattern


Pattern inherits the Pattern class in diffpy.refinementdata. Its basic 
data is the array of 2theta, time of flight, intensity, error. It may not 
have a list of parameters. It may have a file object which stores the original 
data. 

data member:
    
    xobs: the observed data
    yobs: the observed y data
    ycal: the refined y data
    refl: the reflection list
    srcfiles: the source files, including data files and source files 

Instance Methods
 
__init__(self, owner, name=None, handle=None, shape=None)
Initialization
source code
 
getAbsoluteDataFile(self)
Get the absolute data file path
source code
 
getBackgroundCoefficients(self)
Get the background coefficients in a two dimensional array
source code
 
getBackgroundCoefficientsSigma(self)
Get the background coefficients standard deviations in a two dimensional array
source code
 
getBackgroundType(self)
Get the background type identification number.
source code
 
getDataFile(self)
Get the path of the data file.
source code
 
getEngineType(self)
Get the engine type for this refinement
source code
 
getLambda(self)
Get the refined wavelength value.
source code
 
getLambda1(self)
Get the first wavelength value
source code
 
getLambda1Sigma(self)
Get the first wavelength standard deviation
source code
 
getLambda2(self)
Get the second wavelength value
source code
 
getLambda2Sigma(self)
Get the second wavelength standard deviation
source code
 
getLambdaSigma(self)
Get the refined wavelength standard deviation.
source code
 
getNumOfBackgroundCoefficients(self)
Get the number of background coefficients.
source code
 
getPolar(self)
Get the polarization factors
source code
 
getPolarType(self)
Get the polarization type id numbers.
source code
 
getRatio(self)
Get the ratio value of the refinement list.
source code
 
getRp(self)
Get the Rp value of the refinement list
source code
 
getRwp(self)
Get the Rwp value of the refinement list
source code
 
getScale(self)
Get the scale factor of the pattern
source code
 
getScaleSigma(self)
Get the scale factor standard deviation
source code
 
getStep(self)
Get the step values
source code
 
getTmax(self)
Get the Tmax of the pattern
source code
 
getTmin(self)
Get the Tmin of the pattern
source code
 
getUseFlag(self)
Get the use flag of this pattern.
source code
 
getXobs(self)
Get the observed x axis points.
source code
 
getYcal(self)
Get the calculated y values.
source code
 
getYobs(self)
Get the observed y values.
source code
 
getZero(self)
Get the zero shift value for this pattern
source code
 
getZeroSigma(self)
Get the zero shift standard deviation
source code
 
listExcludedRegions(self)
Get the excluded regions as list
source code

Inherited from refinementdata.pattern.Pattern: get, loadLocalData, set

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, getAttr, getByPath, getFlatIndex, getMetaData, getMultiDimIndex, getObject, getPyObj, hasAttr, hasMeta, importFile, isDescendant, list, listAttrs, listNames, listObjects, load, loadObject, move, range, readStr, removeObject, rename, repeat, replicate, reshape, save, 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 

Initialization

Parameters:
  • owner (a data project) - the owner, which is usually a refinement.
  • handle (a HDF5Handle object) - a HDF5Handle pointing to the underlying HDF5 node.

    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.

    Usually in the scripting interface, users do not have to worry about the initialization

  • name (string @param name the name of the pattern)
Overrides: object.__init__

getAbsoluteDataFile(self)

source code 

Get the absolute data file path

Returns:
the absolute data path strings

getBackgroundCoefficients(self)

source code 

Get the background coefficients in a two dimensional array

Returns:
the background coefficient values in a two dimensional array

getBackgroundCoefficientsSigma(self)

source code 

Get the background coefficients standard deviations in a two dimensional array

Returns:
the background coefficient standard deviations in a two dimensional array

getBackgroundType(self)

source code 

Get the background type identification number. This number has different meanings in engines.

Returns:
an integer represent the type of the background function

getDataFile(self)

source code 

Get the path of the data file.

Returns:
the data path strings

getEngineType(self)

source code 

Get the engine type for this refinement

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

getLambda(self)

source code 

Get the refined wavelength value. In FullProf, there can be only one lambda value can be refined

Returns:
the values of wavelength in angstroms

getLambda1(self)

source code 

Get the first wavelength value

Returns:
the values of the wavelength in angstroms

getLambda1Sigma(self)

source code 

Get the first wavelength standard deviation

Returns:
the wavelength standard deviation

getLambda2(self)

source code 

Get the second wavelength value

Returns:
the values of the wavelength in angstroms

getLambda2Sigma(self)

source code 

Get the second wavelength standard deviation

Returns:
the wavelength standard deviation

getLambdaSigma(self)

source code 

Get the refined wavelength standard deviation. In FullProf, there can be only one lambda value can be refined

Returns:
the wavelength standard deviation

getNumOfBackgroundCoefficients(self)

source code 

Get the number of background coefficients. This is number is from the dimensions of the background coefficients array

Returns:
the number of background coefficients

getPolar(self)

source code 

Get the polarization factors

Returns:
the polarization factors

getPolarType(self)

source code 

Get the polarization type id numbers. These numbers have different meanings in different engine files, please refer to the manual of the refinement engine.

Returns:
the Tmin of the pattern as float

getRatio(self)

source code 

Get the ratio value of the refinement list. These values are read from the engine files, and not calculated in SrRietveld.

Returns:
the values of ratios of intensities of lambda2 / lambda1

getRp(self)

source code 

Get the Rp value of the refinement list

Returns:
the values of Rp

getRwp(self)

source code 

Get the Rwp value of the refinement list

Returns:
the values of Rwp

getScale(self)

source code 

Get the scale factor of the pattern

Returns:
the scale factor of the pattern as float

getScaleSigma(self)

source code 

Get the scale factor standard deviation

Returns:
the scale factor standard deviation

getStep(self)

source code 

Get the step values

Returns:
the step sizes

getTmax(self)

source code 

Get the Tmax of the pattern

Returns:
the Tmax of the pattern as float

getTmin(self)

source code 

Get the Tmin of the pattern

Returns:
the Tmin of the pattern as float

getUseFlag(self)

source code 

Get the use flag of this pattern. In GSAS a histogram can be flagged as used (True) or unused (False). The pattern will be included in the refinement only if its used. The pattern will always be used in a FullProf refinement.

Returns:
the use flags (boolean) of this pattern in refinements

getXobs(self)

source code 

Get the observed x axis points. This parameters is only available after the refinement is complete.

Returns:
a multi-dimensional array with the x axis points.

getYcal(self)

source code 

Get the calculated y values. This parameters is only available after the refinement is complete.

Returns:
a multi-dimensional array with the calculated y values.

getYobs(self)

source code 

Get the observed y values. This parameters is only available after the refinement is complete.

Returns:
a multi-dimensional array with the observed y values.

getZero(self)

source code 

Get the zero shift value for this pattern

Returns:
the zero shift value as float

getZeroSigma(self)

source code 

Get the zero shift standard deviation

Returns:
the zero shift standard deviation