You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The neutronpy resolution code seems to expect arguments of the form pref(H, K, L, EXP, p) for the pref function, but the ResLib 3.4 manual says W should be included, as in pref(H, K, L, W, EXP, p). On the other hand, their source code omits the W argument and seems inconsistent with their documentation. Is there a need to be able to specify the energy-dependence for a pref function?
The text was updated successfully, but these errors were encountered:
The documentation of ResLib does not reflect its source code in this case. In the source only H,K,L are passed to the prefactor function, the relevant matlab source is
if isempty(pref)
prefactor=ones(modes,points);
bgr=0;
else
switch nargout(pref)
case 2
[prefactor,bgr]=feval(pref,H,K,L,EXP,p);
case 1
prefactor=feval(pref,H,K,L,EXP,p);
bgr=0;
otherwise
error('Fata error: invalid number or output arguments in prefactor function');
end
end;
Even in PrefDemo.m, where the documentation points to as the example of how this function should be defined, W is left out:
function [prefactor,bgr]=PrefDemo(H,K,L,EXP,p)
From the ResLib documentation, the pref function is described as being a slowly varying function which does not change within a resolution ellipse. Although the equation P(Q,w,p) is used to represent this function, the examples for the function are given as a magnetic form factor or polarization factor, which are static.
I took this to mean that the pref function should have no energy dependence and left out W as an argument.
That being said, if you can think of a situation in which having W is necessary in the pref function, it should be fairly trivial to make this change without breaking anything.
The neutronpy resolution code seems to expect arguments of the form pref(H, K, L, EXP, p) for the pref function, but the ResLib 3.4 manual says W should be included, as in pref(H, K, L, W, EXP, p). On the other hand, their source code omits the W argument and seems inconsistent with their documentation. Is there a need to be able to specify the energy-dependence for a pref function?
The text was updated successfully, but these errors were encountered: