hexrd.wppf.phase module

class hexrd.wppf.phase.Material_LeBail(fhdf=None, xtal=None, dmin=None, material_obj=None)[source]

Bases: object

>> @AUTHOR: Saransh Singh, Lawrence Livermore National Lab, saransh1@llnl.gov >> @DATE: 05/18/2020 SS 1.0 original

09/14/2020 SS 1.1 class can now be initialized using a material.Material class instance

>> @DETAILS: Material_LeBail class is a stripped down version of the

material.Material class.this is done to keep the class lightweight and make sure only the information necessary for the lebail fit is kept

CalcDot(u, v, space)[source]
CalcLength(u, space)[source]
CalcMaxGIndex()[source]
CalcStar(v, space, applyLaue=False)[source]

this function calculates the symmetrically equivalent hkls (or uvws) for the reciprocal (or direct) point group symmetry.

ChooseSymmetric(hkllist, InversionSymmetry=True)[source]

this function takes a list of hkl vectors and picks out a subset of the list picking only one of the symmetrically equivalent one. The convention is to choose the hkl with the most positive components.

GenerateRecipPGSym()[source]
Required_lp(p)[source]
SortHKL(hkllist)[source]

this function sorts the hkllist by increasing |g| i.e. decreasing d-spacing. If two vectors are same length, then they are ordered with increasing priority to l, k and h

getHKLs(dmin)[source]

this function generates the symetrically unique set of hkls up to a given dmin. dmin is in nm

getTTh(wavelength)[source]
get_sf_hkl_factors()[source]

this function calculates the prefactor for each hkl used to calculate the 2theta shifts due to stacking faults. for details see EQ. 10 Velterop et. al., Stacking and twin faults J. Appl. Cryst. (2000). 33, 296-306

currently only doing fcc. will be adding hcp and bcc in the future adding a guard rail so that the function only returns for sgnum 225

removeinversion(ksym)[source]

this function chooses a subset from a list of symmetrically equivalent reflections such that there are no g and -g present.

sf_and_twin_probability()[source]
property shkl
class hexrd.wppf.phase.Material_Rietveld(fhdf=None, xtal=None, dmin=None, kev=None, material_obj=None)[source]

Bases: object

>> @AUTHOR: Saransh Singh, Lawrence Livermore National Lab, saransh1@llnl.gov >> @DATE: 05/18/2020 SS 1.0 original

02/01/2021 SS 1.1 class can now be initialized using a material.Material class instance

>> @DETAILS: Material_LeBail class is a stripped down version of the

material.Material class. This is done to keep the class lightweight and make sure only the information necessary for the Rietveld fit is kept

CalcKeV()[source]
CalcLength(u, space)[source]
CalcMaxGIndex()[source]
CalcPositions()[source]

calculate the asymmetric positions in the fundamental unitcell used for structure factor calculations

CalcStar(v, space, applyLaue=False)[source]

this function calculates the symmetrically equivalent hkls (or uvws) for the reciprocal (or direct) point group symmetry.

CalcWavelength()[source]
CalcXRSF(wavelength, w_int)[source]

the 1E-2 is to convert to A^-2 since the fitting is done in those units

ChooseSymmetric(hkllist, InversionSymmetry=True)[source]

this function takes a list of hkl vectors and picks out a subset of the list picking only one of the symmetrically equivalent one. The convention is to choose the hkl with the most positive components.

GenerateRecipPGSym()[source]
InitializeInterpTable()[source]
Required_lp(p)[source]
SortHKL(hkllist)[source]

this function sorts the hkllist by increasing |g| i.e. decreasing d-spacing. If two vectors are same length, then they are ordered with increasing priority to l, k and h

TransSpace(v_in, inspace, outspace)[source]
calcBetaij()[source]
calc_absorption(tth, phi, wavelength)[source]
calc_extinction(wavelength, tth, f_sqr, shape_factor_K, particle_size_D)[source]
dmin

voltage in ev

getHKLs(dmin)[source]

this function generates the symetrically unique set of hkls up to a given dmin. dmin is in nm

getTTh(wavelength)[source]
get_sf_hkl_factors()[source]

this function calculates the prefactor for each hkl used to calculate the 2theta shifts due to stacking faults. for details see EQ. 10 Velterop et. al., Stacking and twin faults J. Appl. Cryst. (2000). 33, 296-306

currently only doing fcc. will be adding hcp and bcc in the future adding a guard rail so that the function only returns for sgnum 225

sf_and_twin_probability()[source]
property shkl
class hexrd.wppf.phase.Phases_LeBail(material_file=None, material_keys=None, dmin=valWUnit('lp', 'LENGTH', 0.05, 'nm'), wavelength={'alpha1': [valWUnit('lp', 'LENGTH', 0.15406, 'nm'), 1.0], 'alpha2': [valWUnit('lp', 'LENGTH', 0.154443, 'nm'), 0.52]})[source]

Bases: object

>> @AUTHOR: Saransh Singh, Lawrence Livermore National Lab, saransh1@llnl.gov >> @DATE: 05/20/2020 SS 1.0 original >> @DETAILS: class to handle different phases in the LeBail fit. this is a stripped down

version of main Phase class for efficiency. only the components necessary for calculating peak positions are retained. further this will have a slight modification to account for different wavelengths in the same phase name

add(material_file, material_key)[source]
add_many(material_file, material_keys)[source]
dump(fname)[source]

>> @AUTHOR: Saransh Singh, Lawrence Livermore National Lab, saransh1@llnl.gov >> @DATE: 06/08/2020 SS 1.0 original >> @DETAILS: dump parameters to yaml file

dump_hdf5(file)[source]

>> @AUTHOR: Saransh Singh, Lawrence Livermore National Lab, saransh1@llnl.gov >> @DATE: 01/15/2021 SS 1.0 original >> @ DETAILS dumps the information from each material in the phase class

to a hdf5 file specified by filename or h5py.File object

load(fname)[source]

>> @AUTHOR: Saransh Singh, Lawrence Livermore National Lab, saransh1@llnl.gov >> @DATE: 06/08/2020 SS 1.0 original >> @DETAILS: load parameters from yaml file

num_phases

set wavelength. check if wavelength is supplied in A, if it is convert to nm since the rest of the code assumes those units

class hexrd.wppf.phase.Phases_Rietveld(material_file=None, material_keys=None, dmin=valWUnit('lp', 'LENGTH', 0.05, 'nm'), wavelength={'alpha1': [valWUnit('lp', 'LENGTH', 0.15406, 'nm'), 1.0], 'alpha2': [valWUnit('lp', 'LENGTH', 0.154443, 'nm'), 0.52]})[source]

Bases: object

>> @AUTHOR: Saransh Singh, Lawrence Livermore National Lab, saransh1@llnl.gov >> @DATE: 05/20/2020 SS 1.0 original >> @DETAILS: class to handle different phases in the LeBail fit. this is a stripped down

version of main Phase class for efficiency. only the components necessary for calculating peak positions are retained. further this will have a slight modification to account for different wavelengths in the same phase name

add(material_file, material_key)[source]
add_many(material_file, material_keys)[source]
dump(fname)[source]

>> @AUTHOR: Saransh Singh, Lawrence Livermore National Lab, saransh1@llnl.gov >> @DATE: 06/08/2020 SS 1.0 original >> @DETAILS: dump parameters to yaml file

load(fname)[source]

>> @AUTHOR: Saransh Singh, Lawrence Livermore National Lab, saransh1@llnl.gov >> @DATE: 06/08/2020 SS 1.0 original >> @DETAILS: load parameters from yaml file

num_phases

set wavelength. check if wavelength is supplied in A, if it is convert to nm since the rest of the code assumes those units

property phase_fraction