neutronpy.instrument.TripleAxisInstrument.resolution_convolution_SMA¶
-
TripleAxisInstrument.
resolution_convolution_SMA
(sqw, pref, nargout, hkle, METHOD='fix', ACCURACY=None, p=None, seed=None)[source]¶ Numerically calculate the convolution of a user-defined single-mode cross-section function with the resolution function for a 3-axis neutron scattering experiment.
Parameters: - sqw : func
User-supplied “fast” model cross section.
- pref : func
User-supplied “slow” cross section prefactor and background function.
- nargout : int
Number of arguments returned by the pref function
- hkle : tup
Tuple of H, K, L, and W, specifying the wave vector and energy transfers at which the convolution is to be calculated (i.e. define $mathbf{Q}_0$). H, K, and L are given in reciprocal lattice units and W in meV.
- EXP : obj
Instrument object containing all information on experimental setup.
- METHOD : str
Specifies which 3D-integration method to use. ‘fix’ (Default): sample the cross section on a fixed grid of points uniformly distributed $phi$-space. 2*ACCURACY[0]+1 points are sampled along $phi_1$, and $phi_2$, and 2*ACCURACY[1]+1 along $phi_3$ (vertical direction). ‘mc’: 3D Monte Carlo integration. The cross section is sampled in 1000*ACCURACY randomly chosen points, uniformly distributed in $phi$-space.
- ACCURACY : array(2) or int
Determines the number of sampling points in the integration.
- p : list
A parameter that is passed on, without change to sqw and pref.
Returns: - conv : array
Calculated value of the cross section, folded with the resolution function at the given $mathbf{Q}_0$
Notes
Translated from ResLib 3.4c, originally authored by A. Zheludev, 1999-2007, Oak Ridge National Laboratory