kappa6c — Kappa Six-Circle#
Six-circle kappa diffractometer with psic-style outer axes (mu, nu). The inner sample axes (komega, kappa, and kphi) replace the Eulerian chi circle. Transverse detector, vertical scattering plane.
Coordinate basis: You (1999) (BASIS_YOU): vertical=+x, longitudinal=+y, transverse=+z.
Quick start#
import ad_hoc_diffractometer as ahd
g = ahd.presets.kappa6c()
g.wavelength = 1.0 # Å
print(g.summary())
Pre-built geometry definition#
This geometry is defined by the kappa6c() factory
function — see the source for the complete stage
and mode configuration.
Stage layout#
Static fallback (click to expand if the interactive figure above is blank)
Sample stages (base first):
Stage |
Axis |
Handedness |
Parent |
|---|---|---|---|
|
+vertical (+x) |
right-handed |
base |
|
−transverse (−z) |
left-handed |
|
|
−z · cos α + ŷ · sin α (α = 50°) |
right-handed |
|
|
−transverse (−z) |
left-handed |
|
Detector stages (base first):
Stage |
Axis |
Handedness |
Parent |
|---|---|---|---|
|
+vertical (+x) |
right-handed |
base |
|
−transverse (−z) |
left-handed |
|
The kappa axis is computed by
kappa_axis_from_eulerian() from
the preset’s actual komega axis (-TRANSVERSE in the You
basis) and the equivalent Eulerian chi axis (+LONGITUDINAL):
This formulation is geometry-aware and is correct for kappa6c.
See the kappa4cv documentation and
issue #241 for the reasons this differs from the textbook
vertical · cos α + transverse · sin α formula.
Virtual Eulerian angles omega, chi, phi are mapped
to / from the real motors via the geometry-aware decomposition in
eulerian_to_kappa_axes() and
kappa_to_eulerian_axes().
Bisect pairs:
Vertical: komega (transverse) ↔ delta (transverse) →
komega = delta/2Horizontal: mu (vertical) ↔ nu (vertical) →
mu = nu/2
Diffraction modes#
Each mode is a ConstraintSet of 3 constraints
(N − 3 = 3 for N = 6 DOF).
See Switch Diffraction Modes for usage and Work with Constraints and Diffraction Modes for
changing constraint values at run time.
bisecting_vertical (default)#
VirtualBisectConstraint +
SampleConstraint +
DetectorConstraint:
omega_virtual = delta / 2, mu = 0, nu = 0. The
virtual-bisect condition is on the virtual Eulerian omega
pseudoangle and is solved via the geometry-aware
eulerian_to_kappa_axes()
decomposition (issue #241).
Vertical scattering plane (psic-style).
Computed |
komega, kappa, kphi, delta |
Constant during |
mu = 0, nu = 0 |
bisecting_horizontal#
BisectConstraint + SampleConstraint + DetectorConstraint:
mu = nu/2, komega = 0, delta = 0.
Horizontal scattering plane.
Computed |
mu, kappa, kphi, nu |
Constant during |
komega = 0, delta = 0 |
fixed_kphi#
SampleConstraint:
kphi held at declared value (default 0°), mu = 0, nu = 0.
Computed |
komega, kappa, delta |
Constant during |
kphi, mu = 0, nu = 0 |
fixed_mu#
SampleConstraint + BisectConstraint + DetectorConstraint:
mu held at declared value (default 0°), komega = delta/2, nu = 0.
Computed |
komega, kappa, kphi, delta |
Constant during |
mu, nu = 0 |
fixed_nu#
DetectorConstraint + BisectConstraint + SampleConstraint:
nu held at declared value (default 0°), komega = delta/2, mu = 0.
Analogous to psic fixed_nu.
Computed |
komega, kappa, kphi, delta |
Constant during |
nu, mu = 0 |
fixed_delta#
DetectorConstraint + BisectConstraint + SampleConstraint:
delta held at declared value (default 0°), mu = nu/2, komega = 0.
Horizontal plane with delta frozen.
Computed |
mu, kappa, kphi, nu |
Constant during |
delta, komega = 0 |
lifting_detector_mu#
Out-of-plane mode: mu and komega frozen, nu and delta solved via the qaz
constraint (tan(qaz) = tan(delta) / sin(nu), You 1999 eq. 18).
qaz = 90° constrains the scattering to the vertical plane.
Computed |
mu, nu, delta |
Constant during |
mu = 0, komega = 0 |
lifting_detector_kphi#
Out-of-plane mode: kphi and mu frozen, nu and delta solved via the qaz
constraint (tan(qaz) = tan(delta) / sin(nu), You 1999 eq. 18).
qaz = 90° constrains the scattering to the vertical plane.
Computed |
kphi, nu, delta |
Constant during |
kphi = 0, mu = 0 |
fixed_psi_vertical#
Vertical bisecting with azimuthal angle ψ validation.
Set g.azimuthal_reference = (h, k, l) before calling forward().
The solver returns bisecting solutions only when the natural ψ for the
requested (h,k,l) matches the stored target. See Surface Geometry and the Reference Vector.
Computed |
komega, kappa, kphi, delta |
Constant during |
mu = 0, nu = 0 |
Extras (input) |
n̂ (reference vector), ψ (target azimuth, degrees) |
Extras (output) |
psi (computed azimuth) |
fixed_psi_horizontal#
Horizontal bisecting with azimuthal angle ψ validation.
Symmetric with fixed_psi_vertical in the horizontal plane.
Set g.azimuthal_reference = (h, k, l) before calling forward().
Computed |
mu, kappa, kphi, nu |
Constant during |
komega = 0, delta = 0 |
Extras (input) |
n̂ (reference vector), ψ (target azimuth, degrees) |
Extras (output) |
psi (computed azimuth) |
double_diffraction_vertical#
Full 4D simultaneous solver in the vertical scattering plane: finds motor angles where both the primary (h₁,k₁,l₁) and secondary (h₂,k₂,l₂) reflections satisfy the Ewald sphere condition.
Computed |
komega, kappa, kphi, delta |
Constant during |
mu = 0, nu = 0 |
Extras (input) |
h₂, k₂, l₂ (secondary reflection Miller indices) |
double_diffraction_horizontal#
Full 4D simultaneous solver in the horizontal scattering plane.
Computed |
mu, kappa, kphi, nu |
Constant during |
komega = 0, delta = 0 |
Extras (input) |
h₂, k₂, l₂ (secondary reflection Miller indices) |
API reference#
References#
ITC Vol. C §2.2.6 (2006). DOI: 10.1107/97809553602060000577
You, J. Appl. Cryst. 32, 614–623 (1999). DOI: 10.1107/S0021889899001223
Walko, Ref. Module Mater. Sci. Mater. Eng. (2016), eq. [16].