Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Comparing to Mantid PDFFourierTransform #26

Open
rosswhitfield opened this issue Jan 31, 2019 · 0 comments
Open

Comparing to Mantid PDFFourierTransform #26

rosswhitfield opened this issue Jan 31, 2019 · 0 comments

Comments

@rosswhitfield
Copy link
Member

I used this script to compare the Fourier transform algorithm PDFFourierTransform of Mantid and pystog.

from mantid.simpleapi import CreateWorkspace, PDFFourierTransform
import numpy as np
from pystog import Transformer
transformer = Transformer()

xx = np.arange(0, 10, 0.1)
yy = np.exp(-(2.0 * xx)**2)
ws = CreateWorkspace(DataX=xx, DataY=yy, DataE=yy, UnitX='MomentumTransfer')
Rt = PDFFourierTransform(ws, InputSofQType='Q[S(Q)-1]', PDFType='G(r)')

y = Rt.extractY()[0]
x = Rt.extractX()[0]
e = Rt.extractE()[0]

r, gr, dgr = transformer.F_to_G(xx, yy, x, yy)

After c80d57b this shows that you get the same G(r) (comparing y and gr) and delta-G(r) (comparing e and dgr).

But if you change the input q to not start at 0 (xx=np.arange(0.1,10,0.1)) then the results differ.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant