tsdev / spinw

SpinW Matlab library for spin wave calculation
www.psi.ch/spinw
GNU General Public License v3.0
30 stars 35 forks source link

Bug: incorrect computation of instrument limits #69

Open mducle opened 1 year ago

mducle commented 1 year ago

The function sw_instrument has code which computes the kinematic limits of the detectors. Unfortunately it assumes that the detectors span the range of scatterings [thetaMin, 180-thetaMin] and allows only a single argument for this computation thetaMin.

In fact, it is not physically feasible for most spectrometers to cover up to 180 degrees scattering angle. Thus a thetaMax parameter should be allowed and the expressions in the code modified. In practice most instruments cover around 120-130 degrees in scattering angle, and some cover an even more restricted range of around 60 degrees.