Verifying scan compatibility
This commit is contained in:
@@ -132,6 +132,25 @@ es1_ddaq:
|
|||||||
# readoutPriority: monitored
|
# readoutPriority: monitored
|
||||||
# softwareTrigger: true
|
# softwareTrigger: true
|
||||||
|
|
||||||
|
|
||||||
|
gfcam:
|
||||||
|
description: GigaFrost camera client
|
||||||
|
deviceClass: tomcat_bec.devices.GigaFrostCamera
|
||||||
|
deviceConfig:
|
||||||
|
prefix: 'X02DA-CAM-GF2:'
|
||||||
|
backend_url: 'http://sls-daq-001:8080'
|
||||||
|
auto_soft_enable: true
|
||||||
|
deviceTags:
|
||||||
|
- camera
|
||||||
|
- trigger
|
||||||
|
- gfcam
|
||||||
|
enabled: true
|
||||||
|
onFailure: buffer
|
||||||
|
readOnly: false
|
||||||
|
readoutPriority: monitored
|
||||||
|
softwareTrigger: true
|
||||||
|
|
||||||
|
|
||||||
# gfcam:
|
# gfcam:
|
||||||
# description: GigaFrost camera client
|
# description: GigaFrost camera client
|
||||||
# deviceClass: tomcat_bec.devices.GigaFrostCamera
|
# deviceClass: tomcat_bec.devices.GigaFrostCamera
|
||||||
@@ -182,6 +201,23 @@ es1_ddaq:
|
|||||||
# readoutPriority: monitored
|
# readoutPriority: monitored
|
||||||
# softwareTrigger: false
|
# softwareTrigger: false
|
||||||
|
|
||||||
|
|
||||||
|
pcocam:
|
||||||
|
description: PCO.edge camera client
|
||||||
|
deviceClass: tomcat_bec.devices.PcoEdge5M
|
||||||
|
deviceConfig:
|
||||||
|
prefix: 'X02DA-CCDCAM2:'
|
||||||
|
deviceTags:
|
||||||
|
- camera
|
||||||
|
- trigger
|
||||||
|
- pcocam
|
||||||
|
enabled: true
|
||||||
|
onFailure: buffer
|
||||||
|
readOnly: false
|
||||||
|
readoutPriority: monitored
|
||||||
|
softwareTrigger: true
|
||||||
|
|
||||||
|
|
||||||
# pcocam:
|
# pcocam:
|
||||||
# description: PCO.edge camera client
|
# description: PCO.edge camera client
|
||||||
# deviceClass: tomcat_bec.devices.PcoEdge5M
|
# deviceClass: tomcat_bec.devices.PcoEdge5M
|
||||||
|
|||||||
@@ -116,38 +116,44 @@ class aa1AxisDriveDataCollection(PSIDeviceBase, Device):
|
|||||||
def on_stage(self) -> None:
|
def on_stage(self) -> None:
|
||||||
"""Configuration and staging"""
|
"""Configuration and staging"""
|
||||||
# Fish out configuration from scaninfo (does not need to be full configuration)
|
# Fish out configuration from scaninfo (does not need to be full configuration)
|
||||||
|
|
||||||
d = {}
|
d = {}
|
||||||
if "kwargs" in self.scaninfo.scan_msg.info:
|
scan_args = {
|
||||||
scanargs = self.scaninfo.scan_msg.info["kwargs"]
|
**self.scan_info.msg.request_inputs["inputs"],
|
||||||
# NOTE: Scans don't have to fully configure the device
|
**self.scan_info.msg.request_inputs["kwargs"],
|
||||||
if "ddc_trigger" in scanargs:
|
**self.scan_info.msg.scan_parameters,
|
||||||
d["ddc_trigger"] = scanargs["ddc_trigger"]
|
}
|
||||||
if "ddc_num_points" in scanargs:
|
# NOTE: Scans don't have to fully configure the device
|
||||||
d["num_points_total"] = scanargs["ddc_num_points"]
|
if "ddc_trigger" in scan_args:
|
||||||
else:
|
d["ddc_trigger"] = scan_args["ddc_trigger"]
|
||||||
# Try to figure out number of points
|
if "ddc_num_points" in scan_args:
|
||||||
num_points = 1
|
d["num_points_total"] = scan_args["ddc_num_points"]
|
||||||
points_valid = False
|
else:
|
||||||
if "steps" in scanargs and scanargs["steps"] is not None:
|
# Try to figure out number of points
|
||||||
num_points *= scanargs["steps"]
|
num_points = 1
|
||||||
points_valid = True
|
points_valid = False
|
||||||
elif "exp_burst" in scanargs and scanargs["exp_burst"] is not None:
|
if "steps" in scan_args and scan_args["steps"] is not None:
|
||||||
num_points *= scanargs["exp_burst"]
|
num_points *= scan_args["steps"]
|
||||||
points_valid = True
|
points_valid = True
|
||||||
elif "repeats" in scanargs and scanargs["repeats"] is not None:
|
if "exp_burst" in scan_args and scan_args["exp_burst"] is not None:
|
||||||
num_points *= scanargs["repeats"]
|
num_points *= scan_args["exp_burst"]
|
||||||
points_valid = True
|
points_valid = True
|
||||||
if points_valid:
|
if "repeats" in scan_args and scan_args["repeats"] is not None:
|
||||||
d["num_points_total"] = num_points
|
num_points *= scan_args["repeats"]
|
||||||
|
points_valid = True
|
||||||
|
if "burst_at_each_point" in scan_args and scan_args["burst_at_each_point"] is not None:
|
||||||
|
num_points *= scan_args["burst_at_each_point"]
|
||||||
|
points_valid = True
|
||||||
|
if points_valid:
|
||||||
|
d["num_points_total"] = num_points
|
||||||
|
|
||||||
# Perform bluesky-style configuration
|
# Perform bluesky-style configuration
|
||||||
if len(d) > 0:
|
if d:
|
||||||
logger.warning(f"[{self.name}] Configuring with:\n{d}")
|
|
||||||
self.configure(d=d)
|
self.configure(d=d)
|
||||||
|
|
||||||
# Stage the data collection if not in internally launced mode
|
# Stage the data collection if not in internally launced mode
|
||||||
# NOTE: Scripted scans start acquiring from the scrits
|
# NOTE: Scripted scans start acquiring from the scrits
|
||||||
if self.scaninfo.scan_type not in ("script", "scripted"):
|
if "scan_type" in scan_args and scan_args["scan_type"] in ("scripted", "script"):
|
||||||
self.arm()
|
self.arm()
|
||||||
# Reset readback
|
# Reset readback
|
||||||
self.reset()
|
self.reset()
|
||||||
|
|||||||
@@ -257,22 +257,24 @@ class aa1AxisPsoDistance(AerotechPsoBase):
|
|||||||
"""
|
"""
|
||||||
# Fish out configuration from scaninfo (does not need to be full configuration)
|
# Fish out configuration from scaninfo (does not need to be full configuration)
|
||||||
d = {}
|
d = {}
|
||||||
if "kwargs" in self.scaninfo.scan_msg.info:
|
scan_args = {
|
||||||
scanargs = self.scaninfo.scan_msg.info["kwargs"]
|
**self.scan_info.msg.request_inputs["inputs"],
|
||||||
if "pso_distance" in scanargs:
|
**self.scan_info.msg.request_inputs["kwargs"],
|
||||||
d["pso_distance"] = scanargs["pso_distance"]
|
**self.scan_info.msg.scan_parameters,
|
||||||
if "pso_wavemode" in scanargs:
|
}
|
||||||
d["pso_wavemode"] = scanargs["pso_wavemode"]
|
if "pso_distance" in scan_args:
|
||||||
if "pso_w_pulse" in scanargs:
|
d["pso_distance"] = scan_args["pso_distance"]
|
||||||
d["pso_w_pulse"] = scanargs["pso_w_pulse"]
|
if "pso_wavemode" in scan_args:
|
||||||
if "pso_t_pulse" in scanargs:
|
d["pso_wavemode"] = scan_args["pso_wavemode"]
|
||||||
d["pso_t_pulse"] = scanargs["pso_t_pulse"]
|
if "pso_w_pulse" in scan_args:
|
||||||
if "pso_n_pulse" in scanargs:
|
d["pso_w_pulse"] = scan_args["pso_w_pulse"]
|
||||||
d["pso_n_pulse"] = scanargs["pso_n_pulse"]
|
if "pso_t_pulse" in scan_args:
|
||||||
|
d["pso_t_pulse"] = scan_args["pso_t_pulse"]
|
||||||
|
if "pso_n_pulse" in scan_args:
|
||||||
|
d["pso_n_pulse"] = scan_args["pso_n_pulse"]
|
||||||
|
|
||||||
# Perform bluesky-style configuration
|
# Perform bluesky-style configuration
|
||||||
if d:
|
if d:
|
||||||
# logger.info(f"[{self.name}] Configuring with:\n{d}")
|
|
||||||
self.configure(d=d)
|
self.configure(d=d)
|
||||||
|
|
||||||
# Stage the PSO distance module
|
# Stage the PSO distance module
|
||||||
|
|||||||
@@ -129,16 +129,19 @@ class aa1Tasks(PSIDeviceBase, Device):
|
|||||||
"""
|
"""
|
||||||
# Fish out our configuration from scaninfo (via explicit or generic addressing)
|
# Fish out our configuration from scaninfo (via explicit or generic addressing)
|
||||||
d = {}
|
d = {}
|
||||||
if "kwargs" in self.scaninfo.scan_msg.info:
|
scan_args = {
|
||||||
scanargs = self.scaninfo.scan_msg.info["kwargs"]
|
**self.scan_info.msg.request_inputs["inputs"],
|
||||||
if self.scaninfo.scan_type in ("script", "scripted"):
|
**self.scan_info.msg.request_inputs["kwargs"],
|
||||||
# NOTE: Scans don't have to fully configure the device
|
**self.scan_info.msg.scan_parameters,
|
||||||
if "script_text" in scanargs and scanargs["script_text"] is not None:
|
}
|
||||||
d["script_text"] = scanargs["script_text"]
|
# if self.scan_info.scan_type in ("script", "scripted"):
|
||||||
if "script_file" in scanargs and scanargs["script_file"] is not None:
|
# NOTE: Scans don't have to fully configure the device
|
||||||
d["script_file"] = scanargs["script_file"]
|
if "script_text" in scan_args and scan_args["script_text"] is not None:
|
||||||
if "script_task" in scanargs and scanargs["script_task"] is not None:
|
d["script_text"] = scan_args["script_text"]
|
||||||
d["script_task"] = scanargs["script_task"]
|
if "script_file" in scan_args and scan_args["script_file"] is not None:
|
||||||
|
d["script_file"] = scan_args["script_file"]
|
||||||
|
if "script_task" in scan_args and scan_args["script_task"] is not None:
|
||||||
|
d["script_task"] = scan_args["script_task"]
|
||||||
|
|
||||||
# FIXME: The above should be exchanged with:
|
# FIXME: The above should be exchanged with:
|
||||||
# d = self.scan_info.scan_msg.scan_parameters.get("aerotech_config")
|
# d = self.scan_info.scan_msg.scan_parameters.get("aerotech_config")
|
||||||
|
|||||||
Reference in New Issue
Block a user