wifd_mic
Wifd_mic
Description: Bill David peak shape for GEM diffractometer
Contributed by: Originally by Bill David at Denver topas meeting, updated by John Evans January 2012
Original wifd_mic macro is included at the bottom of the page for legacy reasons. Suggest using the wifd_mic_new macro instead. This (January 2012) corrects a scaling inconsistency between the code and the manual. It should help convergence of tof peak shapes. In the specific example I tested the two peak shapes give equivalent fits in minimum.
macro wifd_mic_new(two_theta,two_thetav,tspow,tspowv,tauf_0,tauf_0v,tauf_1,tauf_1v,taus_0,taus_0v,taus_1,taus_1v,t_eff,t_effv,hhh,hhhv,double_pulse,double_pulsev) { local !two_theta two_thetav prm tspow tspowv min 1.5 max 5.5 prm tauf_0 tauf_0v min 0.001 prm tauf_1 tauf_1v min 0.01 prm taus_0 taus_0v min 0.001 prm taus_1 taus_1v min 0.001 prm t_eff t_effv min 90.0 prm hhh hhhv min .001 prm double_pulse double_pulsev min 0.001 local !lam = 2 D_spacing Sin(0.00872664626 two_theta) ; user_defined_convolution = X^tspow Exp(-X / (tauf_0 + tauf_1 lam )); min 0 max = 10 (tauf_0 + tauf_1 lam ); local !storage = Exp( -950 /(t_eff lam^2)) hhh; push_peak hat = double_pulse ; scale_top_peak = (1-storage); bring_2nd_peak_to_top exp_conv_const = -Ln(0.001) / (taus_0 + taus_1 / lam^2); scale_top_peak = storage; add_pop_1st_2nd_peak }
macro wifd_mic(two_theta,two_thetav,tspow,tspowv,tauf_0,tauf_0v,tauf_1,tauf_1v,taus_0,taus_0v,taus_1,taus_1v,t_eff,t_effv,hhh,hhhv,double_pulse,double_pulsev) { local !two_theta two_thetav prm tspow tspowv min 1.5 max 5.5 prm tauf_0 tauf_0v min 0.001 prm tauf_1 tauf_1v min 0.01 prm taus_0 taus_0v min 0.001 prm taus_1 taus_1v min 0.001 prm t_eff t_effv min 90.0 prm hhh hhhv min .001 prm double_pulse double_pulsev min 0.001 local !lam = 2 D_spacing Sin(0.00872664626 two_theta) ; user_defined_convolution = X^tspow Exp(-X / (tauf_0 + tauf_1 lam )); min 0 max = 10 (tauf_0 + tauf_1 lam ); local !storage = Exp( -950 /(t_eff lam^2)) hhh; push_peak hat = double_pulse ; scale_top_peak = (1-storage)/double_pulse; bring_2nd_peak_to_top exp_conv_const = -Ln(0.001) / (taus_0 + taus_1 / lam^2); scale_top_peak = storage/double_pulse; add_pop_1st_2nd_peak }
Some untested/caveat emptor parameters to get you going for the 6 banks on gem are:
local !bank_two_theta 91.3 wifd_mic_new(two_theta, =bank_two_theta;, !tspow, 3.34670, !tauf_0, 1.13998, !tauf_1, 1.07527, !taus_0, 0.02876, !taus_1, 0.01314, !t_eff, 234.52357, !hhh, 0.02063, !double_pulse, 0.07775)
wifd_mic.txt · Last modified: 2022/11/03 15:08 by 127.0.0.1