Compare commits
2 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 4a00d3baeb | |||
| 52d97b2d29 |
@@ -416,25 +416,31 @@ class Mo1Bragg(PSIDeviceBase, Mo1BraggPositioner):
|
||||
Returns:
|
||||
output (float): Converted angle or energy
|
||||
"""
|
||||
|
||||
self.calculator.calc_reset.put(0)
|
||||
self.calculator.calc_reset.put(1)
|
||||
status = CompareStatus(self.calculator.calc_done, 0)
|
||||
self.cancel_on_stop(status)
|
||||
status.wait(self.timeout_for_pvwait)
|
||||
self.calculator.calc_reset.put(0)
|
||||
|
||||
if mode == "AngleToEnergy":
|
||||
self.calculator.calc_angle.put(inp)
|
||||
in_signal = self.calculator.calc_angle
|
||||
out_signal = self.calculator.calc_energy
|
||||
elif mode == "EnergyToAngle":
|
||||
self.calculator.calc_energy.put(inp)
|
||||
in_signal = self.calculator.calc_energy
|
||||
out_signal = self.calculator.calc_angle
|
||||
else:
|
||||
raise Mo1BraggError(f'Unknown mode {mode}')
|
||||
|
||||
in_signal.put(inp)
|
||||
status = CompareStatus(self.calculator.calc_done, 1)
|
||||
self.cancel_on_stop(status)
|
||||
status.wait(self.timeout_for_pvwait)
|
||||
time.sleep(0.25) # TODO needed still? Needed due to update frequency of softIOC
|
||||
if mode == "AngleToEnergy":
|
||||
return self.calculator.calc_energy.get()
|
||||
elif mode == "EnergyToAngle":
|
||||
return self.calculator.calc_angle.get()
|
||||
status = CompareStatus(out_signal, 0, operation_success='>')
|
||||
self.cancel_on_stop(status)
|
||||
status.wait(self.timeout_for_pvwait)
|
||||
return out_signal.get()
|
||||
|
||||
def set_advanced_xas_settings(
|
||||
self, low: float, high: float, scan_time: float, p_kink: float, e_kink: float
|
||||
|
||||
@@ -545,11 +545,11 @@ class Pilatus(PSIDeviceBase, ADBase):
|
||||
self.cam.array_callbacks.set(1).wait(5) # Enable array callbacks
|
||||
self.hdf.enable.set(1).wait(5) # Enable HDF5 plugin
|
||||
# Camera settings
|
||||
self.cam.num_exposures.set(1).wait(5)
|
||||
self.cam.num_images.set(self.n_images).wait(5)
|
||||
self.cam.acquire_time.set(detector_exp_time).wait(5) # let's try this
|
||||
self.cam.acquire_period.set(exp_time).wait(5)
|
||||
self.filter_number.set(0).wait(5)
|
||||
self.cam.num_exposures.set(1, timeout=5).wait()
|
||||
self.cam.num_images.set(self.n_images, timeout=5).wait()
|
||||
self.cam.acquire_time.set(detector_exp_time, timeout=5).wait() # let's try this
|
||||
self.cam.acquire_period.set(exp_time, timeout=5).wait()
|
||||
self.filter_number.set(0, timeout=5).wait()
|
||||
# HDF5 settings
|
||||
logger.debug(
|
||||
f"Setting HDF5 file path to {file_path} and file name to {file_name}. full_path is {self._full_path}"
|
||||
|
||||
Reference in New Issue
Block a user