Before redeployment
This commit is contained in:
@@ -71,7 +71,7 @@ es1_tasks:
|
|||||||
prefix: 'X02DA-ES1-SMP1:TASK:'
|
prefix: 'X02DA-ES1-SMP1:TASK:'
|
||||||
deviceTags:
|
deviceTags:
|
||||||
- es1
|
- es1
|
||||||
enabled: true
|
enabled: false
|
||||||
onFailure: buffer
|
onFailure: buffer
|
||||||
readOnly: false
|
readOnly: false
|
||||||
readoutPriority: monitored
|
readoutPriority: monitored
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ class TomcatSnapNStep(AsyncFlyScanBase):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
scan_name = "tomcatsnapnstepscan"
|
scan_name = "tomcatsnapnstepscan"
|
||||||
scan_type = "scripted"
|
# scan_type = "scripted"
|
||||||
# arg_input = {"camera" : ScanArgType.DEVICE,
|
# arg_input = {"camera" : ScanArgType.DEVICE,
|
||||||
# "exp_time" : ScanArgType.FLOAT}
|
# "exp_time" : ScanArgType.FLOAT}
|
||||||
# arg_bundle_size= {"bundle": len(arg_input), "min": 1, "max": None}
|
# arg_bundle_size= {"bundle": len(arg_input), "min": 1, "max": None}
|
||||||
@@ -165,7 +165,7 @@ class TomcatSimpleSequence(AsyncFlyScanBase):
|
|||||||
"""
|
"""
|
||||||
|
|
||||||
scan_name = "tomcatsimplesequencescan"
|
scan_name = "tomcatsimplesequencescan"
|
||||||
scan_type = "scripted"
|
# scan_type = "scripted"
|
||||||
scan_report_hint = "table"
|
scan_report_hint = "table"
|
||||||
required_kwargs = ["scan_start", "gate_high", "gate_low"]
|
required_kwargs = ["scan_start", "gate_high", "gate_low"]
|
||||||
gui_config = {
|
gui_config = {
|
||||||
|
|||||||
@@ -104,7 +104,6 @@ class AcquireWhite(Acquire):
|
|||||||
self.sample_angle_out = sample_angle_out
|
self.sample_angle_out = sample_angle_out
|
||||||
self.motor_sample = motor
|
self.motor_sample = motor
|
||||||
|
|
||||||
self.scan_motors = ["eyex", self.motor_sample, "es1_roty"] # change to the correct shutter device
|
|
||||||
self.dark_shutter_pos_out = 1 ### change with a variable
|
self.dark_shutter_pos_out = 1 ### change with a variable
|
||||||
self.dark_shutter_pos_in = 0 ### change with a variable
|
self.dark_shutter_pos_in = 0 ### change with a variable
|
||||||
|
|
||||||
@@ -209,6 +208,7 @@ class AcquireProjections(AsyncFlyScanBase):
|
|||||||
)
|
)
|
||||||
|
|
||||||
yield from self.stubs.trigger()
|
yield from self.stubs.trigger()
|
||||||
|
|
||||||
while not flyer_request.done:
|
while not flyer_request.done:
|
||||||
|
|
||||||
yield from self.stubs.read(
|
yield from self.stubs.read(
|
||||||
@@ -301,10 +301,11 @@ class AcquireRefs(Acquire):
|
|||||||
show_asap=True,
|
show_asap=True,
|
||||||
rid=self.metadata.get("RID"),
|
rid=self.metadata.get("RID"),
|
||||||
)
|
)
|
||||||
|
|
||||||
# to set signals on a device
|
# to set signals on a device
|
||||||
yield from self.stubs.send_rpc_and_wait("gfdaq", "file_prefix.set", self.file_prefix_dark)
|
yield from self.stubs.send_rpc_and_wait("gfdaq", "file_prefix.set", self.file_prefix_dark)
|
||||||
yield from self.stubs.send_rpc_and_wait("gfdaq", "num_images.set", self.num_darks)
|
# yield from self.stubs.send_rpc_and_wait("gfdaq", "num_images.set", self.num_darks)
|
||||||
|
|
||||||
darks = AcquireDark(
|
darks = AcquireDark(
|
||||||
exp_burst=self.num_darks,
|
exp_burst=self.num_darks,
|
||||||
device_manager=self.device_manager,
|
device_manager=self.device_manager,
|
||||||
@@ -317,28 +318,30 @@ class AcquireRefs(Acquire):
|
|||||||
self.point_id = darks.point_id
|
self.point_id = darks.point_id
|
||||||
|
|
||||||
status_sample_out_angle.wait()
|
status_sample_out_angle.wait()
|
||||||
if self.num_flats:
|
# if self.num_flats:
|
||||||
self.connector.send_client_info(
|
# self.connector.send_client_info(
|
||||||
f"Acquiring {self.num_flats} flat field images",
|
# f"Acquiring {self.num_flats} flat field images",
|
||||||
show_asap=True,
|
# show_asap=True,
|
||||||
rid=self.metadata.get("RID"),
|
# rid=self.metadata.get("RID"),
|
||||||
)
|
# )
|
||||||
flats = AcquireWhite(
|
# yield from self.stubs.send_rpc_and_wait("gfdaq", "file_prefix.set", self.file_prefix_white)
|
||||||
exp_burst=self.num_flats,
|
# yield from self.stubs.send_rpc_and_wait("gfdaq", "num_images.set", self.num_flats)
|
||||||
sample_position_out=self.sample_position_out,
|
|
||||||
sample_angle_out=self.sample_angle_out,
|
# flats = AcquireWhite(
|
||||||
motor=self.motor,
|
# exp_burst=self.num_flats,
|
||||||
file_prefix=self.file_prefix_white,
|
# #sample_position_out=self.sample_position_out,
|
||||||
device_manager=self.device_manager,
|
# #sample_angle_out=self.sample_angle_out,
|
||||||
metadata=self.metadata,
|
# #motor=self.motor,
|
||||||
instruction_handler=self.stubs._instruction_handler,
|
# device_manager=self.device_manager,
|
||||||
**self.caller_kwargs,
|
# metadata=self.metadata,
|
||||||
)
|
# instruction_handler=self.stubs._instruction_handler,
|
||||||
flats.point_id = self.point_id
|
# **self.caller_kwargs,
|
||||||
yield from flats.scan_core()
|
# )
|
||||||
self.point_id = flats.point_id
|
# flats.point_id = self.point_id
|
||||||
## TODO move sample in beam and do not wait
|
# yield from flats.scan_core()
|
||||||
## TODO move rotation to angle and do not wait
|
# self.point_id = flats.point_id
|
||||||
|
# ## TODO move sample in beam and do not wait
|
||||||
|
# ## TODO move rotation to angle and do not wait
|
||||||
|
|
||||||
|
|
||||||
class TutorialFlyScanContLine(AsyncFlyScanBase):
|
class TutorialFlyScanContLine(AsyncFlyScanBase):
|
||||||
|
|||||||
@@ -276,37 +276,37 @@ class Measurement:
|
|||||||
TODO: make it work for multiple devices
|
TODO: make it work for multiple devices
|
||||||
"""
|
"""
|
||||||
|
|
||||||
print("Sample name: " + self.sample_name)
|
print("Sample name (sample_name): " + self.sample_name)
|
||||||
print("Data path: " + self.data_path)
|
print("Data path (data_path): " + self.data_path)
|
||||||
print("Number of images: " + str(self.nimages))
|
print("Number of images (nimages): " + str(self.nimages))
|
||||||
print("Number of darks: " + str(self.nimages_dark))
|
print("Number of darks (nimages_dark): " + str(self.nimages_dark))
|
||||||
print("Number of flats: " + str(self.nimages_white))
|
print("Number of flats (nimages_flat): " + str(self.nimages_white))
|
||||||
if self.exposure_time == None:
|
if self.exposure_time == None:
|
||||||
print("Exposure time: " + str(self.det.cfgExposure.get()))
|
print("Exposure time (exposure_time): " + str(self.det.cfgExposure.get()))
|
||||||
self.exposure_time = self.det.cfgExposure.get()
|
self.exposure_time = self.det.cfgExposure.get()
|
||||||
else:
|
else:
|
||||||
print("Exposure time: " + str(self.exposure_time))
|
print("Exposure time (exposure_time): " + str(self.exposure_time))
|
||||||
if self.exposure_period == None:
|
if self.exposure_period == None:
|
||||||
print("Exposure period: " + str(self.det.cfgFramerate.get()))
|
print("Exposure period (exposure_period): " + str(self.det.cfgFramerate.get()))
|
||||||
self.exposure_period = self.det.cfgFramerate.get()
|
self.exposure_period = self.det.cfgFramerate.get()
|
||||||
else:
|
else:
|
||||||
print("Exposure period: " + str(self.exposure_period))
|
print("Exposure period (exposure_period): " + str(self.exposure_period))
|
||||||
if self.roix == None:
|
if self.roix == None:
|
||||||
print("Roix: " + str(self.det.cfgRoiX.get()))
|
print("Roix (roix): " + str(self.det.cfgRoiX.get()))
|
||||||
self.roix = self.det.cfgRoiX.get()
|
self.roix = self.det.cfgRoiX.get()
|
||||||
else:
|
else:
|
||||||
print("Roix: " + str(self.roix))
|
print("Roix (roix): " + str(self.roix))
|
||||||
if self.roiy == None:
|
if self.roiy == None:
|
||||||
print("Roiy: " + str(self.det.cfgRoiY.get()))
|
print("Roiy (roiy): " + str(self.det.cfgRoiY.get()))
|
||||||
self.roiy = self.det.cfgRoiY.get()
|
self.roiy = self.det.cfgRoiY.get()
|
||||||
else:
|
else:
|
||||||
print("Roiy: " + str(self.roiy))
|
print("Roiy (roiy): " + str(self.roiy))
|
||||||
print("Start angle: " + str(self.start_angle))
|
print("Start angle (start_angle): " + str(self.start_angle))
|
||||||
print("Angular range: " + str(self.angular_range))
|
print("Angular range (angular_range): " + str(self.angular_range))
|
||||||
print("Sample angle out: " + str(self.sample_angle_out))
|
print("Sample angle out (sample_angle_out): " + str(self.sample_angle_out))
|
||||||
print("Sample position in: " + str(self.sample_position_in))
|
print("Sample position in (sample_position_in): " + str(self.sample_position_in))
|
||||||
print("Sample position out: " + str(self.sample_position_out))
|
print("Sample position out (sample_position_out): " + str(self.sample_position_out))
|
||||||
print("Position readback: " + str(self.position_rb))
|
print("Position readback (position_rb): " + str(self.position_rb))
|
||||||
|
|
||||||
|
|
||||||
def acquire_darks(self,nimages_dark=None, exposure_time=None, exposure_period=None,
|
def acquire_darks(self,nimages_dark=None, exposure_time=None, exposure_period=None,
|
||||||
@@ -472,7 +472,7 @@ class Measurement:
|
|||||||
base_path=self.base_path,file_prefix=self.file_prefix, ddc_trigger=4, ddc_source0=1, **kwargs)
|
base_path=self.base_path,file_prefix=self.file_prefix, ddc_trigger=4, ddc_source0=1, **kwargs)
|
||||||
|
|
||||||
|
|
||||||
def acquire_refs(self,nimages_dark=None, nimages_white=None, sample_angle_out=None,
|
def acquire_refs(self, motor="eyez", nimages_dark=None, nimages_white=None, sample_angle_out=None,
|
||||||
sample_position_in=None, sample_position_out=None,
|
sample_position_in=None, sample_position_out=None,
|
||||||
exposure_time=None, exposure_period=None,
|
exposure_time=None, exposure_period=None,
|
||||||
roix=None, roiy=None, acq_mode=None, **kwargs):
|
roix=None, roiy=None, acq_mode=None, **kwargs):
|
||||||
@@ -484,6 +484,8 @@ class Measurement:
|
|||||||
|
|
||||||
Parameters
|
Parameters
|
||||||
----------
|
----------
|
||||||
|
motor : DeviceBase
|
||||||
|
Motor to be moved to move the sample out of beam
|
||||||
darks : int, optional
|
darks : int, optional
|
||||||
Number of dark images to acquire (no default)
|
Number of dark images to acquire (no default)
|
||||||
nimages_whites : int, optional
|
nimages_whites : int, optional
|
||||||
@@ -534,9 +536,12 @@ class Measurement:
|
|||||||
self.build_filename(acquisition_type='white')
|
self.build_filename(acquisition_type='white')
|
||||||
file_prefix_white = self.file_prefix
|
file_prefix_white = self.file_prefix
|
||||||
|
|
||||||
|
print(file_prefix_dark)
|
||||||
|
print(file_prefix_white)
|
||||||
|
|
||||||
### TODO: camera reset
|
### TODO: camera reset
|
||||||
print("Handing over to 'scans.acquire_refs")
|
print("Handing over to 'scans.acquire_refs")
|
||||||
scans.acquire_refs(num_darks=self.nimages_dark, num_flats=self.nimages_white, sample_angle_out=self.sample_angle_out,
|
scans.acquire_refs(motor=motor, num_darks=self.nimages_dark, num_flats=self.nimages_white, sample_angle_out=self.sample_angle_out,
|
||||||
sample_position_in=self.sample_position_in, sample_position_out=self.sample_position_out,
|
sample_position_in=self.sample_position_in, sample_position_out=self.sample_position_out,
|
||||||
exp_time=self.exposure_time, exp_period=self.exposure_period, image_width=self.roix,
|
exp_time=self.exposure_time, exp_period=self.exposure_period, image_width=self.roix,
|
||||||
image_height=self.roiy, acq_mode='default', file_path=self.file_path, nr_writers=2, base_path=self.base_path,
|
image_height=self.roiy, acq_mode='default', file_path=self.file_path, nr_writers=2, base_path=self.base_path,
|
||||||
|
|||||||
Reference in New Issue
Block a user