add SPEC styled hkl scans wrapper
CI for addams_bec / test (push) Successful in 32s

This commit is contained in:
Xiaoqiang Wang
2026-05-10 08:34:53 +02:00
parent 844c73a75f
commit 517c3f0618
@@ -169,6 +169,30 @@ def umvhkl(h: float, k: float, l: float, auto=False):
ubr(h, k, l)
def hklscan(h1: float, h2: float, k1: float, k2: float, l1: float, l2: float, steps: int, exp_time: float, fly: bool = False):
"""
Scan in reciprocol space along a line starting at (h1, k1, l1) and ending at (h2, k2,l2) in number of steps.
"""
if fly:
scans.hkl_flyscan(h1, h2, k1, k2, l1, l2, steps, exp_time=exp_time)
else:
scans.hkl_scan(h1, h2, k1, k2, l1, l2, steps, exp_time=exp_time)
def hscan(h1: float, h2: float, steps: int, exp_time: float, fly: bool = False):
k = diffract.k.position
l = diffract.l.position
hklscan(h1, h2, k, k, l, l, steps, exp_time, fly)
def kscan(k1: float, k2: float, steps: int, exp_time: float, fly: bool = False):
h = diffract.h.position
l = diffract.l.position
hklscan(h, h, k1, k2, l, l, steps, exp_time, fly)
def lscan(l1: float, l2: float, steps: int, exp_time: float, fly: bool = False):
h = diffract.h.position
k = diffract.k.position
hklscan(h, h, k, k, l1, l2, steps, exp_time, fly)
def ca(h: float, k: float, l: float):
"""
Calculate angle positions for a given point in reciprocol space