This module simplifies using fityk for analyzing diffractograms. User must know approximate unit-cell parameters, and know or guess Miller's indices of reflections. Widths and shapes of peaks can be independend or angle-depended parameters. The whole pattern is refined. Note, that individual profiles can also be fitted, but this module is not needed for it.
It is assumed, that x coordinate of data points represent scattering angle
and wavelengths are constant.
Everything, what can be done with crystallographic commands, could be done with s.add, s.remove, s.info and m.findpeak commands, although it would be very inconvenient.
The wavelength can be specified with command:
lambda and intens are parameters and can be specified as parameters in s.add command. It practice, two forms are used: _p (eg. _1.93597) if wavelength is known or ~p (eg. ~0.9) if it should be fitted. intens is a relative intensity of wavelength, and it matters, when there are two or more wavelengths. Above command adds a wavelength with its ratio to a set of wavelength. This means, that if you want to define two wavelengths, you should use this command twice, and if you want to change constant wavelength, you must delete previously defined one and add a new one. To delete all defined wavelengths, use command
and to display informations about them, just type:
Now about a few essential options. You must choose a peak-shape, that will model a reflections. To do this, assign proper value to option peak-type. You can use Gaussian, Lorentzian, Pearson VII, pseudo-Voigt or Mod-TCHpV. The last one is also a pseudo-Voigt, but its width and shape parameters are given by following formulae:
Positions (centers) of peaks are determined by Bragg's Law, and heights (and, therefore, areas) are fitted almost freely - the only constraint is, that ratio of heights of peaks in one plane is equal to appropriate ratio of wavelength intensities. If you do not use Mod-TCHpV type, width and shape parameters of peak can be:
fitted autonomously for every peak,
equal for peaks in one plane (if there is more than one wavelength used, plane is represented by more than one peak),
equal for all peaks in one phase,
or function of
; for width, it is Lowe-Ma formula:
HK usually means FWHM, but note that above formula can be also applied to HWHM, by rescaling refinable variables: U'=U/4, V'=V/4, etc. Shape parameter of peak can be modeled by function of peak's position, for pseudo-Voigt peak:
and for Pearson peak:
You can select one of possibilities listed above using options fwhm-constrain and shape-constrain.
Phase is defined by its type and lattice parameters. Command
adds a new phase to set of phases in our model. p is a letter that stands for type of lattice:
%c - cubic phase,
%t - tetragonal phase,
%o - orthorhombic phase,
%h - hexagonal phase.
Monoclinic and triclinic types are not implemented, because author of program had no need to use them. You can also display this list with command:
Lattice parameters, that follow type of phase, can be specified in the same way as lambda and intens in c.wavelength command described above.
The last information, which the program needs, is what planes are visible on diffractogram. It has to be specified using Miller indices (hkl). Command
adds appropriate functions, that represent that plane, to the sum of functions. If %n is omitted, first phase (%0) is assumed. Eg. command c.add %1 (100) will add plane (100) of second defined phase %1. Informations about phases and planes can be viewed with command:
Every plane or the whole phase can be removed from the model using:
The last thing that requires explanation is how initial height, width and shape parameters of peaks are being found. It is based on algorithm used in m.findpeak command. It is also influenced by the same options as m.findpeak. In case of two or more wavelengths used, this algorithm is a little enhanced. To see, how peaks representing plane will look like, use command:
If width is given, it is used instead of value of search-width option.
You can find following script and data used by it in samples directory.
## this script is an example of crystallography/diffraction module usage d.load 'SiC_Zn.dat' # Load data file from current directory (SiC+Zn data) #background was obtained by clicking on plot in "background mode" d.background 20.4823 43.3474 , 28.004 24.3128 , 31.4412 23.6984 , d.background 33.7911 36.0138 , 38.6477 30.5403 , 98.9835 23.6079 , d.b 98.9835 23.6079 , 79.5965 22.1979 , 65.1888 17.968 , 49.9335 17.263 d.range [ 31 : ] # only data with 2theta greater then 31.0 are active #Used wavelength in known and we do not want to fit it. # If you would like to fit wavelength, replace '_' with '~' c.w _1.54051 # Cu Ka1 c.set peak-type = Mod-TCHpV #define phases and initial lattice parameters c.add %c ~4.35 #SiC, %0 c.add %h ~2.66 ~4.92 #Zn, %1 #defining some peaks (order does not matter) c.add %0 (220) # (220) plane of SiC phase c.add %1 (002) # (002) plane of Zn phase c.add %0 (111) c.add %1 (100), %1 (101) # do you remember how comma(,) works? c.a %1 (102) # every command can be shortened with x.x (letter-dot-letter) #after adding a few peaks, it can be a good idea to fit it, to obtain #better approximation of lattice parameters #f.run 10 # the rest of peaks c.add %1 (103), %1(110), %1(112), %1(200), %1(201), %1(202) c.add %0 (311) s.add <x ~0 #zero-shift f.run # running default fitting method (Lev-Mar) #'lambda' that you can see in output window is a parameter used by # fitting method, not wavelength. c.info # see refined lattice parameters # if you want to zoom, the easiest way is to use left button on auxiliary # plot (this plot with difference). To zoom out, use middle button on it. # To see individual peaks, select Show->Peaks from pop-up menu.