Contents Menu Expand Light mode Dark mode Auto light/dark, in light mode Auto light/dark, in dark mode Skip to content
PyExtal 0.1.1.dev107+g1e098660d documentation
PyExtal 0.1.1.dev107+g1e098660d documentation

Contents:

  • Introduction
  • Getting started with PyExtal
  • Package Architecture
    • LARBED Extraction (pyextal.larbed)
    • Understand How to Define/Index LARBED Dataset
    • Input .dat File Configuration
    • Overview of ROI definition in pyextal
    • Coarse Refinement (Correlation based refinement)
    • Fine Refientment (Intensity based Refinement)
  • Simulation
  • Superspace: incommensurate crystallography in (3+d) dimensions
  • PyExtal-JAX: Gradient-Based Refinement
  • Simulation Engine
  • Examples
    • PyExtal example for CBED refinement
    • Structure Factor refinement of Si LARBED 111 systematic row
    • High voltage calibration example
    • Pre-refinement for PyExtal-JAX
  • Bloch Engine API
  • API Reference
    • pyextal
      • pyextal.Constants
      • pyextal.LucyRichardson
      • pyextal.acom
        • pyextal.acom.datfile
        • pyextal.acom.detect
        • pyextal.acom.geometry
        • pyextal.acom.library
        • pyextal.acom.plotting
        • pyextal.acom.quality
        • pyextal.acom.solve
        • pyextal.acom.tilt
      • pyextal.adp
      • pyextal.blochNumpy
      • pyextal.blochwave
      • pyextal.callBloch
      • pyextal.densityMap
      • pyextal.dinfo
      • pyextal.gof
      • pyextal.hdf5io
      • pyextal.jaxEngine
        • pyextal.jaxEngine.hdf5io
        • pyextal.jaxEngine.model
        • pyextal.jaxEngine.optimize
        • pyextal.jaxEngine.postProcess
        • pyextal.jaxEngine.setParams
        • pyextal.jaxEngine.structureModel
        • pyextal.jaxEngine.utils
      • pyextal.jaxGeo
        • pyextal.jaxGeo.cli
        • pyextal.jaxGeo.config
        • pyextal.jaxGeo.figures
        • pyextal.jaxGeo.geometry
        • pyextal.jaxGeo.io
        • pyextal.jaxGeo.lm
        • pyextal.jaxGeo.objective
        • pyextal.jaxGeo.oversub
        • pyextal.jaxGeo.refine
        • pyextal.jaxGeo.reflections
        • pyextal.jaxGeo.settings
        • pyextal.jaxGeo.simulate
      • pyextal.jaxJoint
        • pyextal.jaxJoint.cli
        • pyextal.jaxJoint.datasets
        • pyextal.jaxJoint.engine
        • pyextal.jaxJoint.link
        • pyextal.jaxJoint.optimize
        • pyextal.jaxJoint.params
        • pyextal.jaxJoint.refine
        • pyextal.jaxJoint.report
        • pyextal.jaxJoint.settings
      • pyextal.jaxMultipole
        • pyextal.jaxMultipole.bank
        • pyextal.jaxMultipole.cli
        • pyextal.jaxMultipole.constants
        • pyextal.jaxMultipole.crystal
        • pyextal.jaxMultipole.data
        • pyextal.jaxMultipole.fit
        • pyextal.jaxMultipole.harmonics
        • pyextal.jaxMultipole.intensity
        • pyextal.jaxMultipole.maps
        • pyextal.jaxMultipole.model
        • pyextal.jaxMultipole.params
        • pyextal.jaxMultipole.plotting
        • pyextal.jaxMultipole.protocol
        • pyextal.jaxMultipole.radial
        • pyextal.jaxMultipole.report
        • pyextal.jaxMultipole.settings
        • pyextal.jaxMultipole.symmetry
        • pyextal.jaxMultipole.wien2k
      • pyextal.larbed
        • pyextal.larbed.analysis
        • pyextal.larbed.calibration
        • pyextal.larbed.empad
        • pyextal.larbed.peaks
      • pyextal.metric
      • pyextal.optimize
      • pyextal.roi
      • pyextal.superspace
        • pyextal.superspace.approximant
        • pyextal.superspace.engine
        • pyextal.superspace.indexing
        • pyextal.superspace.lattice
        • pyextal.superspace.modulation
        • pyextal.superspace.saed
        • pyextal.superspace.scattering
        • pyextal.superspace.structurefactor
        • pyextal.superspace.symmetry
        • pyextal.superspace.tas2
      • pyextal.symmetry
Back to top
View this page

pyextal.jaxJoint.link¶

Which structure factor is which, across datasets.

The engine names each refined structure factor by a representative it picks from the dataset’s own beam list: under SpaceGroup the first member of the symmetry group it meets (GroupSymmetry.uniqueBeams), under Friedel whichever of g and -g comes first. Two datasets – another zone axis, or just a different beam list – can therefore name the same U_g differently, and the values under the two names are not equal: a glide or screw translation t makes

U(R g) = U(g) exp(-2 pi i t.g)

– a sign change for a phase of pi, which on La4Ni3O10 (P2_1/a) is a third of all equivalent pairs – and U(-g) = U(g)* for the Friedel mate.

So every U_g has a canonical key, the largest (h, k, l) of its whole orbit, which no beam list influences; the shared parameter is U at the canonical key. Each dataset’s own label r reaches it through a fixed link map M, 4 x 4 on (xfre, xfim, afre, afim): U_local = M @ U_shared – a rotation by the translation phase, preceded by a conjugation when r lies in the orbit of -g. M is orthogonal, so U_shared = M.T @ U_local.

check_links verifies every map against the engine’s own structure factors (defaultsf) before anything is refined.

Attributes¶

CONJ

Functions¶

as_hkl(g)

Any triple (ints, floats, numpy scalars) -> a tuple of ints.

neg(g)

rotation(phi)

M multiplying U and U' by exp(i phi).

_symmetry_members(g)

[(member, translation)] of g's orbit under the engine's operations.

is_centro()

orbit(g, symmetry, centro)

Every reflection sharing g's refined structure factor.

canonical(g, symmetry, centro)

The canonical key of g's structure factor: the largest member of its orbit.

link_map(local, key, symmetry, centro)

M with U(local) = M @ U(key).

tabulated(g)

The engine's (xfre, xfim, afre, afim) for g, from the crystal structure.

check_links(links[, rtol, floor])

Verifies each link map against the engine's structure factors.

beam_differences(hkl)

Every g = h_i - h_j of a beam list, (000) excluded: the U_g its matrix holds.

sort_keys(keys)

Shortest index first, as the engine orders its reflections.

Module Contents¶

pyextal.jaxJoint.link.CONJ¶
pyextal.jaxJoint.link.as_hkl(g)¶

Any triple (ints, floats, numpy scalars) -> a tuple of ints.

pyextal.jaxJoint.link.neg(g)¶
pyextal.jaxJoint.link.rotation(phi)¶

M multiplying U and U’ by exp(i phi).

pyextal.jaxJoint.link._symmetry_members(g)¶

[(member, translation)] of g’s orbit under the engine’s operations.

pyextal.jaxJoint.link.is_centro()¶
pyextal.jaxJoint.link.orbit(g, symmetry, centro)¶

Every reflection sharing g’s refined structure factor.

Parameters:
  • g (tuple) – A reflection.

  • symmetry (str) – 'Friedel' – g and -g only – or 'SpaceGroup' – the orbit under the space group, with that of -g when the group is centrosymmetric (the engine keeps ops without the inversion and adds it itself, as GroupSymmetry does).

  • centro (bool) – The group is centrosymmetric.

Returns:

set[tuple]

pyextal.jaxJoint.link.canonical(g, symmetry, centro)¶

The canonical key of g’s structure factor: the largest member of its orbit.

pyextal.jaxJoint.link.link_map(local, key, symmetry, centro)¶

M with U(local) = M @ U(key).

Parameters:
  • local (tuple) – The dataset’s label.

  • key (tuple) – The canonical key, in local’s orbit.

  • symmetry (str) – 'Friedel' or 'SpaceGroup'.

  • centro (bool) – The group is centrosymmetric.

Returns:

(4, 4).

Return type:

np.ndarray

Raises:

SetupError – If local is not in key’s orbit.

pyextal.jaxJoint.link.tabulated(g)¶

The engine’s (xfre, xfim, afre, afim) for g, from the crystal structure.

pyextal.jaxJoint.link.check_links(links, rtol=0.001, floor=1e-07)¶

Verifies each link map against the engine’s structure factors.

For every (local, key, M), M @ U(key) must equal U(local) as defaultsf computes them from the atom positions. This catches a wrong sign convention, which would otherwise quietly refine a sum of U_g that should be a difference.

Parameters:
  • links (list) – (local, key, M) triples; the engine must hold the dataset they belong to.

  • rtol (float) – Tolerance, relative to the larger of the two values.

  • floor (float) – Pairs where both are below this are not tested (the sign of a zero cannot be checked).

Raises:

SetupError – Naming the pairs that disagree.

pyextal.jaxJoint.link.beam_differences(hkl)¶

Every g = h_i - h_j of a beam list, (000) excluded: the U_g its matrix holds.

pyextal.jaxJoint.link.sort_keys(keys)¶

Shortest index first, as the engine orders its reflections.

Next
pyextal.jaxJoint.optimize
Previous
pyextal.jaxJoint.engine
Copyright © 2025, HCN, RB, and JMZ
Made with Sphinx and @pradyunsg's Furo
On this page
  • pyextal.jaxJoint.link
    • Attributes
    • Functions
    • Module Contents
      • CONJ
      • as_hkl()
      • neg()
      • rotation()
      • _symmetry_members()
      • is_centro()
      • orbit()
      • canonical()
      • link_map()
      • tabulated()
      • check_links()
      • beam_differences()
      • sort_keys()