Handling of units

Introduction

At present the QENS models library contains a set of models aimed to fit \(S(Q, \hbar\omega)\) quasielastic neutron scattering (QENS) data [1] . As there does not yet exist a standard format for \(S(Q,\hbar\omega)\) data, it remains a user task to write the appropriate loader to read the data. The library is unit agnostic and does not make any assumption about the units of the input data. As a consequence, if no additional information is given, any output parameter will be given in the same units as the input data. Further information and examples are given below. The QENS library also contains a few tools to help with converting units (see Convert_units.ipynb )

Dynamical structure factor

The dynamical structure factor \(S(Q,\hbar\omega)\) should be given in units of \([energy]^{-1}\) (\([E]^{-1}\)), although in many cases \(S(Q,\hbar\omega)\) is not obtained in absolute units and the fitted data will simply be given in arbitrary units. In this case, the global scaling factor used in the fitting model will also be just an arbitrary number and its units can be ignored. Otherwise, if the input data were carefully normalized and the dynamical structure factor is given in absolute units, then this scaling factor will also be given in \([E]^{-1}\) units.

Wavector transfer

The wavevector transfer \(Q\) has units of \([length]^{-1}\) (\([L]^{-1}\)). Typically this is given in Å-1, but it is not uncommon to use \(\text{nm}^{-1}\).

Energy exchange

The energy exchange, \(\hbar\omega\) (or \(\omega\) or \(\nu\) or \(\nu/c\)), has units of energy and is commonly expressed in \(\text{meV}\). However, many other units are also used in the literature. For example, for backscattering experiments it is quite usual to use \(\mu\text{eV}\) instead of \(\text{meV}\). It is also relatively common (especially when comparing with simulation data) to use just the angular frequency \(\omega\) (often given in \(\text{rad}\times\text{ps}^{-1}\) or \(\text{rad}\times\text{s}^{-1}\)) or the frequency \(\nu\) (often in \(\text{THz}\), but also in \(\text{GHz}\) or \(\text{Hz}\)). In this case the input units are of dimension \([time]^{-1}\) (\([t]^{-1}\)).

Output units

As said above, the units of the output parameters will correspond to the units of the input data. This implies that it remains the user responsibility to understand the nature of the parameters in each model in order to determine their units, and then to convert the output values to any other physical unit [2] . A few examples to show how this can be done are given below.

Lorentzian or Gaussian models

Let’s start with the most common case: \(S(Q, \hbar\omega)\) is in arbitrary units, \(Q\) is given in Å-1, and \(\hbar\omega\) is in \(\text{meV}\) and we are fitting a single Lorentzian. The three output parameters that we will get are:

  • the amplitude of the Lorentzian, scale, given in arbitrary units,

  • its position, center, given in \(\text{meV}\),

  • and its half-width at half-maximum, hwhm, also given in \(\text{meV}\).

It follows naturally that if the energy transfer is given in \(\mu\text{eV}\), then center and hwhm will be returned also in \(\mu\text{eV}\). Similarly if the input data contain \(S(Q, \omega)\) or \(S(Q, \nu)\) instead of \(S(Q, \hbar\omega)\), the frequency is given in \(\text{rad}\times\text{ps}^{-1}\) or \(\text{THz}\), respectively.

In this case, the standard unit conversion tables can be used to convert directly to the desired units, e.g.:

The same applies to the Gaussian model, with sigma replacing hwhm.

Self-diffusion coefficient

We can use as an example the simplest model, Brownian Translational Diffusion. This model has also three parameters. \(scale\) and \(center\) will be treated as above. The third parameter is the self-diffusion coefficient, \(D\), which is related to the half-width at half-maximum \(\Gamma\) of the Lorentzian function by the relation \(\Gamma = DQ^2\). Thus \(D = \Gamma/Q^2\) and its units will be \(E\times L^2\) if the input data was \(S(Q, \hbar\omega)\) or \(t^{-1}\times L^2\) if the input data was \(S(Q, \omega)\) or \(S(Q, \nu)\).

So if we fit \(S(Q, \hbar\omega)\) data with \(Q\) in Å-1 and \(\hbar\omega\) in \(\text{meV}\), \(D\) will be given in Å2 \(\times \text{meV}\). The output value can be converted to more standard units for the self-diffusion coefficient by noting that \(1\)\(= 10^{-10}\ \text{m}\) and that \(\hbar\omega = 1\ \text{meV}\) corresponds to \(\omega=1.519.10^{12}\ \text{rad}\times\text{s}^{-1}\), giving [3] :

\(1\)2 \(\times \text{meV} = 1.519\times 10^{-8} \text{m}^2/\text{s} = 1.519 \times 10^{-4} \text{cm}^2/\text{s} = 1.519\)2 \(/\text{ps}\)

If the energy transfer is given in \(\mu\text{eV}\) instead of \(\text{meV}\), then \(D\) will be obtained in Å2 \(\times\mu\text{eV}\), and we would need to apply:

\(1\)2 \(\times\mu\text{eV} = 1.519\times10^{-11} \text{m}^2/\text{s} = 1.519\times10^{-7} \text{cm}^2/\text{s} = 1.519\times10^{-3}\)2 \(/\text{ps}\)

If \(Q\) is in \(\text{nm}^{-1}\), then we would have \(D\) in \(\text{nm}^2\times \text{meV}\) or \(\text{nm}^2\times\mu\text{eV}\), and:

\(1 \text{nm}^2\times \text{meV} = 1.519\times10^{-6} \text{m}^2/\text{s} = 1.519\times10^{-2} \text{cm}^2/\text{s} = 151.9\)2 \(/\text{ps}\) \(1 \text{nm}^2\times\mu\text{eV} = 1.519\times10^{-9} \text{m}^2/\text{s} = 1.519\times10^{-5} \text{cm}^2/\text{s} = 1.519\times10^{-1}\)2 \(/\text{ps}\)

If the input data correspond to \(S(Q, \omega)\) with \(\omega\) in \(\text{rad}/\text{ps}\), then \(D\) will be obtained directly in Å2 \(/\text{ps}\) (if \(Q\) was in Å-1) or in \(\text{nm}^2/\text{ps}\) (if \(Q\) was in \(\text{nm}^{-1}\)).

Finally, if the input is \(S(Q, \nu)\) with \(\nu\) in \(\text{THz}\) and \(Q\) in Å-1, then \(D\) will be in Å2 \(\times \text{THz}\), and:

\(1\)2 \(\times \text{THz} = 6.283\times 10^{-12} \text{m}^2/\text{s} = 6.283\times 10^{-8} \text{cm}^2/\text{s} = 6.283\times 10^{-4}\)2 \(/\text{ps}\)

Naturally, the same unit conversions can be applied to the parameter \(D\) in the Chudley-Elliott, jump translational diffusion, or the Gaussian localized diffusion models, or in any other derived model where \(D\) represents a translational diffusion coefficient.

Distance parameters (e.g. jump length or radius)

They appear in many models, e.g. \(L\) in the Chudley-Elliott model for translational diffusion, or radius in the models of jumps among equivalent sites in a circle (simple or including a log-norm distribution) and isotropic rotational diffusion. They are in units of [\(L\)], i.e. the inverse of the units of \(Q\), so if the input contains \(Q\) in Å-1, then the output will be the length or radius in Å, while if \(Q\) was given in \(\text{nm}^{-1}\), they will be returned in \(\text{nm}\).

The same applies to the parameter \(\langle u_x^2\rangle\), quantifying the size of the region in which the particle is confined in the Gaussian model for localized diffusion [4] . In this case, \(\langle u_x^2\rangle\) is in units of \(L^2\), so typically the parameter returned by the model will be in Å2 (if \(Q\) was in Å-1) or in \(\text{nm}^2\) (if \(Q\) was in \(\text{nm}^{-1}\)).

Time parameters

At present, the only time parameter appearing in the library of models is the residence time in a given site, called resTime in the jump translational diffusion and jump between equivalent sites in a circle (both simple or using a log-norm distribution or residence times) models. Its unit is naturally in terms of time (\(t\)), but if the input data correspond to \(S(Q, \hbar\omega)\), the resulting residence time will be given in \(E^{-1}\) units. Therefore, in the most common case where we have experimental data with the energy transfer given in \(\text{meV}\), the fit will give us a residence time \(\tau\) in \(\text{meV}^{-1}\) which can be easily transformed to time units:

\[1 \text{meV}^{-1} = 6.583\times 10^{-13} \text{s} = 0.6583 \text{ps}\]

Rotational diffusion coefficient

At present, this parameter appears only in the isotropic rotational diffusion model. It is named DR and it will have units of \(E\) if the input is \(S(Q, \hbar\omega)\), or \(t^{-1}\) if the input is \(S(Q, \omega)\). In the first case, the result can be converted to the expected inverse time units easily:

\[1 \text{meV} = 1.519\times 10^{12} \text{s}^{-1} = 1.519 \text{ps}^{-1}\]

Dimensionless parameters

Although they do not require any conversion, a few examples of dimensionless parameters are listed here:

  • A0, A1, A2 in models formed by the sum of several functions (e.g. delta_lorentz).

  • Nsites defining the number of sites in a circle, which should not be an adjustable parameter, in equivalent_sites_circle and jump_sites_log_norm_dist.

  • Sigma describing the width of the log-norm distribution in jump_sites_log_norm_dist.

Footnotes