\(\renewcommand\AA{\unicode{x212B}}\)

PDFFourierTransform v2

../_images/PDFFourierTransform-v2_dlg.png

PDFFourierTransform dialog.

Summary

Fourier transform from S(Q) to G(r), which is paired distribution function (PDF). G(r) will be stored in another named workspace.

Properties

Name Direction Type Default Description
InputWorkspace Input MatrixWorkspace Mandatory Input spectrum density or paired-distribution function
OutputWorkspace Output MatrixWorkspace Mandatory Result paired-distribution function or Input spectrum density
Direction Input string Forward The direction of the fourier transform. Allowed values: [‘Forward’, ‘Backward’]
rho0 Input number Optional Average number density used for g(r) and RDF(r) conversions (optional)
Filter Input boolean False Set to apply Lorch function filter to the input
InputSofQType Input string S(Q) To identify spectral density function (deprecated). Allowed values: [‘S(Q)’, ‘S(Q)-1’, ‘Q[S(Q)-1]’]
SofQType Input string S(Q) To identify spectral density function. Allowed values: [‘S(Q)’, ‘S(Q)-1’, ‘Q[S(Q)-1]’]
DeltaQ Input number Optional Step size of Q of S(Q) to calculate. Default = \(\frac{\pi}{R_{max}}\).
Qmin Input number Optional Minimum Q in S(Q) to calculate in Fourier transform (optional).
Qmax Input number Optional Maximum Q in S(Q) to calculate in Fourier transform. (optional, defaults to 40 on backward transform.)
PDFType Input string G(r) Type of output PDF including G(r). Allowed values: [‘G(r)’, ‘g(r)’, ‘RDF(r)’]
DeltaR Input number Optional Step size of r of G(r) to calculate. Default = \(\frac{\pi}{Q_{max}}\).
Rmin Input number Optional Minimum r for G(r) to calculate. (optional)
Rmax Input number Optional Maximum r for G(r) to calculate. (optional, defaults to 20 on forward transform.)

Description

The algorithm transforms a single spectrum workspace containing spectral density \(S(Q)\), \(S(Q)-1\), or \(Q[S(Q)-1]\) (as a function of MomentumTransfer or dSpacing units) to a PDF (pair distribution function) as described below and also the reverse. The available PDF types are the reduced pair distribution function \(G(r)\), the pair distribution function \(g(r)\), and the radial distribution function \(RDF(r)\).

The output from this algorithm will have an x-range between 0.0 and the maximum parameter of the output, i.e. if converting from g(r) to S(Q) the output will be between 0.0 and Qmax.

The spectrum density should be in the Q-space (MomentumTransfer) units . (d-spacing is not supported any more. Contact development team to fix that and enable dSpacing again)

References

  1. B. H. Toby and T. Egami, Accuracy of Pair Distribution Functions Analysis Appliced to Crystalline and Non-Crystalline Materials, Acta Cryst. (1992) A 48, 336-346 doi: 10.1107/S0108767391011327
  2. B.H. Toby and S. Billinge, Determination of Standard uncertainties in fits to pair distribution functions Acta Cryst. (2004) A 60, 315-317] doi: 10.1107/S0108767304011754

PDF Options

g(r)

\(g(r) = \rho(r)/\rho_0 = 1+\frac{1}{2\pi^2\rho_0r} \int_{0}^{\infty} Q[S(Q)-1]\sin(Qr)dQ\)

and in this algorithm, it is implemented as

\(g(r)-1 = \frac{1}{2\pi \rho_0 r^3} \sum_{Q_{min}}^{Q_{max}} M(Q,Q_{max})(S(Q)-1)[\sin(Qr) - Qr\cos(Qr)]^{right bin}_{left bin}\)

where \(M(Q,Q_{max})\) is an optional filter function. If Filter property is set (true) then

\(M(Q,Q_{max}) = \frac{\sin(\pi Q/Q_{max})}{\pi Q/Q_{max}}\)

otherwise

\(M(Q,Q_{max}) = 1\,\)

G(r)

\(G(r) = 4 \pi \rho_0 r [g(r)-1]\)

RDF(r)

\(RDF(r) = 4 \pi \rho_0 r^2 g(r)\)

Note: All output forms are calculated by transforming \(g(r)-1\).

Usage

Example - PDF transformation examples:

# Simulates Load of a workspace with all necessary parameters
import numpy as np;
xx = np.array(range(0,100))*0.1
yy = np.exp(-(2.0 * xx)**2)
ws = CreateWorkspace(DataX=xx, DataY=yy, UnitX='MomentumTransfer')
Rt = PDFFourierTransform(ws, SofQType='S(Q)', PDFType='g(r)')

# Look at sample results:
print('part of S(Q) and its correlation function')
for i in range(10):
   print('! {0:4.2f} ! {1:5f} ! {2:f} ! {3:5f} !'.format(xx[i], yy[i], Rt.readX(0)[i], Rt.readY(0)[i]))

Output:

part of S(Q) and its correlation function
! 0.00 ! 1.000000 ! 0.317333 ! -3.977042 !
! 0.10 ! 0.960789 ! 0.634665 ! 2.248558 !
! 0.20 ! 0.852144 ! 0.951998 ! 0.449916 !
! 0.30 ! 0.697676 ! 1.269330 ! 1.314437 !
! 0.40 ! 0.527292 ! 1.586663 ! 0.803744 !
! 0.50 ! 0.367879 ! 1.903996 ! 1.141098 !
! 0.60 ! 0.236928 ! 2.221328 ! 0.900872 !
! 0.70 ! 0.140858 ! 2.538661 ! 1.080090 !
! 0.80 ! 0.077305 ! 2.855993 ! 0.940530 !
! 0.90 ! 0.039164 ! 3.173326 ! 1.051576 !

Categories: AlgorithmIndex | Diffraction\Utility

Source

C++ header: PDFFourierTransform2.h (last modified: 2020-05-13)

C++ source: PDFFourierTransform2.cpp (last modified: 2020-05-20)