The new version of the library offers to calculate 2 vectors: ki and kf
With these modifications it is possible to make a calculation like this:
-------------------------------------------------
def get_kinc_kscat(config, values):
sample, detector, geometry, engines = new_hkl_diffractometer(config)
geometry.axis_values_set(values, Hkl.UnitEnum.USER)
R = hkl_matrix_to_numpy(geometry.sample_rotation_get(sample).to_matrix())
UB = hkl_matrix_to_numpy(sample.UB_get())
RUB = dot(R, UB)
RUB_1 = inv(RUB)
ki = geometry.ki_get()
kinc = dot(RUB_1, ki.data)
kf = geometry.kf_get(detector)
kscat = dot(RUB_1, kf.data)
return kinc, kscat
Implementation options:
The new hkl-lib needs careful testing.
toPyspMonitor( ..., singleMonitor = False) , can be set to True to
avoid I/O with the Macroserver to read RegisteredPyspMonitors. Details can be found
here