pyextal.jaxMultipole.plotting¶
Figures of a multipole fit, and of several fits side by side.
plot_planes()– real-space maps in atom planes: the full static deformation density and its aspherical (multipole-only) part, one row per fit and term, one column per plane, atoms marked.plot_sf_differences()– the bonding signal in reciprocal space, as Ug and as X-ray F: observed and model minus the independent-atom model with the same refined ADPs (so what remains is the valence deformation, not the thermal motion), plus the normalised residuals.plot_parameters()– refined parameters with esd, one marker per fit, one panel per kind of parameter (populations, kappa, multipoles, U).
Converting observed Ug to F uses the model’s own nuclear term, which shares the
ADPs: F_obs = F_model - pi Omega s^2 (U_obs - U_model) / (gamma M). The
factor grows as s^2, so a high-order Ug of modest relative precision is a very
uncertain F; the F panel shows those error bars honestly rather than hiding
them, and its y range follows the model and the well-measured points.
Colours: series take the fixed categorical order (blue, orange, aqua, …); density maps use a blue-gray-red diverging scale (blue = depletion); text stays in ink colours.
Attributes¶
Functions¶
|
|
|
Observed and model deformation signal of the electron data of a fit. |
|
Observed and model minus IAM, as Ug and as F, plus residuals, against s. |
|
Deformation-density maps in atom planes. |
|
Refined (and dependent) parameters with esd, one colour per fit. |
|
Contour lines of any 2-D map: solid >= 0, dashed < 0, up to +-vmax. |
|
|
Module Contents¶
- pyextal.jaxMultipole.plotting.SERIES = ('#2a78d6', '#eb6834', '#1baf7a', '#eda100', '#e87ba4', '#008300', '#6250d6', '#e34948')¶
- pyextal.jaxMultipole.plotting.iam_reference(model, p)¶
pwith the valence reset to neutral spherical atoms, ADPs kept.
- pyextal.jaxMultipole.plotting.sf_differences(model, result)¶
Observed and model deformation signal of the electron data of a fit.
- Returns:
arrays over the
'electron'observations:hkl,s,dU_obs,dU_model,sigma_U(Angstrom^-2),dF_obs,dF_model,sigma_F(electrons),resid((obs - model) / sigma), all relative to iam_reference at the fit’s ADPs.- Return type:
dict
- pyextal.jaxMultipole.plotting.plot_sf_differences(model, results, path=None, label_top=6, title=None, colors=None)¶
Observed and model minus IAM, as Ug and as F, plus residuals, against s.
- Parameters:
model (MultipoleModel) – The model the fits share.
results (dict) –
name -> FitResult; one colour each, fixed order.path (path-like, optional) – Where to save the figure.
label_top (int) – Label the reflections with the largest model signal.
title (str, optional) – Figure title.
colors (list, optional) – One colour per fit; the categorical order by default. Pass a fit’s own slot when plotting it alone, so it keeps its colour across separate files.
- Returns:
matplotlib.figure.Figure
- pyextal.jaxMultipole.plotting.plot_planes(model, sources, planes, terms=('all', 'multipole'), path=None, vmax=0.4, step=0.05, title=None, style='filled')¶
Deformation-density maps in atom planes.
- Parameters:
model (MultipoleModel) – The model.
sources (dict) –
name -> p(physical parameter vectors, e.g.FitResult.p) – one row group each; a value may also be a(model, p)pair, for a row drawn with another model (e.g. a fit to DFT with its own site set-up).planes (list[dict]) –
dict(name, origin, u, v, extent=(-2, 2, -2, 2), n=121)in fractional coordinates / lattice directions.terms (tuple) – Which parts to draw, one row each (maps.deformation_density).
path (path-like, optional) – Where to save.
vmax (float) – Colour and contour range, e/Angstrom^3.
step (float) – Contour interval.
style (str) –
'filled'– diverging colour fill plus contour lines;'lines'– contour lines only, solid for >= 0 (zero included) and dashed below, as deformation maps are usually published (Friis et al. 2004, Fig. 5). With lines only, the steep regions near the nuclei read as dense ink rather than as large saturated areas.
- Returns:
matplotlib.figure.Figure
- pyextal.jaxMultipole.plotting.plot_parameters(results, path=None, title=None)¶
Refined (and dependent) parameters with esd, one colour per fit.
- Parameters:
results (dict) –
name -> FitResult; fits of the same model.- Returns:
matplotlib.figure.Figure
- pyextal.jaxMultipole.plotting.plot_map2d(U, V, rho, path=None, atoms=(), title=None, vmax=1.0, step=0.05, units='e/ų', note=None)¶
Contour lines of any 2-D map: solid >= 0, dashed < 0, up to +-vmax.
- Parameters:
U (np.ndarray) – In-plane coordinates (A), same shape as
rho.V (np.ndarray) – In-plane coordinates (A), same shape as
rho.atoms (iterable) –
(label, u, v)to mark.note (str, optional) – Small text under the axes.
- pyextal.jaxMultipole.plotting.plot_static_dF(series, path=None, title=None, reference=None, label_top=6)¶
F - F(IAM)(static, electrons per cell) against s.- Parameters:
series (list[dict]) –
dict(label, s, dF, err=None, kind='points'|'model'), in the fixed categorical order.reference (dict, optional) – A background set (e.g. DFT), drawn in gray.