Skip to content

CeO₂ on PEARL

Fitting  Single  pd  neut  tof  Bragg  Crystal structure

Fit the CeO₂ standard to time-of-flight neutron powder data from PEARL at ISIS: the calibration and the profile, with a polynomial background.

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

import easydiffraction as edi

Load the project

project_path = edi.download_data('pd-neut-tof_ceo2-pearl', destination='data')
project = edi.Project.load(project_path)
structure = project.structures['ceo2']
experiment = project.experiments['pearl']
Data 'pd-neut-tof_ceo2-pearl' is at data/pd-neut-tof_ceo2-pearl-672773a1ed12/pd-neut-tof_ceo2-pearl

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('pearl')

Perform the analysis

The fit goes in stages, freeing one group of parameters at a time.

Scale and time-of-flight calibration

CeO₂ is the calibration standard, so its cell stays fixed and the DIFC terms put the peaks in place.

experiment.linked_structures['ceo2'].scale.free = True
experiment.instrument.calib_d_to_tof_offset.free = True
experiment.instrument.calib_d_to_tof_linear.free = True
experiment.instrument.calib_d_to_tof_quadratic.free = True
project.display.parameters.free()
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-tof_ceo2-pearl, 2237 pts fitted / 2524 loaded, 4 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                       14.21        27.74
      1      0.072     13.03        23.34   15.8% ↓
  done · converged · 1 iters · reduced χ² 23.34 · Rwp 13.03 % · 0.08 s
project.display.pattern('pearl')

Background

The six polynomial terms follow the level between the peaks.

for term in experiment.background_terms:
    term.coef.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-tof_ceo2-pearl, 2237 pts fitted / 2524 loaded, 10 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                       13.03        23.41
      1      0.079      6.73         6.24   73.4% ↓
  done · converged · 1 iters · reduced χ² 6.24 · Rwp 6.73 % · 0.09 s
project.display.pattern('pearl')

Gaussian widths

The Gaussian terms that grow with d spacing.

experiment.peak.broad_gauss_sigma_1.free = True
experiment.peak.broad_gauss_sigma_2.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-tof_ceo2-pearl, 2237 pts fitted / 2524 loaded, 12 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                        6.73         6.24
      1      0.077      6.27         5.43   13.0% ↓
  done · converged · 1 iters · reduced χ² 5.43 · Rwp 6.27 % · 0.09 s
project.display.pattern('pearl')

Lorentzian width

The Lorentzian term that grows with d spacing.

experiment.peak.broad_lorentz_gamma_1.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-tof_ceo2-pearl, 2237 pts fitted / 2524 loaded, 13 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                        6.27         5.43
      1      0.087      6.19         5.30   2.5% ↓
  done · converged · 1 iters · reduced χ² 5.30 · Rwp 6.19 % · 0.10 s
project.display.pattern('pearl')

Rise and decay

The back-to-back exponentials that shape each time-of-flight peak.

experiment.peak.rise_alpha_1.free = True
experiment.peak.decay_beta_0.free = True
experiment.peak.decay_beta_1.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-tof_ceo2-pearl, 2237 pts fitted / 2524 loaded, 16 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                        6.19         5.30
      1      0.076      5.67         4.44   16.3% ↓
  done · converged · 1 iters · reduced χ² 4.44 · Rwp 5.67 % · 0.09 s
project.display.pattern('pearl')

Displacements

structure.atom_sites['Ce'].adp_iso.free = True
structure.atom_sites['O'].adp_iso.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-tof_ceo2-pearl, 2237 pts fitted / 2524 loaded, 18 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                        5.67         4.44
      1      0.082      5.29         3.88   12.7% ↓
  done · converged · 1 iters · reduced χ² 3.88 · Rwp 5.29 % · 0.09 s
project.display.pattern('pearl')

Absorption

Absorption weakens the intensities with time of flight, as the displacements do, so it comes after them, on its own.

experiment.absorption.abscor1.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-tof_ceo2-pearl, 2237 pts fitted / 2524 loaded, 19 free
   iter   time (s)   Rwp (%)  reduced χ²   change
                        5.29         3.88
      1      0.071      5.29         3.88   
  done · converged · 1 iters · reduced χ² 3.88 · Rwp 5.29 % · 0.08 s
project.display.pattern('pearl')
project.display.fit.correlations()
project.display.structure('ceo2')

Save the project

project.save_as('pd-neut-tof_ceo2-pearl')
project.report.save_html('pd-neut-tof_ceo2-pearl.html')
Saving project to 'pd-neut-tof_ceo2-pearl'
Saving report to 'pd-neut-tof_ceo2-pearl.html'