This is an old revision of the document!
Demos for using the resolution convolution can be downloaded here or here. To use these demos, please unpack the archive from the link. The full documentation for Takin can be found here or here.
The demo convolution uses the Python backend for creating S(q,E) models. In the example, the model file can be found in the file “sqw_phonon.py”. In there, the most important (and only mandatory) interface function for Takin is “TakinSqw(h, k, l, E)”, which receives the (hkl) coordinates (in rlu) and the energy transfer E (in meV) of each random Monte-Carlo neutron events from Takin, and has to return the dynamical structure factor S(h, k, l, E) for the queried coordinate. How the structure factor is calculated is up to the user. In the example, a simple sinusoidal phonon dispersion branch with a DHO shape in energy is created.
Each parameter in the Python S(q,E) model script (here: “sqw_phonon.py”) which is global and whose name begins with “g_” is a parameter that can be changed directly from Takin and that can also be defined as a fit parameter. In the convolution dialog, they can be inspected and modified by clicking on the “Parameters…” button.
To fit a parameter, follow these steps: