mantidproject / mslice

Source code for Mantid MSlice
http://mantidproject.github.io/mslice
1 stars 2 forks source link

Intensity display on slices: show chi''(q,w) #164

Closed mducle closed 6 years ago

mducle commented 7 years ago

There should be an option to display the intensity (colour) of slices as the dynamical susceptibility chi''(Q,E) instead of the scattering function S(Q,E). The two are related by the fluctuation-dissipation theorem, which is given here as:

chi''(Q,E) = PI * (1/<n+1>) * S(Q,E)

for neutron energy loss (positive energy transfer), where the thermal population factor 1/<n+1> is (1 - exp(-|E|/(kB.T))). For neutron energy gain (negative energy transfer), instead

chi''(Q,E) = PI * (1/<n>) * S(Q,E)

should be used where 1/<n>=(exp(|E|/(kB.T))-1) [note the positive sign in the exponent and also that the modulus of the energy should be used (because we are thinking in terms of the energy of the excited magnon or phonon quasiparticles and not the neutron's energy)]. E.g.

chi''(Q,E) = PI * (1-exp(-E/(kB.T))) * S(Q,E)       for E>=0
chi''(Q,E) = PI * (exp(abs(E)/(kB.T))-1) * S(Q,E)       for E<0

S(Q,E) is usually in units of milibarn/sr/meV/f.u. (where f.u. is a formula unit of material studied). Since the other factors are dimensionless, chi''(Q,E) in this case is also in the same units as S(Q,E). Although the stated use of this conversion is to compare with theoretical calculations in absolute units, this is almost only ever done for magnetic scattering (see below). For lattice dynamics, the calculations will need to be scaled by some factor to match the chi''(Q,E) shown here, and rather the use of this conversion is mainly instead to remove the temperature dependence of the scattering (thermal population factor of the phonons). If the color axis is labelled, it should be labelled with (arb. units).

For magnetic scattering, however, because there is a total magnetic cross-section which depends on the magnetic moment, this can be factored out, yielding a dynamical susceptibility in absolute units. These units are mu_B^2/meV/sr/f.u.. The conversion in this case is:

chi''(Q,E) * |F(Q)|^2 = [1/((gamma * r_e / 2)^2) * PI * (1/<n+1/2+/-1/2>) * S(Q,E) ] * (uB^2)

where <n+1/2+/-1/2> is the factor <n+1> or <n> described above for the cases of E>=0 or E<0; u_B is the Bohr magneton, and the quantity (gamma * r_e / 2)^2=(-0.54e-14 m)^2 = 291 milibarns is the total neutron cross-section for a moment of one bohr magneton (note gamma=-3.826 is the nuclear gyromagnetic ratio and r_e=2.818e-15 m is the classical electron radius).

We keep the factor (uB^2) in the units, so the only change from the non-magnetic case is to divide the intensity further by 291 milibarns. The axis should now be labelled \chi''(Q,E) |F(Q)|^2 (\mu_B meV^{-1} sr^{-1} f.u.^{-1}.


The conversion should be applied to the plotted slice only (can be done directly on the numpy array, or on the MDHistoWorkspace), but it needs access to the energy transfer information to calculate the thermal population factor.

There should be a menu option Intensity with a set of radio options. The default is S(Q,E) which means that the workspace should be plot as it is. This issue adds to other options:

  1. chi''(Q,E)
  2. chi''(Q,E) magnetic

If the user selects one of these, unless the intensity data is already in this form, mslice should convert the intensity using the above relationships, and then modify the plot and the color axis label.

MatthewBowles commented 7 years ago

@mducle Should we just use the temperature from the sample logs, or should we allow the user to enter a temperature value?

mducle commented 7 years ago

Let's use the temperature from the logs if it exists - I think that nxspe files don't save this information, but nxs files do - and if it doesn't then have a pop-up dialog ask for the sample temperature.

MatthewBowles commented 7 years ago

@mducle Is this right: chi''(Q,E) magnetic = chi''(Q,E) / 291 (with different units on the axis?) Or do I also need to multiply by the square of the bohr magneton?

mducle commented 7 years ago

Yes. That's right. This is to ensure that the numbers out are still around unity rather than being of the order of 10^(-40).