Skip to content

YAlO₃ and Al₂O₃ on SPODI

Fit two phases, YAlO₃ and corundum Al₂O₃, in one constant-wavelength neutron pattern from SPODI at FRM II, measured at 3 K, with a shared Bérar-Baldinozzi profile and cylinder absorption.

The project is the catalogue case pd-neut-cwl_yalo3-al2o3-spodi, the one the command line and the app's Examples open.

Fitting Single pd neut cwl Bragg Crystal structure

import easydiffraction as edi

Load the project

project_path = edi.download_data('pd-neut-cwl_yalo3-al2o3-spodi', destination='data')
project = edi.Project.load(project_path)
yalo3 = project.structures['YAlO3']
alumina = project.structures['Al2O3']
experiment = project.experiments['spodi']
Data 'pd-neut-cwl_yalo3-al2o3-spodi' is at data/pd-neut-cwl_yalo3-al2o3-spodi-5ae8d5ec72da/pd-neut-cwl_yalo3-al2o3-spodi

The project marks what its fit frees. The fit below frees it in stages, so start with all of it fixed.

for parameter in project.free_parameters:
    parameter.free = False
project.display.pattern('spodi')

Perform the analysis

The fit follows diffraction-lib's three cycles for this case (its YAP tutorial). diffraction-lib frees the Lorentzian Y and two asymmetry terms where this profile has the mixing η₀ and four.

Cells, scales and 2θ zero

Both phases' cells and scales, and the zero shift, put the peaks of both phases in place.

yalo3.cell.length_a.free = True
yalo3.cell.length_b.free = True
yalo3.cell.length_c.free = True
alumina.cell.length_a.free = True
alumina.cell.length_c.free = True
experiment.linked_structures['YAlO3'].scale.free = True
experiment.linked_structures['Al2O3'].scale.free = True
experiment.instrument.calib_twotheta_offset.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_yalo3-al2o3-spodi, 2959 pts fitted / 2959 loaded, 8 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                       18.59       201.52
      1      0.008     13.43       105.14   47.8% ↓
      2      0.015     13.38       104.44   0.7% ↓
      3      0.022     13.38       104.43   
      4      0.029     13.38       104.43   
      5      0.036     13.38       104.42   
      6      0.042     13.38       104.42   
      7      0.049     13.38       104.42   
      8      0.059     13.38       104.42   
  done · converged · 8 iters · reduced χ² 104.42 · Rwp 13.38 % · 0.07 s
project.display.pattern('spodi')

Background

for point in experiment.background:
    point.intensity.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_yalo3-al2o3-spodi, 2959 pts fitted / 2959 loaded, 33 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                       13.38       105.32
      1      0.038     11.96        84.08   20.2% ↓
      2      0.054     11.96        84.08   
      3      0.064     11.96        84.07   
      4      0.073     11.96        84.07   
      5      0.084     11.96        84.06   
      6      0.092     11.96        84.06   
      7      0.102     11.96        84.06   
      8      0.110     11.96        84.06   
      9      0.120     11.96        84.06   
     10      0.157     11.96        84.06   
  done · converged · 10 iters · reduced χ² 84.06 · Rwp 11.96 % · 0.17 s
project.display.pattern('spodi')

Peak widths

The Gaussian widths and the mixing η₀.

experiment.peak.broad_gauss_u.free = True
experiment.peak.broad_gauss_v.free = True
experiment.peak.broad_gauss_w.free = True
experiment.peak.mixing_eta_0.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_yalo3-al2o3-spodi, 2959 pts fitted / 2959 loaded, 37 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                       11.96        84.18
      1      0.038     11.47        77.42   8.0% ↓
      2      0.047     11.46        77.33   0.1% ↓
      3      0.057     11.46        77.33   
      4      0.074     11.46        77.33   
      5      0.082     11.46        77.33   
      6      0.093     11.46        77.33   
      7      0.102     11.46        77.32   
      8      0.140     11.46        77.32   
  done · converged · 8 iters · reduced χ² 77.32 · Rwp 11.46 % · 0.15 s
project.display.pattern('spodi')

Asymmetry

The four Bérar-Baldinozzi asymmetry terms.

experiment.peak.asym_beba_a0.free = True
experiment.peak.asym_beba_b0.free = True
experiment.peak.asym_beba_a1.free = True
experiment.peak.asym_beba_b1.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_yalo3-al2o3-spodi, 2959 pts fitted / 2959 loaded, 41 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                       11.46        77.43
      1      0.036     11.30        75.33   2.7% ↓
      2      0.045     11.28        75.05   0.4% ↓
      3      0.055     11.28        74.99   0.1% ↓
      4      0.064     11.28        74.99   
      5      0.072     11.28        74.99   
      6      0.106     11.28        74.99   
  done · converged · 6 iters · reduced χ² 74.99 · Rwp 11.28 % · 0.12 s
project.display.pattern('spodi')

Atom positions

The coordinates the symmetry leaves free in both phases.

yalo3.atom_sites['Y'].fract_x.free = True
yalo3.atom_sites['Y'].fract_y.free = True
yalo3.atom_sites['O1'].fract_x.free = True
yalo3.atom_sites['O1'].fract_y.free = True
yalo3.atom_sites['O2'].fract_x.free = True
yalo3.atom_sites['O2'].fract_y.free = True
yalo3.atom_sites['O2'].fract_z.free = True
alumina.atom_sites['Al1'].fract_z.free = True
alumina.atom_sites['O1'].fract_x.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_yalo3-al2o3-spodi, 2959 pts fitted / 2959 loaded, 50 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                       11.28        75.22
      1      0.043      6.52        25.17   66.5% ↓
      2      0.056      6.46        24.71   1.8% ↓
      3      0.077      6.46        24.70   
      4      0.091      6.46        24.69   
      5      0.104      6.46        24.69   
      6      0.117      6.46        24.69   
      7      0.130      6.46        24.69   
      8      0.144      6.46        24.69   
      9      0.156      6.46        24.69   
     10      0.169      6.46        24.69   
     11      0.182      6.46        24.69   
     12      0.195      6.46        24.69   
     13      0.207      6.46        24.69   
     14      0.224      6.46        24.69   
     15      0.262      6.46        24.69   
  done · converged · 15 iters · reduced χ² 24.69 · Rwp 6.46 % · 0.28 s
project.display.pattern('spodi')

Displacements

Every site's displacement in both phases.

for structure in (yalo3, alumina):
    for site in structure.atom_sites:
        site.adp_iso.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_yalo3-al2o3-spodi, 2959 pts fitted / 2959 loaded, 56 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                        6.46        24.74
      1      0.045      4.13        10.13   59.0% ↓
      2      0.060      4.06         9.79   3.4% ↓
      3      0.075      4.06         9.77   0.1% ↓
      4      0.089      4.06         9.77   
      5      0.103      4.06         9.77   
      6      0.118      4.06         9.77   
      7      0.132      4.06         9.76   
      8      0.146      4.06         9.76   0.1% ↓
      9      0.159      4.05         9.74   0.1% ↓
     10      0.171      4.05         9.73   0.1% ↓
     11      0.185      4.05         9.73   
     12      0.198      4.05         9.73   
     13      0.211      4.05         9.73   
     14      0.223      4.05         9.73   
     15      0.266      4.05         9.73   
  done · converged · 15 iters · reduced χ² 9.73 · Rwp 4.05 % · 0.28 s
project.display.pattern('spodi')
project.display.fit.correlations()
project.display.structure('YAlO3')
project.display.structure('Al2O3')

Save the project

project.save_as('pd-neut-cwl_yalo3-al2o3-spodi')
project.report.save_html('pd-neut-cwl_yalo3-al2o3-spodi.html')
Saving project to 'pd-neut-cwl_yalo3-al2o3-spodi'
Saving report to 'pd-neut-cwl_yalo3-al2o3-spodi.html'