If you are using GitLab outside of the ILL, then you will need to use HTTPS and not SSH for clone/push/pull operations. SSH will work normally if you are using the VPN.

Commit c14e94cb authored by Tobias WEBER's avatar Tobias WEBER

added some technical info to help

parent f3676162
......@@ -11,7 +11,7 @@
"Resolution" -> "Convolution..." in the menu bar.</p>
<p>In the "Convolution" dialog four things have to be defined: (1) a crystal, (2) an instrument,
(3) a theoretical model for the dynamical structure factor S(q,w), and (4) a scan direction:</p>
(3) a theoretical model for the dynamical structure factor S(q,E), and (4) a scan direction:</p>
<p>(1) and (2): The crystal (together with a scattering plane) and the instrument parameter
files are entered in the "Crystal File" and "Resolution File" edit fields, respectively.
......@@ -21,16 +21,28 @@
determined from a TAS data file, which can be optionally entered in the "Measurement" edit field.
Multiple scan files can be specified by separating them with a semicolon.</p>
<p>(3): The S(q,w) model is a user-provided theoretical formula or algorithm for the physical
<p>(3): The S(q,E) model is a user-provided theoretical formula or algorithm for the physical
system to be measured. It can be either provided as a <a href="reso-sqw-py.html">Python</a>
or a <a href="reso-sqw-jl.html">Julia</a> script, or as a <a href="reso-sqw-native.html">native plugin</a>.
Several simple S(q,w) models are <a href="reso-sqw.html">included internally</a> for testing.
Several simple S(q,E) models are <a href="reso-sqw.html">included internally</a> for testing.
Each model provides variables which can be directly changed in the GUI via the "..." button next
to "Model Source". These variables are the same that are also exposed to the fitter.</p>
<p>(4): The actual scan path is defined in the "Scan Steps" group at the bottom of the dialog.
Here, the Q=(hkl) and E coordinates of the start end end position are entered along with the
number of subdivisions between these positions ("Steps").</p>
<h3>Background information</h3>
<p>A triple-axis spectrometer does not sample the dynamical structure factor S(q,E) at the nominally set-up
reciprocal coordinates (q,E), but instead probes S in a normally-distributed range
([q-&sigma;_q, q+&sigma;_q], [E-&sigma;_E, E+&sigma;_E]), where the deviations &sigma;_q and &sigma;_E are given
by the resolution ellipsoid. Mathematically, the measured intensity is the convolution integral of the dynamical
structure factor and the instrumental resolution function. In Takin, the integral is solved numerically using
Monte-Carlo integration.</p>
<p>More details can be found <a href="http://dx.doi.org/10.1107/S0567739475001088">here</a> or <a href="http://dx.doi.org/10.1016/j.nima.2014.03.019">here</a>.</p>
</body>
</html>
......@@ -7,8 +7,8 @@
<h1>Convolution Fitting</h1>
<p>The convolution fitter finds the best least-squares fit of one or several
free parameters in an S(q,w) model using a Monte-Carlo convolution approach.
The S(q,w) model is fitted to one or more given measurement data files.</p>
free parameters in an S(q,E) model using a Monte-Carlo convolution approach.
The S(q,E) model is fitted to one or more given measurement data files.</p>
<p>The fitter is called on the command-line by: "convofit my_fit.job"
The input job file "my_fit.job" in this example has the following structure:</p>
......@@ -52,19 +52,19 @@
instrument_file "my_instrument.taz"
; which S(q,w) model to use?
; which S(q,E) model to use?
sqw_model "py"
; S(q,w) input file. Here, a Python script
; S(q,E) input file. Here, a Python script
sqw_file "my_sqw.py"
; how is the temperature/field variable named
; the S(q,w) model? Here, "g_T" and "g_H" are
; the S(q,E) model? Here, "g_T" and "g_H" are
; global variables in the "my_sqw.py" script.
sqw_temp_var "g_T"
sqw_field_var "g_H"
; fix some variables in the S(q,w) model
; fix some variables in the S(q,E) model
sqw_set_params "g_my_param = 12.3"
; flip the sense of the coordinate system
......@@ -170,12 +170,12 @@
}
; which S(q,w) model parameters should be fitted?
; which S(q,E) model parameters should be fitted?
; don't remove "scale", "slope" or "offs"!
fit_parameters
{
; the fit parameters: "scale", "slope" and "offs" are internal variables,
; "g_linewidth" is a parameter in the S(q,w) model. In this example,
; "g_linewidth" is a parameter in the S(q,E) model. In this example,
; it is a global name in the "my_sqw.py" script.
params "scale " \
"slope " \
......
<html>
<head>
<title>Julia S(q,w) Models</title>
<title>Julia S(q,E) Models</title>
</head>
<body>
<h1>Julia S(q,w) Models</h1>
<h1>Julia S(q,E) Models</h1>
<p>Similarly to the Python modules, a S(q,w)
<p>Similarly to the Python modules, a S(q,E)
<a href="https://julialang.org/" target="_blank">Julia</a>
module has to define the two functions "TakinInit" and "TakinSqw".</p>
......@@ -19,7 +19,7 @@
and returns a single floating-point value S, the dynamical structure factor.
The function is called for every Monte-Carlo point.</p>
<p>All global variables that are defined in an S(q,w) Julia module and that
<p>All global variables that are defined in an S(q,E) Julia module and that
are prefixed with "g_" (for "global") are made available as settable parameters
in the convolution dialog and as fit parameters for the convolution fitter.</p>
......@@ -45,7 +45,7 @@ end
of the source code distribution):
<code><pre>
#
# Sample Julia S(q,w) module for ferromagnetic dispersions
# Sample Julia S(q,E) module for ferromagnetic dispersions
# @author Tobias Weber <tobias.weber@tum.de>
# @license GPLv2
# @date dec-2016
......
<html>
<head>
<title>Native S(q,w) Models</title>
<title>Native S(q,E) Models</title>
</head>
<body>
<h1>Native S(q,w) Models</h1>
<h1>Native S(q,E) Models</h1>
<p>Takin can load S(q,w) plugins via native shared libraries (SO or DLL files).
<p>Takin can load S(q,E) plugins via native shared libraries (SO or DLL files).
C++ examples to build upon are given in the subdirectory "examples/sqw_module".</p>
......@@ -15,7 +15,7 @@
Header file "sqwmod.h":
<code><pre>
/**
* S(q,w) module example
* S(q,E) module example
* @author Tobias Weber <tobias.weber@tum.de>
* @date 2016
* @license GPLv2
......@@ -75,7 +75,7 @@ class SqwMod : public SqwBase
C++ implementation file "sqwmod.cpp":
<code><pre>
/**
* S(q,w) module example
* S(q,E) module example
* @author Tobias Weber <tobias.weber@tum.de>
* @date 2016
* @license GPLv2
......
<html>
<head>
<title>Python S(q,w) Models</title>
<title>Python S(q,E) Models</title>
</head>
<body>
<h1>Python S(q,w) Models</h1>
<h1>Python S(q,E) Models</h1>
<p>A S(q,w) <a href="https://www.python.org/" target="_blank">Python</a>
<p>A S(q,E) <a href="https://www.python.org/" target="_blank">Python</a>
module has to define the two functions "TakinInit" and "TakinSqw".</p>
<p>"TakinInit" is called after one or several parameters have changed
......@@ -18,7 +18,7 @@
and returns a single floating-point value S, the dynamical structure factor.
The function is called for every Monte-Carlo point.</p>
<p>All global variables that are defined in an S(q,w) Python module and that
<p>All global variables that are defined in an S(q,E) Python module and that
are prefixed with "g_" (for "global") are made available as settable parameters
in the convolution dialog and as fit parameters for the convolution fitter.</p>
......@@ -42,7 +42,7 @@ def TakinSqw(h, k, l, E):
of the source code distribution):
<code><pre>
#
# Sample Python S(q,w) module for (anti-)ferromagnetic dispersions
# Sample Python S(q,E) module for (anti-)ferromagnetic dispersions
#
# @author Tobias Weber <tobias.weber@tum.de>
# @license GPLv2
......
<html>
<head>
<title>Internal S(q,w) Models</title>
<title>Internal S(q,E) Models</title>
</head>
<body>
<h1>Internal S(q,w) Models</h1>
<h1>Internal S(q,E) Models</h1>
Internal S(q,w) models include the following:
Internal S(q,E) models include the following:
<h3>Elastic Model</h3>
<p>The elastic S(q,w) model consists of a list of elastic peaks which
<p>The elastic S(q,E) model consists of a list of elastic peaks which
are used to simulate Bragg tails. Each line defines a peak, with the
columns of each line being: h, k, l, q width, E width, and S.</p>
......
......@@ -35,6 +35,19 @@
z. The third option also uses the crystal's rlu system, but with the x and y axis along the
Bragg reflexes chosen on the "Recip. Plane" tab in the Takin main window.</p>
<h3>Background information</h3>
<p>The resolution function of a triple-axis spectrometer is usually modelled employing Gaussian transmission functions
for the neutron-optical components (monochromator/analyser crystals, collimators, etc.), resulting in a
four-dimensional Gaussian distribution function for the instruments momentum transfer vector Q and energy transfer E.</p>
<p>The four-dimensional half-width at half-maximum (HWHM) hyper-surface of the resolution function, as described by the
resolution matrix, is a quadric, namely an ellipsoid in four dimensions (three dimensions for the Q vector and one
for E). The ellipsoid's principal axis radii and angles can be found via the eigenvalues and -vectors of the resolution
matrix.</p>
<p>More details can be found <a href="http://dx.doi.org/10.1107/S0567739475001088">here</a> or <a href="http://dx.doi.org/10.1016/j.nima.2014.03.019">here</a>.</p>
</body>
</html>
......@@ -14,10 +14,10 @@
<a href="reso.html" target="doc">Resolution Calculation</a> <br>
<a href="convo.html" target="doc">Resolution Convolution</a> <br>
<a href="fit.html" target="doc">Convolution Fitting</a> <br><br>
<a href="reso-sqw-py.html" target="doc">Python S(q,w) Models</a> <br>
<a href="reso-sqw-jl.html" target="doc">Julia S(q,w) Models</a> <br>
<a href="reso-sqw-native.html" target="doc">Native S(q,w) Models</a> <br>
<a href="reso-sqw.html" target="doc">Internal S(q,w) Models</a> <br>
<a href="reso-sqw-py.html" target="doc">Python S(q,E) Models</a> <br>
<a href="reso-sqw-jl.html" target="doc">Julia S(q,E) Models</a> <br>
<a href="reso-sqw-native.html" target="doc">Native S(q,E) Models</a> <br>
<a href="reso-sqw.html" target="doc">Internal S(q,E) Models</a> <br>
</body>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment