Ticket #8508 (closed: fixed)
Create 1D fitting function for discrete rotational diffusion in a circle
Reported by: | Jose Borreguero | Owned by: | Jose Borreguero |
---|---|---|---|
Priority: | minor | Milestone: | Release 3.1 |
Component: | Indirect Inelastic | Keywords: | |
Cc: | Blocked By: | ||
Blocking: | Tester: | Roman Tolchenov |
Description (last modified by Jose Borreguero) (diff)
A 1D fitting function to help quasi-elastic analysis of discrete rotational diffusion on N sites located in a circle. Typical of elongated molecules, like alkanes, but also applicable to methyl rotations.
A more detailed description in http://www.mantidproject.org/DiffRotDiscreteCircle
============================================================== NOTES FOR THE TESTER:
Download attached files to /tmp. In Mantidplot.Script_Window, load test.py and execute. A fit of the data should yield the followings parameters:
Intensity = 0.745, Radius = 0.876(Angstroms), Decay = 763.6(pico-seconds)
You can plot workspace data_Workspace to visually inspect the fit
You can also use the MantidPlot's fit wizard to perform the fit. Here's the starting fit-string guess that you load to the wizard via Setup->Manage_Setup->Load_From_String:
(composite=Convolution,FixResolution=true,NumDeriv=true;name=TabulatedFunction,FileName="",Workspace=resolution,Scaling=1;(name=DiffRotDiscreteCircle,N=3,NumDeriv=true,Q=1.9,Intensity=1,Radius=1,Decay=10));name=LinearBackground,A0=0.001,A1=0.0001 ==============================================================
Attachments
Change History
comment:2 Changed 7 years ago by Jose Borreguero
Refs #8508 Moved to a C++ algorithm
modified: Framework/CurveFitting/CMakeLists.txt new file: Framework/CurveFitting/inc/MantidCurveFitting/DiffRotDiscreteCircle.h new file: Framework/CurveFitting/src/DiffRotDiscreteCircle.cpp new file: Framework/CurveFitting/test/DiffRotDiscreteCircleTest.h deleted: Framework/PythonInterface/plugins/functions/DiffRotDiscreteCircle.py
Changeset: 38ec9a3534c7ff73853a98315c987f61f2dce220
comment:3 Changed 7 years ago by Jose Borreguero
Refs #8508 Cosmetic changes in the code
Changeset: 8af64157f97c1ad42cf47632e3da3294bd93dcef
comment:4 Changed 7 years ago by Jose Borreguero
Refs #8508 Inserted WIKI page in source docstring
Changeset: a5889007a57b9c8b7d8b1186192d67ba0ca0ff33
comment:5 Changed 7 years ago by Jose Borreguero
Refs #8508 Include limits header for numeric_limits
Changeset: 8cf4875a34a0961a37de0337619408b4c0e0dc01
comment:6 Changed 7 years ago by Jose Borreguero
Refs #8508 Avoid declaring statically sized arrays
Windows compiler complains when declaring a statically sized array while passing in a size variable which is evaluated at run-time
Changeset: 47014c8e8db1fc8fcb7c3e107bd83e81c0e60a11
comment:7 Changed 7 years ago by Jose Borreguero
Refs #8508 declaring a statically sized array v2
I had another one of those :(
Changeset: 8ca3319cb0c42ca0b88142ef85c974c6ea064fcd
comment:8 Changed 7 years ago by Jose Borreguero
Notes to the tester:
Download attached files to /tmp. In Mantidplot.Script_Window, load test.py and execute. A fit of the data should yield the followings parameters:
Intensity = 47.014, Radius = 1.567, Decay = 7.567
You can plot workspace data_Workspace to visually inspect the fit
You can also use the Fit GUI in MantidPlot to perform the fit. Here's the starting fit-string guess that you can load from Setup->Manage_Setup->Load_From_String:
(composite=Convolution,FixResolution=true,NumDeriv=true;name=Gaussian,Height=1,PeakCentre=0,Sigma=20,ties=(Height=1,PeakCentre=0,Sigma=20);(name=DiffRotDiscreteCircle,N=3,NumDeriv=true,Q=0.5,Intensity=10,Radius=1,Decay=20))
comment:10 Changed 7 years ago by Jose Borreguero
- Status changed from inprogress to verify
- Resolution set to fixed
comment:13 Changed 7 years ago by Jose Borreguero
Refs #8508 Changed the WIKI docstring
Changeset: bd821fd40f198786562fcdad3c29ab628e614055
comment:16 Changed 7 years ago by Jose Borreguero
Refs #8508 Substitute array with vector
Changeset: d7c67d8c1efaf2614a8ad91da4e76c789f114cd6
comment:17 Changed 7 years ago by Jose Borreguero
- Status changed from verify to reopened
- Resolution fixed deleted
comment:18 Changed 7 years ago by Jose Borreguero
- Status changed from reopened to inprogress
Refs #8508 Upper limit in one for loop was wrong
Changeset: 595f5903d86ae7901c365f3a3bdc3cb6864b3067
comment:19 Changed 7 years ago by Jose Borreguero
Refs #8508 Test simple lorentzian case N=3
Changeset: e4727397bfeefffcc90f38fc0e606e0c14daec3f
comment:20 Changed 7 years ago by Jose Borreguero
Refs #8508 change asserts for Chi2
Changeset: 457861313d7a8e18ad6e85d3aaeaa2fc6335a75f
comment:21 Changed 7 years ago by Jose Borreguero
Refs #8508 More detailed description of the fitting function
Changeset: da798fd6df66f754b6f718d4055c5e04083bc1ba
comment:22 Changed 7 years ago by Jose Borreguero
Refs #8508 Even more detailed description
modified: DiffRotDiscreteCircle.cpp
Changeset: 3e89ba209aac57ef1ed09bdaecc3e12798f92777
comment:23 Changed 7 years ago by Jose Borreguero
- Status changed from inprogress to verify
- Resolution set to fixed
comment:24 Changed 7 years ago by Roman Tolchenov
- Status changed from verify to verifying
- Tester set to Roman Tolchenov
comment:25 Changed 7 years ago by Roman Tolchenov
- Status changed from verifying to reopened
- Resolution fixed deleted
I decided to reopen this ticket with these comments:
- The errors in the test data file make fit very sensitive to the [StartX,EndX] interval. The result parameters vary in a wide range.
- If errors are set to 1 the test data can be fitted with a simple gaussian to a good accuracy. Is it possible to construct data that cannot be fitted by other functions?
- It looks like a couple of commits are missing from develop, although they contain changes to a comment block only and shouldn't break any builds or tests.
Changed 7 years ago by Jose Borreguero
python script to be run in MantidPlot
comment:28 Changed 7 years ago by Jose Borreguero
Replaced the example with data from a real experiment. In the previous example, the resolution function (the Gaussian) was broader than the quasielastic signal. This was the reason why one could fit the data with a simple Gaussian when one allowed for bigger errors.
comment:29 Changed 7 years ago by Jose Borreguero
- Status changed from reopened to verify
- Resolution set to fixed
comment:31 Changed 7 years ago by Roman Tolchenov
The function fits the data very well.
comment:32 Changed 7 years ago by Roman Tolchenov
- Status changed from verifying to closed
Merge remote-tracking branch 'origin/feature/8508_discrete_rotational_diffusion'
Full changeset: 83940618dcd27e8897972eb7bde4f01b26770ece
comment:33 Changed 5 years ago by Stuart Campbell
This ticket has been transferred to github issue 9352
Refs #8508 Little more than the header
Changeset: 4f75e86c6035f8c4829f25d4ff9bd74d42472f4b