th_tth (ThTthSolver)#
Caution
work-in-progress
Backend: th_tth ("th_tth"
)
Transformations between \(\theta,2\theta\) and \(Q\).
Example:
import hklpy2
SolverClass = hklpy2.get_solver("th_tth")
solver = SolverClass()
|
|
- class hklpy2.backends.th_tth_q.ThTthSolver(geometry: str, **kwargs)[source]#
Bases:
SolverBase
"th_tth"
(any OS) \(\theta,2\theta\) and \(Q\).transformation
equation
forward()
\(\theta = \sin^{-1}(q\lambda / 4\pi)\)
inverse()
\(q = (4\pi / \lambda) \sin(\theta)\)
Wavelength is specified either directly (
solver.wavelength = 1.0
) or by adding at least one reflection (seeReflection
). All reflections must have the same wavelength.No orientation matrix is used in this geometry.
Python Methods
addReflection
(value)Add coordinates of a diffraction condition (a reflection).
calculate_UB
(r1, r2)Calculate the UB (orientation) matrix with two reflections.
Ordered list of any extra axis names (such as x, y, z).
forward
(pseudos)Transform pseudos to list of reals.
Ordered list of the geometry names.
inverse
(reals)Transform reals to pseudos.
Ordered list of the pseudo axis names (such as h, k, l).
Ordered list of the real axis names (such as th, tth).
refineLattice
(reflections)No lattice refinement in this Solver.
Remove all reflections.
Python Properties
Diffractometer geometry.
Crystal lattice parameters.
Diffractometer geometry operation mode for
forward()
.List of the geometry operating modes.
Crystalline sample.
- property UB#
Orientation matrix (3x3).
- addReflection(value: Reflection)[source]#
Add coordinates of a diffraction condition (a reflection).
- calculate_UB(r1, r2)[source]#
Calculate the UB (orientation) matrix with two reflections.
The method of Busing & Levy, Acta Cryst 22 (1967) 457.
- property extra_axis_names#
Ordered list of any extra axis names (such as x, y, z).
- classmethod geometries()[source]#
Ordered list of the geometry names.
EXAMPLES:
>>> from hklpy2 import get_solver >>> Solver = get_solver("no_op") >>> Solver.geometries() [] >>> solver = Solver("TH TTH Q") >>> solver.geometries() []
- property mode: str#
Diffractometer geometry operation mode for
forward()
.A mode defines which axes will be modified by the
forward()
computation.
- property modes#
List of the geometry operating modes.
- name = 'th_tth'#
Name of this Solver.
- property pseudo_axis_names#
Ordered list of the pseudo axis names (such as h, k, l).
- property real_axis_names#
Ordered list of the real axis names (such as th, tth).
- refineLattice(reflections: list[Reflection]) None [source]#
No lattice refinement in this Solver.
- version = '0.0.25.dev83+gf26812c'#
Version of this Solver.
- property wavelength#
Diffractometer wavelength, for forward() and inverse().