Clean up PXIII macros and update DCCM theta2 calibration
CI for pxiii_bec / test (push) Successful in 53s

This commit is contained in:
x06da committed 2026-11-02 14:10:23 +01:00
1 parent 2eff41bf64
commit 9f22e66bb2
2 files changed
+32 -1221

No files matched your search

File diff suppressed because it is too large. Load diff
+11 -5
View File
@@ -179,6 +179,12 @@ def mono_pitch_scan(
)
return result
def calculate_theta2(theta1):
"""Calculate initial DCCM theta2 from theta1"""
correction = 0.0007471 * theta1 + 0.0126144
theta2 = -theta1 + correction
return theta2
def get_dccm_motors_positions(energy_ev):
"""
@@ -196,11 +202,11 @@ def get_dccm_motors_positions(energy_ev):
"""
# dccm_motor_values = get_value_from_lut(energy_ev)
th1_angle = -convert_from_energy(energy_ev, print_result=False)["bragg_angle_deg"]
th2_angle = convert_from_energy(energy_ev, temp=298, print_result=False)["bragg_angle_deg"]
# add fudge factor
th2_angle_fudge = th2_angle + 0.006
# dccm_motor_values.update({"theta1_angle": th1_angle, "theta2_angle": th2_angle})
dccm_motor_values = {"theta1_angle": th1_angle, "theta2_angle": th2_angle_fudge}
th2_angle = calculate_theta2(th1_angle)
# # add fudge factor
# th2_angle_fudge = th2_angle + 0.006
# # dccm_motor_values.update({"theta1_angle": th1_angle, "theta2_angle": th2_angle})
dccm_motor_values = {"theta1_angle": th1_angle, "theta2_angle": th2_angle}
return dccm_motor_values