Fixing Background

Alan Coelho 2017/05/18 18:01

Example use of first fitting a background, and then refining with the background fixed to refined values. The background refinement stage fits regions of the pattern that contain background only.

First Run determines background.

Second Run refines the structre with the background fixed.

num_runs 2

macro Bkg_Refine 
   {
      #if (Run_Number == 0)
         @
      #endif
   }

XDD(ceo2)

   bkg Bkg_Refine 0 0 0 0
   One_on_X(Bkg_Refine, 0)

   #if (Run_Number == 0)
      ' Weight non-background regions to zero
      weighting =
         If(Or(
            ' Regions that contain background only
            And(X >= 23.057, X <=  25.141),
            And(X >= 30.763, X <=  31.142),
            And(X >= 37.287, X <=  40.649),
            And(X >= 50.794, X <=  51.814),
            And(X >= 63.520, X <=  64.961),
            And(X >= 72.105, X <=  73.245),
            And(X >= 82.850, X <=  84.231),
            And(X >= 91.735, X <=  92.455),
            And(X >= 100.19, X <=  101.52),
            And(X >= 110.10, X <=  111.36),
            And(X >= 122.71, X <=  123.49),
            And(X >= 132.85, X <=  133.75)
            ),
            1 / Max(Yobs+1, 1),
            0
         );
   #else
      CuKa5(0.0001)
      Radius(173)
      LP_Factor(17)
      Full_Axial_Model(12, 20, 12, 5.1, @ 7)
      Divergence(1)
      Slit_Width(.1)
      bkg @ 0 0 0 0 0
      One_on_X(@, 1000)
      Zero_Error(@, 0)
      STR(Fm3m)
         phase_name CeO2
         scale @ 0.0014503208
         Cubic(@ 5.41)
         site  Ce1                       occ Ce+4  1 beq @  0.2028 
         site  O1  x 0.25 y 0.25 z 0.25  occ O-2   1 beq @  0.5959 
         CS_L(@, 300)
         Strain_L(@, 0.1)
   #endif

Personal Tools