Warning: Trying to access array offset on value of type null in /home/site/wwwroot/lib/plugins/move/action/rename.php on line 42

Warning: Cannot modify header information - headers already sent by (output started at /home/site/wwwroot/lib/plugins/move/action/rename.php:42) in /home/site/wwwroot/inc/actions.php on line 38
robust_refinement_xye [topas wiki]

User Tools

Site Tools


robust_refinement_xye

Differences

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

Link to this comparison view

Next revision
Previous revision
robust_refinement_xye [2009/11/18 15:52] – created dch3slrobust_refinement_xye [2022/11/03 15:08] (current) – external edit 127.0.0.1
Line 1: Line 1:
 +====== Robust_refinement_xye ======
 +Description: Robust refinements in topas
 +
 +Contributed by: Kevin H. Stone, Saul H. Lapidus and Peter W. Stephens
 +
 +Reference: J. Appl. Cryst. (2009). 42, 385–391; "Implementation and use of robust refinement in powder diffraction in the presence of impurities"
 +
 +<code topas>macro Robust_refinement_xye
 +{
 +/*Rescale peaks according to robust refinement algorithm*/
 +
 +r_exp 4.390
 +prm test = Get(r_exp); 
 +prm N = (1/test)^2; 
 +prm !p0  =0.40007404;
 +prm !p1  =-2.5949286;
 +prm !p2  =4.3513542;
 +prm !p3  =-1.7400101;
 +prm !p4  =3.6140845 * 10^-1;
 +prm !p5  =-4.5247609 * 10^-2;
 +prm !p6  =3.5986364 * 10^-3;
 +prm !p7  =-1.8328008 * 10^-4;
 +prm !p8  =5.7937184 * 10^-6;
 +prm !p9  =-1.035303 * 10^-7;
 +prm !p10 =7.9903166 * 10^-10;
 +prm t = ((Yobs - Ycalc)/SigmaYobs);
 +prm testjohn = If( t < 0.8,
 +               (1/Max(SigmaYobs^2, 1))*N,
 +               If(t < 21, N*((((((((((p10*t + p9)*t + p8)*t + p7)
 +               *t + p6)*t + p5)*t + p4)*t + p3)
 +               *t + p2)*t + p1)*t +p0)/(Yobs - Ycalc)^2,
 +               N*(2.0131 * Ln(t) + 3.9183)/(Yobs - Ycalc)^2));
 +weighting = If( t < 0.8,
 +              (1/Max(SigmaYobs^2, 1))*N,
 +              If(t < 21, N*((((((((((p10*t + p9)*t + p8)*t + p7)
 +              *t + p6)*t + p5)*t + p4)*t + p3)
 +              *t + p2)*t + p1)*t +p0)/(Yobs - Ycalc)^2,
 +              N*(2.0131 * Ln(t) + 3.9183)/(Yobs - Ycalc)^2));
 +recal_weighting_on_iter
 +}</code>
 +
 +<code topas>macro Robust_refinement_poisson
 +{
 +'Rescale peaks according to robust refinement algorithm
 +'N.B. changed SigmaYobs to Yobs^0.5
 +r_exp 4.390
 +prm test = Get(r_exp); 
 +prm N = (1/test)^2; 
 +prm !p0  =0.40007404;
 +prm !p1  =-2.5949286;
 +prm !p2  =4.3513542;
 +prm !p3  =-1.7400101;
 +prm !p4  =3.6140845 * 10^-1;
 +prm !p5  =-4.5247609 * 10^-2;
 +prm !p6  =3.5986364 * 10^-3;
 +prm !p7  =-1.8328008 * 10^-4;
 +prm !p8  =5.7937184 * 10^-6;
 +prm !p9  =-1.035303 * 10^-7;
 +prm !p10 =7.9903166 * 10^-10;
 +prm t = ((Yobs - Ycalc)/Yobs^0.5);
 +prm testjohn = If( t < 0.8,
 +               (1/Max(Yobs, 1))*N,
 +               If(t < 21, N*((((((((((p10*t + p9)*t + p8)*t + p7)
 +               *t + p6)*t + p5)*t + p4)*t + p3)
 +               *t + p2)*t + p1)*t +p0)/(Yobs - Ycalc)^2,
 +               N*(2.0131 * Ln(t) + 3.9183)/(Yobs - Ycalc)^2));
 +weighting = If( t < 0.8,
 +              (1/Max(Yobs, 1))*N,
 +              If(t < 21, N*((((((((((p10*t + p9)*t + p8)*t + p7)
 +              *t + p6)*t + p5)*t + p4)*t + p3)
 +              *t + p2)*t + p1)*t +p0)/(Yobs - Ycalc)^2,
 +              N*(2.0131 * Ln(t) + 3.9183)/(Yobs - Ycalc)^2));
 +recal_weighting_on_iter
 +}</code>