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)

kappa6c stage layout

Sample stages (base first):

Stage

Axis

Handedness

Parent

mu

+vertical (+x)

right-handed

base

komega

−transverse (−z)

left-handed

mu

kappa

−z · cos α + ŷ · sin α (α = 50°)

right-handed

komega

kphi

−transverse (−z)

left-handed

kappa

Detector stages (base first):

Stage

Axis

Handedness

Parent

nu

+vertical (+x)

right-handed

base

delta

−transverse (−z)

left-handed

nu

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):

\[ \hat{n}_{\kappa} \;=\; \cos\alpha \cdot \hat{n}_{\kappa\omega} \;+\; \sin\alpha \cdot \hat{n}_{\chi,\,\text{eq}} \;=\; \cos 50° \cdot (-\hat{z}) \;+\; \sin 50° \cdot (+\hat{y}). \]

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/2

  • Horizontal: 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 forward()

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 forward()

komega = 0, delta = 0

fixed_kphi#

SampleConstraint: kphi held at declared value (default 0°), mu = 0, nu = 0.

Computed

komega, kappa, delta

Constant during forward()

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 forward()

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 forward()

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 forward()

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 forward()

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 forward()

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 forward()

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 forward()

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 forward()

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 forward()

komega = 0, delta = 0

Extras (input)

h₂, k₂, l₂ (secondary reflection Miller indices)

API reference#

References#