# Resolution Convolution

In order to plan an experiment or to get an overview before using the more involved convolution fitter, a live Monte-Carlo convolution can be performed by selecting "Resolution" -> "Convolution..." in the menu bar.

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:

(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. These files are the ones that are defined in the Takin main window and in the "Resolution Parameters" dialog. Instead of manually defining a crystal and a scan direction, the relevant parameters can be automatically 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.

(3): The S(q,w) model is a user-provided theoretical formula or algorithm for the physical system to be measured. It can be either provided as a Python or a Julia script, or as a native plugin. Several simple S(q,w) models are included internally 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.

(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").