Fitting PD-NEUT-CW
LBCO-HRPT¶
This example shows how to refine the crystal structure parameters of La0.5Ba0.5CoO3 from neutron diffraction data in a constant wavelength experiment performed on HRPT diffractometer at PSI.
Import¶
In [2]:
Copied!
import easydiffraction as ed
import easydiffraction as ed
Job¶
Create a job — the main object to store all the information
In [3]:
Copied!
job = ed.Job()
job = ed.Job()
Model¶
Load a phase from CIF file
In [4]:
Copied!
job.add_phase_from_file('data/lbco.cif')
print(job.phases)
job.add_phase_from_file('data/lbco.cif')
print(job.phases)
Collection of 1 phases: ['lbco']
Show phase info in CIF format
In [5]:
Copied!
phase = job.phases['lbco']
print(phase.cif)
phase = job.phases['lbco']
print(phase.cif)
data_lbco _cell_length_a 3.88 _cell_length_b 3.88 _cell_length_c 3.88 _cell_angle_alpha 90.00000000 _cell_angle_beta 90.00000000 _cell_angle_gamma 90.00000000 _space_group_name_H-M_ref 'P m -3 m' loop_ _atom_site_label _atom_site_type_symbol _atom_site_fract_x _atom_site_fract_y _atom_site_fract_z _atom_site_occupancy _atom_site_adp_type _atom_site_B_iso_or_equiv La La 0.00000000 0.00000000 0.00000000 0.5 Biso 0.49 Ba Ba 0.00000000 0.00000000 0.00000000 0.5 Biso 0.49 Co Co 0.5 0.5 0.5 1.00000000 Biso 0.26 O O 0.00000000 0.5 0.5 1.00000000 Biso 1.4
Display the crystal structure of a given model
In [6]:
Copied!
job.show_crystal_structure(id='lbco')
job.show_crystal_structure(id='lbco')
You appear to be running in JupyterLab (or JavaScript failed to load for some other reason). You need to install the 3dmol extension:
jupyter labextension install jupyterlab_3dmol
Experiment¶
Load experimentally measured data from a file in XYE format
In [7]:
Copied!
job.add_experiment_from_file('data/hrpt.xye')
job.add_experiment_from_file('data/hrpt.xye')
Display the experimentally measured data
In [8]:
Copied!
job.show_experiment_chart()
job.show_experiment_chart()