LiNiO₂ on ECHIDNA¶
Fit the layered oxide LiNiO₂ to constant-wavelength neutron powder data from ECHIDNA at ANSTO. Li and Ni mix between two sites, held to full occupancy by constraints, and the profile has Finger-Cox-Jephcoat asymmetry.
The project is the catalogue case pd-neut-cwl_lmo-echidna, the one the command line and the
app's Examples open. Li and Ni share their sites through five relations (displacements and
occupancies), kept from the start.
Fitting
Single pd neut cwl Bragg
Crystal structure
import easydiffraction as edi
Load the project¶
project_path = edi.download_data('pd-neut-cwl_lmo-echidna', destination='data')
project = edi.Project.load(project_path)
structure = project.structures['lmo']
experiment = project.experiments['echidna']
project.display.constraints()
Data 'pd-neut-cwl_lmo-echidna' is at data/pd-neut-cwl_lmo-echidna-134fba941254/pd-neut-cwl_lmo-echidna
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('echidna')
Perform the analysis¶
The fit goes in stages, freeing one group of parameters at a time.
Scale, 2θ zero and cell¶
The scale, the zero shift and the two cell lengths put the peaks in place and at the right height.
experiment.linked_structures['lmo'].scale.free = True
experiment.instrument.calib_twotheta_offset.free = True
structure.cell.length_a.free = True
structure.cell.length_c.free = True
project.display.parameters.free()
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_lmo-echidna, 3002 pts fitted / 3200 loaded, 4 free
iter time (s) Rwp (%) reduced χ² change
29.38 81.99
1 0.003 11.32 12.18 85.1% ↓
2 0.006 8.05 6.16 49.4% ↓
3 0.009 8.05 6.16 0.1% ↓
4 0.013 8.05 6.16
done · converged · 4 iters · reduced χ² 6.16 · Rwp 8.05 % · 0.02 s
project.display.pattern('echidna')
Sample displacement and transparency¶
The sample sits a little off the diffractometer axis and the beam goes into it; both shift the peaks with angle, unlike the zero.
experiment.instrument.calib_sample_displacement.free = True
experiment.instrument.calib_sample_transparency.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_lmo-echidna, 3002 pts fitted / 3200 loaded, 6 free
iter time (s) Rwp (%) reduced χ² change
8.05 6.16
1 0.003 8.04 6.14 0.3% ↓
2 0.005 8.04 6.14
3 0.009 8.04 6.14
done · converged · 3 iters · reduced χ² 6.14 · Rwp 8.04 % · 0.01 s
project.display.pattern('echidna')
Background¶
The nine background points follow the level between the peaks.
for point in experiment.background:
point.intensity.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_lmo-echidna, 3002 pts fitted / 3200 loaded, 15 free
iter time (s) Rwp (%) reduced χ² change
8.04 6.16
1 0.005 6.46 3.98 35.4% ↓
2 0.008 6.46 3.98
3 0.012 6.46 3.98
done · converged · 3 iters · reduced χ² 3.98 · Rwp 6.46 % · 0.02 s
project.display.pattern('echidna')
Peak widths¶
experiment.peak.broad_gauss_u.free = True
experiment.peak.broad_gauss_v.free = True
experiment.peak.broad_gauss_w.free = True
experiment.peak.broad_lorentz_y.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_lmo-echidna, 3002 pts fitted / 3200 loaded, 19 free
iter time (s) Rwp (%) reduced χ² change
6.46 3.99
1 0.004 6.39 3.90 2.2% ↓
2 0.006 6.39 3.90
3 0.010 6.39 3.90
done · converged · 3 iters · reduced χ² 3.90 · Rwp 6.39 % · 0.01 s
project.display.pattern('echidna')
Oxygen position¶
O's height along c is the only coordinate the symmetry leaves free.
structure.atom_sites['O'].fract_z.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_lmo-echidna, 3002 pts fitted / 3200 loaded, 20 free
iter time (s) Rwp (%) reduced χ² change
6.39 3.90
1 0.005 6.20 3.67 5.9% ↓
2 0.008 6.20 3.67
3 0.012 6.20 3.67
done · converged · 3 iters · reduced χ² 3.67 · Rwp 6.20 % · 0.02 s
project.display.pattern('echidna')
Displacements¶
Li1's, Ni2's and O's; Ni1 and Li2 follow by the relations.
structure.atom_sites['Li1'].adp_iso.free = True
structure.atom_sites['Ni2'].adp_iso.free = True
structure.atom_sites['O'].adp_iso.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_lmo-echidna, 3002 pts fitted / 3200 loaded, 23 free
iter time (s) Rwp (%) reduced χ² change
6.20 3.67
1 0.004 5.36 2.75 25.0% ↓
2 0.007 5.31 2.70 2.0% ↓
3 0.010 5.31 2.70 0.1% ↓
4 0.015 5.31 2.70
done · converged · 4 iters · reduced χ² 2.70 · Rwp 5.31 % · 0.02 s
project.display.pattern('echidna')
Li/Ni mixing¶
Last, Li1's occupancy, which sets how much Ni sits on the Li site; it moves with the displacements, so it comes after them.
structure.atom_sites['Li1'].occupancy.free = True
project.analysis.fit()
project.display.fit.results()
edi fit: project pd-neut-cwl_lmo-echidna, 3002 pts fitted / 3200 loaded, 24 free
iter time (s) Rwp (%) reduced χ² change
5.31 2.70
1 0.005 5.01 2.40 11.1% ↓
2 0.008 4.99 2.39 0.5% ↓
3 0.011 4.99 2.39
4 0.016 4.99 2.39
done · converged · 4 iters · reduced χ² 2.39 · Rwp 4.99 % · 0.02 s
project.display.pattern('echidna')
project.display.fit.correlations()
project.display.structure('lmo')
Save the project¶
project.save_as('pd-neut-cwl_lmo-echidna')
project.report.save_html('pd-neut-cwl_lmo-echidna.html')
Saving project to 'pd-neut-cwl_lmo-echidna'
Saving report to 'pd-neut-cwl_lmo-echidna.html'