Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
time_of_flight_tof_peak_fitting [2011/08/25 19:15]
alancoelho
time_of_flight_tof_peak_fitting [2017/12/16 17:26]
johnsoevans
Line 1: Line 1:
 ====== Time of Flight Peak Shape Fitting ====== ====== Time of Flight Peak Shape Fitting ======
-Topas doesn'​t have a built in way of fitting individual peaks in time of flight neutron data.  However you can fool it with the macro below which adds a Pawley hkl_Is phase with a single peak position The two numbers in the macro are the d-spacing of the peak and its intensity. ​ You can change @ symbols for parameter names. ​ The advantage of this method is that it uses the full tof convolutions which might be necessary for accurate peak shapes and therefore positions. ​ Alan's methods below don't use these convolutions.+====== Using hkl_Is phase ====== 
 + 
 +Pawley hkl_Is phase with a single peak can be inserted. The two numbers in the macro are the d-spacing of the peak and its intensity. ​ You can change @ symbols for parameter names. ​ The advantage of this method is that it uses the full tof convolutions which might be necessary for accurate peak shapes and therefore positions. ​ Alan's methods below don't use these convolutions.
  
 <code topas>​prm lor 0.54006` <code topas>​prm lor 0.54006`
Line 12: Line 14:
 If_Prm_Eqn_Rpt(p1,​ v1, min =0.9*v1; max =1.1*v1;) If_Prm_Eqn_Rpt(p1,​ v1, min =0.9*v1; max =1.1*v1;)
 If_Prm_Eqn_Rpt(p2,​ v2, min .000000000001 max 1e9) If_Prm_Eqn_Rpt(p2,​ v2, min .000000000001 max 1e9)
-hkl_Is phase_name CeV(p1,v1) a =10*CeV(p1,​v1);​ b 0.1 c 0.1 space_group "​P1"​ load hkl_m_d_th2 I { 10 0 0 1 =CeV(p1,​v1); ​80114.92 =CeV(p2,​v2);​ }+hkl_Is phase_name CeV(p1,v1) a =10*CeV(p1,​v1);​ b 0.1 c 0.1 space_group "​P1"​ load hkl_m_d_th2 I { 10 0 0 1 0.0 80114.92 =CeV(p2,​v2);​ }
 peak_type pv pv_lor =lor; pv_fwhm = dsp*CeV(p1,​v1) + dspsq*CeV(p1,​v1)^2;​ peak_type pv pv_lor =lor; pv_fwhm = dsp*CeV(p1,​v1) + dspsq*CeV(p1,​v1)^2;​
 } }
 </​code>​ </​code>​
 +
 +[Note changed =CeV(p1,​v1);​ to 0.0 after hklm values in macro as was getting crash in topas and d-spacing not needed/​reported]
  
 You can add a line like the one below to the macro to report tof: You can add a line like the one below to the macro to report tof:

Personal Tools