| |
- builtins.object
-
- MultiPlotting
- Plotting
-
- PlottingSuperstructure
class MultiPlotting(builtins.object) |
|
MultiPlotting(crystal_list)
Plotting functions for the Multi-Crystal Object |
|
Methods defined here:
- __init__(self, crystal_list)
- Initialize self. See help(type(self)) for accurate signature.
- quick_intensity_cut(self, x_axis_crystal=[[1, 0, 0]], y_axis_crystal=[[0, 1, 0]], centre=[0, 0, 0], q_max=4.0, cut_width=0.05)
- Plot a cut through reciprocal space, visualising the intensity as different sized markers
x_axis = direction along x, in units of the reciprocal lattice (hkl)
y_axis = direction along y, in units of the reciprocal lattice (hkl)
centre = centre of the plot, in units of the reciprocal lattice (hkl)
q_max = maximum distance to plot to - in A-1
cut_width = width in height that will be included, in A-1
E.G. hk plot at L=3 for hexagonal system:
xtl.quick_intensity_cut([1,0,0],[0,1,0],[0,0,3])
hhl plot:
xtl.quick_intensity_cut([1,1,0],[0,0,1],[0,0,0])
- simulate_intensity_cut(self, x_axis_crystal=[[1, 0, 0]], y_axis_crystal=[[0, 1, 0]], centre=[0, 0, 0], q_max=4.0, cut_width=0.05, background=0.0, peak_width=0.05)
- Plot a cut through reciprocal space, visualising the intensity
x_axis_crystal = list of crytal x-directions in (hkl), for each crystal
y_axis_crystal = list of crytal y-directions in (hkl), for each crystal
centre = centre of the plot, in units of the reciprocal lattice (hkl) of crystal 1
q_max = maximum distance to plot to - in A-1
cut_width = width in height that will be included, in A-1
background = average background value
peak_width = reflection width in A-1
E.G. hk plot at L=3 for hexagonal system (xtl1) with xtl2 oriented with the (110) alond xtl1's (100):
xtls = multi_crystal([xtl1,xtl2])
xtl.simulate_intensity_cut([[1,0,0],[1,1,0]],[[0,1,0],[0,0,1]],[0,0,3])
- simulate_powder(self, energy_kev=8.0, peak_width=0.01, background=0, powder_average=True)
- Generates a powder pattern for multiple phases
see classes_scattering.generate_powder
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class Plotting(builtins.object) |
|
Plotting(xtl)
Plotting functions for the Crystal Object |
|
Methods defined here:
- __init__(self, xtl)
- Initialize self. See help(type(self)) for accurate signature.
- axis_reciprocal_lattice_lines(self, x_axis=(1, 0, 0), y_axis=(0, 1, 0), centre=(0, 0, 0), q_max=4.0, cut_width=0.05, axes=None, *args, **kwargs)
- Add lines to the current axis showing the reciprocal lattice
:param x_axis: direction along x, in units of the reciprocal lattice (hkl)
:param y_axis: direction along y, in units of the reciprocal lattice (hkl)
:param centre: centre of the plot, in units of the reciprocal lattice (hkl)
:param q_max: maximum distance to plot to - in A-1
:param cut_width: width in height that will be included, in A-1
:param axes: None for plt.gca() or axis of choice
:param args: argments to pass to plot function, e.g. linewidth, alpha, color
:return: None
- axis_reciprocal_lattice_points(self, axes=None, x_axis=(1, 0, 0), y_axis=(0, 1, 0), centre=(0, 0, 0), q_max=4.0, cut_width=0.05, **kwargs)
- Add lines to the current axis showing the reciprocal lattice
:param axes: None for plt.gca() or axis of choice
:param x_axis: direction along x, in units of the reciprocal lattice (hkl)
:param y_axis: direction along y, in units of the reciprocal lattice (hkl)
:param centre: centre of the plot, in units of the reciprocal lattice (hkl)
:param q_max: maximum distance to plot to - in A-1
:param cut_width: width in height that will be included, in A-1
:param kwargs: keyword arguments to pass to plt.plot(..., **kwargs)
:return: None
- axis_reciprocal_lattice_vectors(self, axes=None, x_axis=(1, 0, 0), y_axis=(0, 1, 0), centre=(0, 0, 0), q_max=4.0, cut_width=0.05)
- Add lines to the current axis showing the reciprocal lattice
:param axes: None for plt.gca() or axis of choice
:param x_axis: direction along x, in units of the reciprocal lattice (hkl)
:param y_axis: direction along y, in units of the reciprocal lattice (hkl)
:param centre: centre of the plot, in units of the reciprocal lattice (hkl)
:param q_max: maximum distance to plot to - in A-1
:param cut_width: width in height that will be included, in A-1
:return: None
- plot_3Dlattice(self, q_max=4.0, x_axis=[1, 0, 0], y_axis=[0, 1, 0], centre=[0, 0, 0], cut_width=0.05)
- Plot lattice points in 3D
- plot_3Dpolarisation(self, hkl, energy_kev=None, polarisation='sp', azim_zero=[1, 0, 0], psi=0)
- Plots the scattering vectors for a particular azimuth
:param hkl:
:param energy_kev:
:param polarisation:
:param azim_zero:
:param psi:
:return: None
- plot_crystal(self, show_labels=False)
- Plot the atomic cell in 3D
Click and drag to rotate the structure in 3D
Atoms are coloured according to their label
set show_labels=True to show the label of each sphere
- plot_diffractometer_reciprocal_space(self, energy_kev, delta=0, gamma=0)
- Plot diffractometer angles using orientation
:param energy_kev:
:param delta:
:param gamma:
:return: None
- plot_exchange_paths(self, cen_idx, nearest_neighbor_distance=6.6, exchange_type='O', bond_angle=90.0, search_in_cell=True, group_neighbors=True, disp=False)
- Calcualtes exchange paths and adds them to the crystal structure plot
:param cen_idx: index of central ion in xtl.Structure
:param nearest_neighbor_distance: Maximum radius to serach to
:param exchange_type: str or None. Exchange path only incoroporates these elements, or None for any
:param bond_angle: float. Search for exchange ions withing this angle to the bond
:param search_in_cell: Bool. If True, only looks for neighbors within the unit cell
:param group_neighbors: Bool. If True, only shows neighbors with the same bond distance once
:param disp: Bool. If True, prints details of the calcualtion
:return:
- plot_layers(self, layers=None, layer_axis=2, layer_width=0.05, show_labels=False)
- Separate the structure into layers along the chosen axis
and plot the atoms in each layer in a separate figure.
:param layers: list of layers to plot in fractional coordinates, or NOne for automatic determination
:param layer_axis: axis (0,1,2) of direction normal to layers
:param layer_width: distance from layer value to include in plot
:param show_labels: False*/True add text labels
:return:
- plot_ms_azimuth(self, hkl, energy_kev, azir=[0, 0, 1], pv=[1, 0], numsteps=3, peak_width=0.1, full=False, pv1=False, pv2=False, sfonly=True, pv1xsf1=False, log=False)
- Run the multiple scattering code and plot the result
See multiple_scattering.py for more details.
:param xtl: Crystal structure from Dans_Diffraction
:param hkl: [h,k,l] principle reflection
:param energy_kev: calculation energy
:param azir: [h,k,l] reference of azimuthal 0 angle
:param pv: [s,p] polarisation vector
:param numsteps: int: number of calculation steps from energy min to max
:param full: True/False: calculation type: full
:param pv1: True/False: calculation type: pv1
:param pv2: True/False: calculation type: pv2
:param sfonly: True/False: calculation type: sfonly *default
:param pv1xsf1: True/False: calculation type: pv1xsf1?
:param log: log y scale
:return: None
- plot_multiple_scattering(self, hkl, azir=[0, 0, 1], pv=[1, 0], energy_range=[7.8, 8.2], numsteps=60, full=False, pv1=False, pv2=False, sfonly=True, pv1xsf1=False)
- Run the multiple scattering code and plot the result
See multiple_scattering.py for more details.
:param xtl: Crystal structure from Dans_Diffraction
:param hkl: [h,k,l] principle reflection
:param azir: [h,k,l] reference of azimuthal 0 angle
:param pv: [s,p] polarisation vector
:param energy_range: [min, max] energy range in keV
:param numsteps: int: number of calculation steps from energy min to max
:param full: True/False: calculation type: full
:param pv1: True/False: calculation type: pv1
:param pv2: True/False: calculation type: pv2
:param sfonly: True/False: calculation type: sfonly *default
:param pv1xsf1: True/False: calculation type: pv1xsf1?
:return: None
- plot_xray_resonance(self, hkl, energy_kev=None, width=1.0, npoints=200)
- Plot energy scan using x-ray dispersion corrections
:param hkl: list of [h,k,l] reflections
:param energy_kev: float energy in keV to scan around
:param width: float in keV width of scan
:param npoints: int number of poins to calculate
:return: None
- quick_intensity_cut(self, x_axis=[1, 0, 0], y_axis=[0, 1, 0], centre=[0, 0, 0], q_max=4.0, cut_width=0.05)
- Plot a cut through reciprocal space, visualising the intensity as different sized markers
x_axis = direction along x, in units of the reciprocal lattice (hkl)
y_axis = direction along y, in units of the reciprocal lattice (hkl)
centre = centre of the plot, in units of the reciprocal lattice (hkl)
q_max = maximum distance to plot to - in A-1
cut_width = width in height that will be included, in A-1
E.G. hk plot at L=3 for hexagonal system:
xtl.quick_intensity_cut([1,0,0],[0,1,0],[0,0,3])
hhl plot:
xtl.quick_intensity_cut([1,1,0],[0,0,1],[0,0,0])
- simulate_0kl(self, H=0, **kwargs)
- Plots the (H)kl layer of reciprocal space
for inputs, see help(xtl.simulate_intensity_cut)
- simulate_azimuth(self, hkl, energy_kev=None, polarisation='sp', F0=1, F1=1, F2=1, azim_zero=[1, 0, 0])
- Simulate azimuthal scan of resonant x-ray scattering
energy_kev = x-ray energy in keV
polarisation = x-ray polarisation: 'ss',{'sp'},'ps','pp'
F0/1/2 = Resonance factor Flm
azim_zero = [h,k,l] vector parallel to the origin of the azimuth
- simulate_azimuth_nonresonant(self, hkl, energy_kev=None, polarisation='sp', azim_zero=[1, 0, 0])
- Simulate azimuthal scan of resonant x-ray scattering
energy_kev = x-ray energy in keV
polarisation = x-ray polarisation: 'ss',{'sp'},'ps','pp'
F0/1/2 = Resonance factor Flm
azim_zero = [h,k,l] vector parallel to the origin of the azimuth
- simulate_azimuth_resonant(self, hkl, energy_kev=None, polarisation='sp', F0=1, F1=1, F2=1, azim_zero=[1, 0, 0])
- Simulate azimuthal scan of resonant x-ray scattering
energy_kev = x-ray energy in keV
polarisation = x-ray polarisation: 'ss',{'sp'},'ps','pp'
F0/1/2 = Resonance factor Flm
azim_zero = [h,k,l] vector parallel to the origin of the azimuth
- simulate_envelope_cut(self, x_axis=(1, 0, 0), y_axis=(0, 1, 0), centre=(0, 0, 0), q_max=4.0, background=0.0, pixels=301)
- *In Development*
Simulate enveloping function by calculating the structure factor on a discrete set of points on a grid
:param x_axis: direction along x, in units of the reciprocal lattice (hkl)
:param y_axis: direction along y, in units of the reciprocal lattice (hkl)
:param centre: centre of the plot, in units of the reciprocal lattice (hkl)
:param q_max: maximum distance to plot to - in A-1
:param background: width in height that will be included, in A-1
:param pixels: size of mesh, calculates structure factor at each pixel
:return:
- simulate_ewald_coverage(self, energy_kev=8.0, sample_normal=[0, 0, 1], sample_para=[1, 0, 0], phi=0, chi=0, **kwargs)
- NOT FINISHED
Plot ewald space coverage within a particular scattering plane
energy_kev = energy of incident radiation in keV
sample_normal = direction of scattering plane perp to beam direction
sample_para = direction of scattering plane || to beam direction
phi = rotation of lattice about scattering plane verticle
chi = rotation of lattice perpendicular to scattering plane
- simulate_h0l(self, K=0, **kwargs)
- Plots the h(K)l layer of reciprocal space
for inputs, see help(xtl.simulate_intensity_cut)
- simulate_hhl(self, HmH=0, **kwargs)
- Plots the hhl layer of reciprocal space
for inputs, see help(xtl.simulate_intensity_cut)
- simulate_hk0(self, L=0, **kwargs)
- Plots the hk(L) layer of reciprocal space
for inputs, see help(xtl.simulate_intensity_cut)
- simulate_intensity_cut(self, x_axis=(1, 0, 0), y_axis=(0, 1, 0), centre=(0, 0, 0), q_max=4.0, cut_width=0.05, background=0.0, peak_width=0.05)
- Plot a cut through reciprocal space, visualising the intensity
x_axis = direction along x, in units of the reciprocal lattice (hkl)
y_axis = direction along y, in units of the reciprocal lattice (hkl)
centre = centre of the plot, in units of the reciprocal lattice (hkl)
q_max = maximum distance to plot to - in A-1
cut_width = width in height that will be included, in A-1
background = average background value
peak_width = reflection width in A-1
E.G. hk plot at L=3 for hexagonal system:
xtl.simulate_intensity_cut([1,0,0],[0,1,0],[0,0,3])
hhl plot:
xtl.simulate_intensity_cut([1,1,0],[0,0,1],[0,0,0])
- simulate_polarisation_nonresonant(self, hkl, energy_kev=None, azim_zero=[1, 0, 0], psi=0)
- Simulate azimuthal scan of resonant x-ray scattering
energy_kev = x-ray energy in keV
polarisation = x-ray polarisation: 'ss',{'sp'},'ps','pp'
F0/1/2 = Resonance factor Flm
azim_zero = [h,k,l] vector parallel to the origin of the azimuth
- simulate_polarisation_resonant(self, hkl, energy_kev=None, F0=1, F1=1, F2=1, azim_zero=[1, 0, 0], psi=0)
- Simulate azimuthal scan of resonant x-ray scattering
energy_kev = x-ray energy in keV
polarisation = x-ray polarisation: 'ss',{'sp'},'ps','pp'
F0/1/2 = Resonance factor Flm
azim_zero = [h,k,l] vector parallel to the origin of the azimuth
- simulate_powder(self, scattering_type=None, units=None, peak_width=None, background=None, pixels=None, powder_average=None, lorentz_fraction=None, custom_peak=None, min_overlap=None, **options)
- Generates array of intensities along a spaced grid, equivalent to a powder pattern.
tth, inten, reflections = Scatter.powder('xray', units='tth', energy_kev=8)
Note: This function is the new replacement for generate_power and uses both _scattering_min_twotheta
and _scattering_max_twotheta.
:param scattering_type: str : one of ['xray','neutron','xray magnetic','neutron magnetic','xray resonant']
:param units: str : one of ['tth', 'dspace', 'q']
:param peak_width: float : Peak with in units of inverse wavevector (Q)
:param background: float : if >0, a normal background around this value will be added
:param pixels: int : number of pixels per inverse-anstrom to add to the resulting mesh
:param powder_average: Bool : if True, intensities will be reduced for the powder average
:param lorentz_fraction: float 0-1: sets the Lorentzian fraction of the psuedo-Voight peak functions
:param custom_peak: array: if not None, the array will be convolved with delta-functions at each reflection.
:param min_overlap: minimum overlap of neighboring reflections.
:param options: additional arguments to pass to intensity calculation
:return xval: arrray : x-axis of powder scan (units)
:return inten: array : intensity values at each point in x-axis
:return reflections: (h, k, l, xval, intensity) array of reflection positions, grouped by min_overlap
- simulate_powder_old(self, energy_kev=None, peak_width=0.01, background=0, powder_average=True)
- Generates a powder pattern, plots in a new figure with labels
see classes_scattering.generate_powder
Data descriptors defined here:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
|
class PlottingSuperstructure(Plotting) |
|
PlottingSuperstructure(xtl)
Plotting functions for Superstructure class crystal object
Copies the functions from Plotting, but changes several functions to apply additional actions
This changes the behaviour of the xtl.Plot functions such as xtl.Plot.simulate_hk0()
generate_intensity_cut & simulate_intensity_cut
- Refelctions are symmetrised by the parent symmetry, accounting for multiple superlattice domains
- Generated plots have lines and vectors associated with parent structure
- Effects functions such as xtl.Plot.simulate_hk0() |
|
- Method resolution order:
- PlottingSuperstructure
- Plotting
- builtins.object
Methods defined here:
- parent_generate_intensity_cut(self, x_axis=(1, 0, 0), y_axis=(0, 1, 0), centre=(0, 0, 0), q_max=4.0, cut_width=0.05, background=0.0, peak_width=0.05, pixels=1001)
- Generate a cut through reciprocal space, returns an array with centred reflections
Inputs:
x_axis = direction along x, in units of the parent reciprocal lattice (hkl)
y_axis = direction along y, in units of the parent reciprocal lattice (hkl)
centre = centre of the plot, in units of the parent reciprocal lattice (hkl)
q_max = maximum distance to plot to - in A-1
cut_width = width in height that will be included, in A-1
background = average background value
peak_width = reflection width in A-1
Returns:
qx/qy = [pixels x pixels] array of coordinates
plane = [pixels x pixels] array of plane in reciprocal space
E.G. hk plane at L=3 for hexagonal system:
qx,qy,plane = xtl.Plot.parent_generate_intensity_cut([1,0,0],[0,1,0],[0,0,3])
plt.figure()
plt.pcolormesh(qx,qy,plane)
plt.axis('image')
- simulate_intensity_cut(self, x_axis=(1, 0, 0), y_axis=(0, 1, 0), centre=(0, 0, 0), q_max=4.0, cut_width=0.05, background=0.0, peak_width=0.05)
- Plot a cut through reciprocal space, visualising the intensity
This method, as part of a superstructure, overloads simulate_intensity_cut,
providing orientation of parent and symmetrisation of parent.
x_axis = direction along x, in units of the parent reciprocal lattice (hkl)
y_axis = direction along y, in units of the parent reciprocal lattice (hkl)
centre = centre of the plot, in units of the parent reciprocal lattice (hkl)
q_max = maximum distance to plot to - in A-1
cut_width = width in height that will be included, in A-1
background = average background value
peak_width = reflection width in A-1
E.G. hk plot at L=3 for hexagonal system:
xtl.simulate_intensity_cut([1,0,0],[0,1,0],[0,0,3])
hhl plot:
xtl.simulate_intensity_cut([1,1,0],[0,0,1],[0,0,0])
- use_parent_symmetry(self, val=None)
- Set the parent symmetry flag, if True, symmetrises intensity cuts using parent symmetry
Methods inherited from Plotting:
- __init__(self, xtl)
- Initialize self. See help(type(self)) for accurate signature.
- axis_reciprocal_lattice_lines(self, x_axis=(1, 0, 0), y_axis=(0, 1, 0), centre=(0, 0, 0), q_max=4.0, cut_width=0.05, axes=None, *args, **kwargs)
- Add lines to the current axis showing the reciprocal lattice
:param x_axis: direction along x, in units of the reciprocal lattice (hkl)
:param y_axis: direction along y, in units of the reciprocal lattice (hkl)
:param centre: centre of the plot, in units of the reciprocal lattice (hkl)
:param q_max: maximum distance to plot to - in A-1
:param cut_width: width in height that will be included, in A-1
:param axes: None for plt.gca() or axis of choice
:param args: argments to pass to plot function, e.g. linewidth, alpha, color
:return: None
- axis_reciprocal_lattice_points(self, axes=None, x_axis=(1, 0, 0), y_axis=(0, 1, 0), centre=(0, 0, 0), q_max=4.0, cut_width=0.05, **kwargs)
- Add lines to the current axis showing the reciprocal lattice
:param axes: None for plt.gca() or axis of choice
:param x_axis: direction along x, in units of the reciprocal lattice (hkl)
:param y_axis: direction along y, in units of the reciprocal lattice (hkl)
:param centre: centre of the plot, in units of the reciprocal lattice (hkl)
:param q_max: maximum distance to plot to - in A-1
:param cut_width: width in height that will be included, in A-1
:param kwargs: keyword arguments to pass to plt.plot(..., **kwargs)
:return: None
- axis_reciprocal_lattice_vectors(self, axes=None, x_axis=(1, 0, 0), y_axis=(0, 1, 0), centre=(0, 0, 0), q_max=4.0, cut_width=0.05)
- Add lines to the current axis showing the reciprocal lattice
:param axes: None for plt.gca() or axis of choice
:param x_axis: direction along x, in units of the reciprocal lattice (hkl)
:param y_axis: direction along y, in units of the reciprocal lattice (hkl)
:param centre: centre of the plot, in units of the reciprocal lattice (hkl)
:param q_max: maximum distance to plot to - in A-1
:param cut_width: width in height that will be included, in A-1
:return: None
- plot_3Dlattice(self, q_max=4.0, x_axis=[1, 0, 0], y_axis=[0, 1, 0], centre=[0, 0, 0], cut_width=0.05)
- Plot lattice points in 3D
- plot_3Dpolarisation(self, hkl, energy_kev=None, polarisation='sp', azim_zero=[1, 0, 0], psi=0)
- Plots the scattering vectors for a particular azimuth
:param hkl:
:param energy_kev:
:param polarisation:
:param azim_zero:
:param psi:
:return: None
- plot_crystal(self, show_labels=False)
- Plot the atomic cell in 3D
Click and drag to rotate the structure in 3D
Atoms are coloured according to their label
set show_labels=True to show the label of each sphere
- plot_diffractometer_reciprocal_space(self, energy_kev, delta=0, gamma=0)
- Plot diffractometer angles using orientation
:param energy_kev:
:param delta:
:param gamma:
:return: None
- plot_exchange_paths(self, cen_idx, nearest_neighbor_distance=6.6, exchange_type='O', bond_angle=90.0, search_in_cell=True, group_neighbors=True, disp=False)
- Calcualtes exchange paths and adds them to the crystal structure plot
:param cen_idx: index of central ion in xtl.Structure
:param nearest_neighbor_distance: Maximum radius to serach to
:param exchange_type: str or None. Exchange path only incoroporates these elements, or None for any
:param bond_angle: float. Search for exchange ions withing this angle to the bond
:param search_in_cell: Bool. If True, only looks for neighbors within the unit cell
:param group_neighbors: Bool. If True, only shows neighbors with the same bond distance once
:param disp: Bool. If True, prints details of the calcualtion
:return:
- plot_layers(self, layers=None, layer_axis=2, layer_width=0.05, show_labels=False)
- Separate the structure into layers along the chosen axis
and plot the atoms in each layer in a separate figure.
:param layers: list of layers to plot in fractional coordinates, or NOne for automatic determination
:param layer_axis: axis (0,1,2) of direction normal to layers
:param layer_width: distance from layer value to include in plot
:param show_labels: False*/True add text labels
:return:
- plot_ms_azimuth(self, hkl, energy_kev, azir=[0, 0, 1], pv=[1, 0], numsteps=3, peak_width=0.1, full=False, pv1=False, pv2=False, sfonly=True, pv1xsf1=False, log=False)
- Run the multiple scattering code and plot the result
See multiple_scattering.py for more details.
:param xtl: Crystal structure from Dans_Diffraction
:param hkl: [h,k,l] principle reflection
:param energy_kev: calculation energy
:param azir: [h,k,l] reference of azimuthal 0 angle
:param pv: [s,p] polarisation vector
:param numsteps: int: number of calculation steps from energy min to max
:param full: True/False: calculation type: full
:param pv1: True/False: calculation type: pv1
:param pv2: True/False: calculation type: pv2
:param sfonly: True/False: calculation type: sfonly *default
:param pv1xsf1: True/False: calculation type: pv1xsf1?
:param log: log y scale
:return: None
- plot_multiple_scattering(self, hkl, azir=[0, 0, 1], pv=[1, 0], energy_range=[7.8, 8.2], numsteps=60, full=False, pv1=False, pv2=False, sfonly=True, pv1xsf1=False)
- Run the multiple scattering code and plot the result
See multiple_scattering.py for more details.
:param xtl: Crystal structure from Dans_Diffraction
:param hkl: [h,k,l] principle reflection
:param azir: [h,k,l] reference of azimuthal 0 angle
:param pv: [s,p] polarisation vector
:param energy_range: [min, max] energy range in keV
:param numsteps: int: number of calculation steps from energy min to max
:param full: True/False: calculation type: full
:param pv1: True/False: calculation type: pv1
:param pv2: True/False: calculation type: pv2
:param sfonly: True/False: calculation type: sfonly *default
:param pv1xsf1: True/False: calculation type: pv1xsf1?
:return: None
- plot_xray_resonance(self, hkl, energy_kev=None, width=1.0, npoints=200)
- Plot energy scan using x-ray dispersion corrections
:param hkl: list of [h,k,l] reflections
:param energy_kev: float energy in keV to scan around
:param width: float in keV width of scan
:param npoints: int number of poins to calculate
:return: None
- quick_intensity_cut(self, x_axis=[1, 0, 0], y_axis=[0, 1, 0], centre=[0, 0, 0], q_max=4.0, cut_width=0.05)
- Plot a cut through reciprocal space, visualising the intensity as different sized markers
x_axis = direction along x, in units of the reciprocal lattice (hkl)
y_axis = direction along y, in units of the reciprocal lattice (hkl)
centre = centre of the plot, in units of the reciprocal lattice (hkl)
q_max = maximum distance to plot to - in A-1
cut_width = width in height that will be included, in A-1
E.G. hk plot at L=3 for hexagonal system:
xtl.quick_intensity_cut([1,0,0],[0,1,0],[0,0,3])
hhl plot:
xtl.quick_intensity_cut([1,1,0],[0,0,1],[0,0,0])
- simulate_0kl(self, H=0, **kwargs)
- Plots the (H)kl layer of reciprocal space
for inputs, see help(xtl.simulate_intensity_cut)
- simulate_azimuth(self, hkl, energy_kev=None, polarisation='sp', F0=1, F1=1, F2=1, azim_zero=[1, 0, 0])
- Simulate azimuthal scan of resonant x-ray scattering
energy_kev = x-ray energy in keV
polarisation = x-ray polarisation: 'ss',{'sp'},'ps','pp'
F0/1/2 = Resonance factor Flm
azim_zero = [h,k,l] vector parallel to the origin of the azimuth
- simulate_azimuth_nonresonant(self, hkl, energy_kev=None, polarisation='sp', azim_zero=[1, 0, 0])
- Simulate azimuthal scan of resonant x-ray scattering
energy_kev = x-ray energy in keV
polarisation = x-ray polarisation: 'ss',{'sp'},'ps','pp'
F0/1/2 = Resonance factor Flm
azim_zero = [h,k,l] vector parallel to the origin of the azimuth
- simulate_azimuth_resonant(self, hkl, energy_kev=None, polarisation='sp', F0=1, F1=1, F2=1, azim_zero=[1, 0, 0])
- Simulate azimuthal scan of resonant x-ray scattering
energy_kev = x-ray energy in keV
polarisation = x-ray polarisation: 'ss',{'sp'},'ps','pp'
F0/1/2 = Resonance factor Flm
azim_zero = [h,k,l] vector parallel to the origin of the azimuth
- simulate_envelope_cut(self, x_axis=(1, 0, 0), y_axis=(0, 1, 0), centre=(0, 0, 0), q_max=4.0, background=0.0, pixels=301)
- *In Development*
Simulate enveloping function by calculating the structure factor on a discrete set of points on a grid
:param x_axis: direction along x, in units of the reciprocal lattice (hkl)
:param y_axis: direction along y, in units of the reciprocal lattice (hkl)
:param centre: centre of the plot, in units of the reciprocal lattice (hkl)
:param q_max: maximum distance to plot to - in A-1
:param background: width in height that will be included, in A-1
:param pixels: size of mesh, calculates structure factor at each pixel
:return:
- simulate_ewald_coverage(self, energy_kev=8.0, sample_normal=[0, 0, 1], sample_para=[1, 0, 0], phi=0, chi=0, **kwargs)
- NOT FINISHED
Plot ewald space coverage within a particular scattering plane
energy_kev = energy of incident radiation in keV
sample_normal = direction of scattering plane perp to beam direction
sample_para = direction of scattering plane || to beam direction
phi = rotation of lattice about scattering plane verticle
chi = rotation of lattice perpendicular to scattering plane
- simulate_h0l(self, K=0, **kwargs)
- Plots the h(K)l layer of reciprocal space
for inputs, see help(xtl.simulate_intensity_cut)
- simulate_hhl(self, HmH=0, **kwargs)
- Plots the hhl layer of reciprocal space
for inputs, see help(xtl.simulate_intensity_cut)
- simulate_hk0(self, L=0, **kwargs)
- Plots the hk(L) layer of reciprocal space
for inputs, see help(xtl.simulate_intensity_cut)
- simulate_polarisation_nonresonant(self, hkl, energy_kev=None, azim_zero=[1, 0, 0], psi=0)
- Simulate azimuthal scan of resonant x-ray scattering
energy_kev = x-ray energy in keV
polarisation = x-ray polarisation: 'ss',{'sp'},'ps','pp'
F0/1/2 = Resonance factor Flm
azim_zero = [h,k,l] vector parallel to the origin of the azimuth
- simulate_polarisation_resonant(self, hkl, energy_kev=None, F0=1, F1=1, F2=1, azim_zero=[1, 0, 0], psi=0)
- Simulate azimuthal scan of resonant x-ray scattering
energy_kev = x-ray energy in keV
polarisation = x-ray polarisation: 'ss',{'sp'},'ps','pp'
F0/1/2 = Resonance factor Flm
azim_zero = [h,k,l] vector parallel to the origin of the azimuth
- simulate_powder(self, scattering_type=None, units=None, peak_width=None, background=None, pixels=None, powder_average=None, lorentz_fraction=None, custom_peak=None, min_overlap=None, **options)
- Generates array of intensities along a spaced grid, equivalent to a powder pattern.
tth, inten, reflections = Scatter.powder('xray', units='tth', energy_kev=8)
Note: This function is the new replacement for generate_power and uses both _scattering_min_twotheta
and _scattering_max_twotheta.
:param scattering_type: str : one of ['xray','neutron','xray magnetic','neutron magnetic','xray resonant']
:param units: str : one of ['tth', 'dspace', 'q']
:param peak_width: float : Peak with in units of inverse wavevector (Q)
:param background: float : if >0, a normal background around this value will be added
:param pixels: int : number of pixels per inverse-anstrom to add to the resulting mesh
:param powder_average: Bool : if True, intensities will be reduced for the powder average
:param lorentz_fraction: float 0-1: sets the Lorentzian fraction of the psuedo-Voight peak functions
:param custom_peak: array: if not None, the array will be convolved with delta-functions at each reflection.
:param min_overlap: minimum overlap of neighboring reflections.
:param options: additional arguments to pass to intensity calculation
:return xval: arrray : x-axis of powder scan (units)
:return inten: array : intensity values at each point in x-axis
:return reflections: (h, k, l, xval, intensity) array of reflection positions, grouped by min_overlap
- simulate_powder_old(self, energy_kev=None, peak_width=0.01, background=0, powder_average=True)
- Generates a powder pattern, plots in a new figure with labels
see classes_scattering.generate_powder
Data descriptors inherited from Plotting:
- __dict__
- dictionary for instance variables (if defined)
- __weakref__
- list of weak references to the object (if defined)
| |