pyextal.jaxMultipole.plotting ============================= .. py:module:: pyextal.jaxMultipole.plotting .. autoapi-nested-parse:: Figures of a multipole fit, and of several fits side by side. * :func:`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. * :func:`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. * :func:`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 ---------- .. autoapisummary:: pyextal.jaxMultipole.plotting.SERIES Functions --------- .. autoapisummary:: pyextal.jaxMultipole.plotting.iam_reference pyextal.jaxMultipole.plotting.sf_differences pyextal.jaxMultipole.plotting.plot_sf_differences pyextal.jaxMultipole.plotting.plot_planes pyextal.jaxMultipole.plotting.plot_parameters pyextal.jaxMultipole.plotting.plot_map2d pyextal.jaxMultipole.plotting.plot_static_dF Module Contents --------------- .. py:data:: SERIES :value: ('#2a78d6', '#eb6834', '#1baf7a', '#eda100', '#e87ba4', '#008300', '#6250d6', '#e34948') .. py:function:: iam_reference(model, p) ``p`` with the valence reset to neutral spherical atoms, ADPs kept. .. py:function:: 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. :rtype: dict .. py:function:: 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. :param model: The model the fits share. :type model: MultipoleModel :param results: ``name -> FitResult``; one colour each, fixed order. :type results: dict :param path: Where to save the figure. :type path: path-like, optional :param label_top: Label the reflections with the largest model signal. :type label_top: int :param title: Figure title. :type title: str, optional :param colors: 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. :type colors: list, optional :returns: matplotlib.figure.Figure .. py:function:: 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. :param model: The model. :type model: MultipoleModel :param sources: ``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). :type sources: dict :param planes: ``dict(name, origin, u, v, extent=(-2, 2, -2, 2), n=121)`` in fractional coordinates / lattice directions. :type planes: list[dict] :param terms: Which parts to draw, one row each (`maps.deformation_density`). :type terms: tuple :param path: Where to save. :type path: path-like, optional :param vmax: Colour and contour range, e/Angstrom^3. :type vmax: float :param step: Contour interval. :type step: float :param style: ``'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. :type style: str :returns: matplotlib.figure.Figure .. py:function:: plot_parameters(results, path=None, title=None) Refined (and dependent) parameters with esd, one colour per fit. :param results: ``name -> FitResult``; fits of the same model. :type results: dict :returns: matplotlib.figure.Figure .. py:function:: 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. :param U: In-plane coordinates (A), same shape as ``rho``. :type U: np.ndarray :param V: In-plane coordinates (A), same shape as ``rho``. :type V: np.ndarray :param atoms: ``(label, u, v)`` to mark. :type atoms: iterable :param note: Small text under the axes. :type note: str, optional .. py:function:: plot_static_dF(series, path=None, title=None, reference=None, label_top=6) ``F - F(IAM)`` (static, electrons per cell) against s. :param series: ``dict(label, s, dF, err=None, kind='points'|'model')``, in the fixed categorical order. :type series: list[dict] :param reference: A background set (e.g. DFT), drawn in gray. :type reference: dict, optional