diff --git a/tomcat_bec/scans/tutorial_fly_scan.py b/tomcat_bec/scans/tutorial_fly_scan.py index 5846aa3..84af846 100644 --- a/tomcat_bec/scans/tutorial_fly_scan.py +++ b/tomcat_bec/scans/tutorial_fly_scan.py @@ -7,16 +7,28 @@ from bec_server.scan_server.scans import Acquire, AsyncFlyScanBase class AcquireDark(Acquire): scan_name = "acquire_dark" - required_kwargs = ["num"] - gui_config = {"Acquisition parameters": ["num"]} + required_kwargs = ["exp_burst"] + gui_config = {"Acquisition parameters": ["exp_burst"]} - def __init__(self, num: int, **kwargs): + def __init__(self, exp_burst: int, **kwargs): """ - Acquire a dark image. This scan is used to acquire a dark image. The dark image is an image taken with the shutter - closed and no beam on the sample. The dark image is used to correct the data images for dark current. + Acquire dark images. This scan is used to acquire dark images. Dark images are images taken with the shutter + closed and no beam on the sample. Dark images are used to correct the data images for dark current. Args: - num (int): number of dark images to acquire + + exp_burst : int + Number of dark images to acquire (no default) + exp_time : float, optional + Exposure time [ms]. If not specified, the currently configured value on the camera will be used + exp_period : float, optional + Exposure period [ms] + image_width : int, optional + ROI size in the x-direction [pixels] + image_height : int, optional + ROI size in the y-direction [pixels] + acq_mode : str, optional + Predefined acquisition mode (default=) Returns: ScanReport @@ -26,7 +38,7 @@ class AcquireDark(Acquire): """ super().__init__(**kwargs) - self.burst_at_each_point = num + self.burst_at_each_point = 1 # At each point, how many times I want to individually trigger self.scan_motors = ["eyex"] # change to the correct shutter device #self.shutter = "eyex" # change to the correct shutter device self.dark_shutter_pos = 0 ### change with a variable diff --git a/tomcat_bec/scripts/scans_fede.py b/tomcat_bec/scripts/scans_fede.py index 373ab99..51a0f58 100644 --- a/tomcat_bec/scripts/scans_fede.py +++ b/tomcat_bec/scripts/scans_fede.py @@ -17,11 +17,9 @@ def fede_darks(nimages_dark, exposure_time=None, exposure_period=None, roix=None acq_mode : str, optional Predefined acquisition mode (default=) - - Example: -------- - tutorialdarks(num=100, exp_time=5) + fede_darks(100, exposure_time=5) """ dev.es1_tasks.enabled = False dev.es1_psod.enabled = False @@ -56,6 +54,4 @@ def fede_darks(nimages_dark, exposure_time=None, exposure_period=None, roix=None ### TODO: camera reset print("Handing over to 'scans.acquire_dark") - scans.acquire_dark(num=1, exp_burst=nimages_dark, exp_time=exposure_time, exp_period=exposure_period, image_width=roix, image_height=roiy) - - + scans.acquire_dark(exp_burst=nimages_dark, exp_time=exposure_time, exp_period=exposure_period, image_width=roix, image_height=roiy, acq_mode=acq_mode) \ No newline at end of file