mx-bluesky 0.0.2__py3-none-any.whl → 1.1.0__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- mx_bluesky/__main__.py +1 -2
- mx_bluesky/_version.py +14 -2
- mx_bluesky/beamlines/i04/__init__.py +3 -0
- mx_bluesky/beamlines/i04/callbacks/murko_callback.py +45 -0
- mx_bluesky/beamlines/i04/thawing_plan.py +85 -0
- mx_bluesky/beamlines/i24/serial/__init__.py +49 -0
- mx_bluesky/beamlines/i24/serial/blueapi_config.yaml +12 -0
- mx_bluesky/{I24 → beamlines/i24}/serial/dcid.py +53 -41
- mx_bluesky/{I24 → beamlines/i24}/serial/extruder/EX-gui-edm/DetStage.edl +3 -4
- mx_bluesky/{I24 → beamlines/i24}/serial/extruder/EX-gui-edm/DiamondExtruder-I24-py3v1.edl +28 -32
- mx_bluesky/{I24 → beamlines/i24}/serial/extruder/EX-gui-edm/microdrop_alignment.edl +0 -1
- mx_bluesky/beamlines/i24/serial/extruder/i24ssx_Extruder_Collect_py3v2.py +516 -0
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/FT-gui-edm/CustomChip_py3v1.edl +3 -4
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/FT-gui-edm/DetStage.edl +3 -4
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/FT-gui-edm/DiamondChipI24-py3v1.edl +273 -223
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/FT-gui-edm/ME14E-GeneralPurpose.edl +0 -1
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/FT-gui-edm/MappingLite-oxford_py3v1.edl +12 -13
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/FT-gui-edm/PMAC_Command.edl +0 -1
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/FT-gui-edm/Shutter_Control.edl +0 -1
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/FT-gui-edm/microdrop_alignment.edl +0 -1
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/FT-gui-edm/nudgechip.edl +0 -1
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/FT-gui-edm/pumpprobe-py3v1.edl +273 -143
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/short1-laser.png +0 -0
- mx_bluesky/beamlines/i24/serial/fixed_target/FT-gui-edm/short2-laser.png +0 -0
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/ft_utils.py +24 -1
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_Collect_py3v1.py +808 -0
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/i24ssx_Chip_Manager_py3v1.py +377 -416
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/i24ssx_Chip_Mapping_py3v1.py +34 -40
- mx_bluesky/beamlines/i24/serial/fixed_target/i24ssx_Chip_StartUp_py3v1.py +328 -0
- mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/i24ssx_moveonclick.py +66 -48
- mx_bluesky/{I24 → beamlines/i24}/serial/log.py +66 -19
- mx_bluesky/beamlines/i24/serial/parameters/__init__.py +15 -0
- mx_bluesky/beamlines/i24/serial/parameters/constants.py +47 -0
- mx_bluesky/beamlines/i24/serial/parameters/experiment_parameters.py +103 -0
- mx_bluesky/beamlines/i24/serial/parameters/fixed_target/cs/cs_maker.json +9 -0
- mx_bluesky/{I24 → beamlines/i24}/serial/parameters/fixed_target/cs/motor_direction.txt +1 -1
- mx_bluesky/{I24 → beamlines/i24}/serial/parameters/fixed_target/pvar_files/minichip-oxford.pvar +1 -1
- mx_bluesky/beamlines/i24/serial/parameters/utils.py +42 -0
- mx_bluesky/beamlines/i24/serial/run_extruder.sh +19 -0
- mx_bluesky/beamlines/i24/serial/run_fixed_target.sh +22 -0
- mx_bluesky/beamlines/i24/serial/run_serial.py +36 -0
- mx_bluesky/{I24 → beamlines/i24}/serial/set_visit_directory.sh +6 -1
- mx_bluesky/{I24 → beamlines/i24}/serial/setup_beamline/pv.py +1 -62
- mx_bluesky/{I24 → beamlines/i24}/serial/setup_beamline/pv_abstract.py +6 -7
- mx_bluesky/{I24 → beamlines/i24}/serial/setup_beamline/setup_beamline.py +90 -269
- mx_bluesky/{I24 → beamlines/i24}/serial/setup_beamline/setup_detector.py +47 -40
- mx_bluesky/beamlines/i24/serial/setup_beamline/setup_zebra_plans.py +459 -0
- mx_bluesky/beamlines/i24/serial/start_blueapi.sh +28 -0
- mx_bluesky/beamlines/i24/serial/write_nexus.py +105 -0
- mx_bluesky/example.py +4 -4
- mx_bluesky/hyperion/__init__.py +1 -0
- mx_bluesky/hyperion/__main__.py +374 -0
- mx_bluesky/hyperion/device_setup_plans/__init__.py +0 -0
- mx_bluesky/hyperion/device_setup_plans/dcm_pitch_roll_mirror_adjuster.py +134 -0
- mx_bluesky/hyperion/device_setup_plans/manipulate_sample.py +110 -0
- mx_bluesky/hyperion/device_setup_plans/position_detector.py +16 -0
- mx_bluesky/hyperion/device_setup_plans/read_hardware_for_setup.py +60 -0
- mx_bluesky/hyperion/device_setup_plans/setup_oav.py +87 -0
- mx_bluesky/hyperion/device_setup_plans/setup_panda.py +210 -0
- mx_bluesky/hyperion/device_setup_plans/setup_zebra.py +214 -0
- mx_bluesky/hyperion/device_setup_plans/smargon.py +25 -0
- mx_bluesky/hyperion/device_setup_plans/utils.py +44 -0
- mx_bluesky/hyperion/device_setup_plans/xbpm_feedback.py +93 -0
- mx_bluesky/hyperion/exceptions.py +47 -0
- mx_bluesky/hyperion/experiment_plans/__init__.py +30 -0
- mx_bluesky/hyperion/experiment_plans/experiment_registry.py +84 -0
- mx_bluesky/hyperion/experiment_plans/flyscan_xray_centre_plan.py +528 -0
- mx_bluesky/hyperion/experiment_plans/grid_detect_then_xray_centre_plan.py +209 -0
- mx_bluesky/hyperion/experiment_plans/oav_grid_detection_plan.py +173 -0
- mx_bluesky/hyperion/experiment_plans/oav_snapshot_plan.py +81 -0
- mx_bluesky/hyperion/experiment_plans/optimise_attenuation_plan.py +463 -0
- mx_bluesky/hyperion/experiment_plans/pin_centre_then_xray_centre_plan.py +119 -0
- mx_bluesky/hyperion/experiment_plans/pin_tip_centring_plan.py +164 -0
- mx_bluesky/hyperion/experiment_plans/robot_load_then_centre_plan.py +322 -0
- mx_bluesky/hyperion/experiment_plans/rotation_scan_plan.py +436 -0
- mx_bluesky/hyperion/experiment_plans/set_energy_plan.py +68 -0
- mx_bluesky/hyperion/external_interaction/__init__.py +9 -0
- mx_bluesky/hyperion/external_interaction/callbacks/__init__.py +10 -0
- mx_bluesky/hyperion/external_interaction/callbacks/__main__.py +148 -0
- mx_bluesky/hyperion/external_interaction/callbacks/aperture_change_callback.py +22 -0
- mx_bluesky/hyperion/external_interaction/callbacks/common/__init__.py +0 -0
- mx_bluesky/hyperion/external_interaction/callbacks/common/callback_util.py +46 -0
- mx_bluesky/hyperion/external_interaction/callbacks/common/ispyb_mapping.py +70 -0
- mx_bluesky/hyperion/external_interaction/callbacks/grid_detection_callback.py +88 -0
- mx_bluesky/hyperion/external_interaction/callbacks/ispyb_callback_base.py +203 -0
- mx_bluesky/hyperion/external_interaction/callbacks/log_uid_tag_callback.py +20 -0
- mx_bluesky/hyperion/external_interaction/callbacks/logging_callback.py +29 -0
- mx_bluesky/hyperion/external_interaction/callbacks/plan_reactive_callback.py +101 -0
- mx_bluesky/hyperion/external_interaction/callbacks/robot_load/ispyb_callback.py +88 -0
- mx_bluesky/hyperion/external_interaction/callbacks/rotation/__init__.py +0 -0
- mx_bluesky/hyperion/external_interaction/callbacks/rotation/ispyb_callback.py +174 -0
- mx_bluesky/hyperion/external_interaction/callbacks/rotation/ispyb_mapping.py +17 -0
- mx_bluesky/hyperion/external_interaction/callbacks/rotation/nexus_callback.py +102 -0
- mx_bluesky/hyperion/external_interaction/callbacks/xray_centre/__init__.py +0 -0
- mx_bluesky/hyperion/external_interaction/callbacks/xray_centre/ispyb_callback.py +269 -0
- mx_bluesky/hyperion/external_interaction/callbacks/xray_centre/ispyb_mapping.py +53 -0
- mx_bluesky/hyperion/external_interaction/callbacks/xray_centre/nexus_callback.py +95 -0
- mx_bluesky/hyperion/external_interaction/callbacks/zocalo_callback.py +92 -0
- mx_bluesky/hyperion/external_interaction/config_server.py +35 -0
- mx_bluesky/hyperion/external_interaction/exceptions.py +13 -0
- mx_bluesky/hyperion/external_interaction/ispyb/__init__.py +0 -0
- mx_bluesky/hyperion/external_interaction/ispyb/data_model.py +95 -0
- mx_bluesky/hyperion/external_interaction/ispyb/exp_eye_store.py +125 -0
- mx_bluesky/hyperion/external_interaction/ispyb/ispyb_store.py +276 -0
- mx_bluesky/hyperion/external_interaction/ispyb/ispyb_utils.py +29 -0
- mx_bluesky/hyperion/external_interaction/nexus/__init__.py +0 -0
- mx_bluesky/hyperion/external_interaction/nexus/nexus_utils.py +148 -0
- mx_bluesky/hyperion/external_interaction/nexus/write_nexus.py +114 -0
- mx_bluesky/hyperion/log.py +99 -0
- mx_bluesky/hyperion/parameters/__init__.py +2 -0
- mx_bluesky/hyperion/parameters/cli.py +68 -0
- mx_bluesky/hyperion/parameters/components.py +253 -0
- mx_bluesky/hyperion/parameters/constants.py +158 -0
- mx_bluesky/hyperion/parameters/gridscan.py +216 -0
- mx_bluesky/hyperion/parameters/rotation.py +160 -0
- mx_bluesky/hyperion/resources/panda/panda-gridscan.yaml +964 -0
- mx_bluesky/hyperion/tracing.py +28 -0
- mx_bluesky/hyperion/utils/context.py +84 -0
- mx_bluesky/hyperion/utils/utils.py +25 -0
- mx_bluesky/hyperion/utils/validation.py +196 -0
- mx_bluesky/jupyter_example.ipynb +3 -2
- {mx_bluesky-0.0.2.dist-info → mx_bluesky-1.1.0.dist-info}/METADATA +53 -32
- mx_bluesky-1.1.0.dist-info/RECORD +136 -0
- {mx_bluesky-0.0.2.dist-info → mx_bluesky-1.1.0.dist-info}/WHEEL +1 -1
- mx_bluesky-1.1.0.dist-info/entry_points.txt +8 -0
- mx_bluesky/I24/serial/extruder/i24ssx_Extruder_Collect_py3v2.py +0 -476
- mx_bluesky/I24/serial/fixed_target/FT-gui-edm/ME14E-motors.edl +0 -1874
- mx_bluesky/I24/serial/fixed_target/i24ssx_Chip_Collect_py3v1.py +0 -706
- mx_bluesky/I24/serial/fixed_target/i24ssx_Chip_StartUp_py3v1.py +0 -463
- mx_bluesky/I24/serial/parameters/__init__.py +0 -5
- mx_bluesky/I24/serial/parameters/constants.py +0 -39
- mx_bluesky/I24/serial/parameters/fixed_target/cs/cs_maker.json +0 -9
- mx_bluesky/I24/serial/parameters/fixed_target/cs/fiducial_1.txt +0 -4
- mx_bluesky/I24/serial/parameters/fixed_target/cs/fiducial_2.txt +0 -4
- mx_bluesky/I24/serial/parameters/fixed_target/litemaps/currentchip.map +0 -81
- mx_bluesky/I24/serial/parameters/fixed_target/parameters.txt +0 -13
- mx_bluesky/I24/serial/run_serial.py +0 -52
- mx_bluesky/I24/serial/write_nexus.py +0 -113
- mx_bluesky-0.0.2.dist-info/RECORD +0 -58
- mx_bluesky-0.0.2.dist-info/entry_points.txt +0 -4
- /mx_bluesky/{I24 → beamlines}/__init__.py +0 -0
- /mx_bluesky/{I24/serial → beamlines/i24}/__init__.py +0 -0
- /mx_bluesky/{I24 → beamlines/i24}/serial/extruder/__init__.py +0 -0
- /mx_bluesky/{I24 → beamlines/i24}/serial/fixed_target/__init__.py +0 -0
- /mx_bluesky/{I24 → beamlines/i24}/serial/parameters/fixed_target/pvar_files/oxford.pvar +0 -0
- /mx_bluesky/{I24 → beamlines/i24}/serial/run_ssx.sh +0 -0
- /mx_bluesky/{I24 → beamlines/i24}/serial/setup_beamline/__init__.py +0 -0
- /mx_bluesky/{I24 → beamlines/i24}/serial/setup_beamline/ca.py +0 -0
- {mx_bluesky-0.0.2.dist-info → mx_bluesky-1.1.0.dist-info}/LICENSE +0 -0
- {mx_bluesky-0.0.2.dist-info → mx_bluesky-1.1.0.dist-info}/top_level.txt +0 -0
|
@@ -1,18 +1,39 @@
|
|
|
1
|
-
from __future__ import annotations
|
|
2
|
-
|
|
3
1
|
import functools
|
|
4
2
|
import logging
|
|
5
3
|
import logging.config
|
|
6
4
|
from os import environ
|
|
7
5
|
from pathlib import Path
|
|
8
|
-
|
|
6
|
+
|
|
7
|
+
from dodal.log import (
|
|
8
|
+
ERROR_LOG_BUFFER_LINES,
|
|
9
|
+
integrate_bluesky_and_ophyd_logging,
|
|
10
|
+
set_up_all_logging_handlers,
|
|
11
|
+
)
|
|
12
|
+
from dodal.log import LOGGER as dodal_logger
|
|
13
|
+
|
|
14
|
+
VISIT_PATH = Path("/dls_sw/i24/etc/ssx_current_visit.txt")
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
class OphydDebugFilter(logging.Filter): # NOTE yet to be fully tested
|
|
18
|
+
"""Do not send ophyd debug log messages to stream handler."""
|
|
19
|
+
|
|
20
|
+
def filter(self, record):
|
|
21
|
+
return "ophyd" not in record.getMessage().lower()
|
|
22
|
+
|
|
9
23
|
|
|
10
24
|
# Logging set up
|
|
11
|
-
logging.getLogger("I24ssx")
|
|
25
|
+
logger = logging.getLogger("I24ssx")
|
|
26
|
+
logger.addHandler(logging.NullHandler())
|
|
27
|
+
logger.parent = dodal_logger
|
|
12
28
|
|
|
13
29
|
logging_config = {
|
|
14
30
|
"version": 1,
|
|
15
31
|
"disable_existing_loggers": False,
|
|
32
|
+
"filters": {
|
|
33
|
+
"ophyd_filter": {
|
|
34
|
+
"()": OphydDebugFilter,
|
|
35
|
+
}
|
|
36
|
+
},
|
|
16
37
|
"formatters": {
|
|
17
38
|
"default": {
|
|
18
39
|
"class": "logging.Formatter",
|
|
@@ -24,6 +45,7 @@ logging_config = {
|
|
|
24
45
|
"level": "DEBUG",
|
|
25
46
|
"class": "logging.StreamHandler",
|
|
26
47
|
"formatter": "default",
|
|
48
|
+
"filters": ["ophyd_filter"],
|
|
27
49
|
"stream": "ext://sys.stdout",
|
|
28
50
|
}
|
|
29
51
|
},
|
|
@@ -39,6 +61,12 @@ logging_config = {
|
|
|
39
61
|
logging.config.dictConfig(logging_config)
|
|
40
62
|
|
|
41
63
|
|
|
64
|
+
def _read_visit_directory_from_file() -> Path:
|
|
65
|
+
with open(VISIT_PATH) as f:
|
|
66
|
+
visit = f.readline().rstrip()
|
|
67
|
+
return Path(visit)
|
|
68
|
+
|
|
69
|
+
|
|
42
70
|
def _get_logging_file_path() -> Path:
|
|
43
71
|
"""Get the path to write the artemis log files to.
|
|
44
72
|
If on a beamline, this will be written to the according area depending on the
|
|
@@ -47,26 +75,44 @@ def _get_logging_file_path() -> Path:
|
|
|
47
75
|
Returns:
|
|
48
76
|
logging_path (Path): Path to the log file for the file handler to write to.
|
|
49
77
|
"""
|
|
50
|
-
beamline:
|
|
78
|
+
beamline: str | None = environ.get("BEAMLINE")
|
|
51
79
|
logging_path: Path
|
|
52
80
|
|
|
53
81
|
if beamline:
|
|
54
|
-
logging_path =
|
|
82
|
+
logging_path = _read_visit_directory_from_file() / "tmp/serial/logs"
|
|
55
83
|
else:
|
|
56
84
|
logging_path = Path("./tmp/logs/")
|
|
57
85
|
|
|
58
|
-
|
|
59
|
-
Path(logging_path).mkdir(parents=True, exist_ok=True)
|
|
60
|
-
except OSError:
|
|
61
|
-
# Until https://github.com/DiamondLightSource/mx_bluesky/issues/45 is fixed
|
|
62
|
-
# Logs could also go to the current visit directory, but not always possible
|
|
63
|
-
# when testing
|
|
64
|
-
logging_path = Path("~/serial_logs/").expanduser().resolve()
|
|
65
|
-
Path(logging_path).mkdir(parents=True, exist_ok=True)
|
|
86
|
+
Path(logging_path).mkdir(parents=True, exist_ok=True)
|
|
66
87
|
return logging_path
|
|
67
88
|
|
|
68
89
|
|
|
69
|
-
def
|
|
90
|
+
def default_logging_setup(dev_mode: bool = False):
|
|
91
|
+
""" Default log setup for i24 serial.
|
|
92
|
+
|
|
93
|
+
- Set up handlers for parent logger (from dodal)
|
|
94
|
+
- integrate bluesky and ophyd loggers
|
|
95
|
+
- Remove dodal stream handler to avoid double messages (for now, use only the \
|
|
96
|
+
i24ssx default stream to keep the output expected by the scientists.)
|
|
97
|
+
"""
|
|
98
|
+
handlers = set_up_all_logging_handlers( # noqa: F841
|
|
99
|
+
dodal_logger,
|
|
100
|
+
_get_logging_file_path(),
|
|
101
|
+
"dodal.log",
|
|
102
|
+
dev_mode,
|
|
103
|
+
ERROR_LOG_BUFFER_LINES,
|
|
104
|
+
)
|
|
105
|
+
integrate_bluesky_and_ophyd_logging(dodal_logger)
|
|
106
|
+
# Remove dodal StreamHandler to avoid duplication of messages above debug
|
|
107
|
+
dodal_logger.removeHandler(dodal_logger.handlers[0])
|
|
108
|
+
|
|
109
|
+
|
|
110
|
+
def config(
|
|
111
|
+
logfile: str | None = None,
|
|
112
|
+
write_mode: str = "a",
|
|
113
|
+
delayed: bool = False,
|
|
114
|
+
dev_mode: bool = False,
|
|
115
|
+
):
|
|
70
116
|
"""
|
|
71
117
|
Configure the logging.
|
|
72
118
|
|
|
@@ -75,8 +121,11 @@ def config(logfile: str | None = None, write_mode: str = "a", delayed: bool = Fa
|
|
|
75
121
|
for the logger to write to file the log output. Defaults to None.
|
|
76
122
|
write_mode (str, optional): String indicating writing mode for the output \
|
|
77
123
|
.log file. Defaults to "a".
|
|
124
|
+
dev_mode (bool, optional): If true, will log to graylog on localhost instead \
|
|
125
|
+
of production. Defaults to False.
|
|
78
126
|
"""
|
|
79
|
-
|
|
127
|
+
default_logging_setup(dev_mode=dev_mode)
|
|
128
|
+
|
|
80
129
|
if logfile:
|
|
81
130
|
logs = _get_logging_file_path() / logfile
|
|
82
131
|
fileFormatter = logging.Formatter(
|
|
@@ -90,12 +139,10 @@ def config(logfile: str | None = None, write_mode: str = "a", delayed: bool = Fa
|
|
|
90
139
|
|
|
91
140
|
|
|
92
141
|
def log_on_entry(func):
|
|
93
|
-
logger = logging.getLogger("I24ssx")
|
|
94
|
-
|
|
95
142
|
@functools.wraps(func)
|
|
96
143
|
def decorator(*args, **kwargs):
|
|
97
144
|
name = func.__name__
|
|
98
|
-
logger.debug("Running
|
|
145
|
+
logger.debug(f"Running {name} ")
|
|
99
146
|
return func(*args, **kwargs)
|
|
100
147
|
|
|
101
148
|
return decorator
|
|
@@ -0,0 +1,15 @@
|
|
|
1
|
+
from mx_bluesky.beamlines.i24.serial.parameters.constants import SSXType
|
|
2
|
+
from mx_bluesky.beamlines.i24.serial.parameters.experiment_parameters import (
|
|
3
|
+
ChipDescription,
|
|
4
|
+
ExtruderParameters,
|
|
5
|
+
FixedTargetParameters,
|
|
6
|
+
)
|
|
7
|
+
from mx_bluesky.beamlines.i24.serial.parameters.utils import get_chip_format
|
|
8
|
+
|
|
9
|
+
__all__ = [
|
|
10
|
+
"SSXType",
|
|
11
|
+
"ExtruderParameters",
|
|
12
|
+
"ChipDescription",
|
|
13
|
+
"FixedTargetParameters",
|
|
14
|
+
"get_chip_format",
|
|
15
|
+
]
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
from enum import Enum
|
|
2
|
+
from os import environ
|
|
3
|
+
from pathlib import Path
|
|
4
|
+
|
|
5
|
+
from mx_bluesky.beamlines.i24.serial.log import _read_visit_directory_from_file
|
|
6
|
+
|
|
7
|
+
|
|
8
|
+
class SSXType(Enum):
|
|
9
|
+
FIXED = "Serial Fixed"
|
|
10
|
+
EXTRUDER = "Serial Jet"
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
OAV_CONFIG_FILES = {
|
|
14
|
+
"zoom_params_file": "/dls_sw/i24/software/gda_versions/gda_9_34/config/xml/jCameraManZoomLevels.xml",
|
|
15
|
+
"oav_config_json": "/dls_sw/i24/software/daq_configuration/json/OAVCentring.json",
|
|
16
|
+
"display_config": "/dls_sw/i24/software/gda_versions/var/display.configuration",
|
|
17
|
+
}
|
|
18
|
+
OAV1_CAM = "http://bl24i-di-serv-01.diamond.ac.uk:8080/OAV1.mjpg.mjpg"
|
|
19
|
+
|
|
20
|
+
HEADER_FILES_PATH = Path("/dls_sw/i24/scripts/fastchips/").expanduser().resolve()
|
|
21
|
+
|
|
22
|
+
INTERNAL_FILES_PATH = Path(__file__).absolute().parent
|
|
23
|
+
|
|
24
|
+
|
|
25
|
+
def _params_file_location() -> Path:
|
|
26
|
+
beamline: str | None = environ.get("BEAMLINE")
|
|
27
|
+
filepath: Path
|
|
28
|
+
|
|
29
|
+
if beamline:
|
|
30
|
+
filepath = _read_visit_directory_from_file() / "tmp/serial/parameters"
|
|
31
|
+
else:
|
|
32
|
+
filepath = INTERNAL_FILES_PATH
|
|
33
|
+
|
|
34
|
+
filepath.mkdir(parents=True, exist_ok=True)
|
|
35
|
+
|
|
36
|
+
return filepath
|
|
37
|
+
|
|
38
|
+
|
|
39
|
+
PARAM_FILE_NAME = "parameters.json"
|
|
40
|
+
# Paths for rw - these should have been created on startup
|
|
41
|
+
PARAM_FILE_PATH = _params_file_location()
|
|
42
|
+
PARAM_FILE_PATH_FT = PARAM_FILE_PATH / "fixed_target"
|
|
43
|
+
LITEMAP_PATH = PARAM_FILE_PATH_FT / "litemaps"
|
|
44
|
+
FULLMAP_PATH = PARAM_FILE_PATH_FT / "fullmaps"
|
|
45
|
+
# Paths for r only
|
|
46
|
+
PVAR_FILE_PATH = INTERNAL_FILES_PATH / "fixed_target/pvar_files"
|
|
47
|
+
CS_FILES_PATH = INTERNAL_FILES_PATH / "fixed_target/cs"
|
|
@@ -0,0 +1,103 @@
|
|
|
1
|
+
import json
|
|
2
|
+
from pathlib import Path
|
|
3
|
+
from typing import Literal
|
|
4
|
+
|
|
5
|
+
from pydantic import BaseModel, field_validator
|
|
6
|
+
|
|
7
|
+
from mx_bluesky.beamlines.i24.serial.fixed_target.ft_utils import (
|
|
8
|
+
ChipType,
|
|
9
|
+
MappingType,
|
|
10
|
+
PumpProbeSetting,
|
|
11
|
+
)
|
|
12
|
+
|
|
13
|
+
|
|
14
|
+
class SerialExperiment(BaseModel):
|
|
15
|
+
"""Generic parameters common to all serial experiments."""
|
|
16
|
+
|
|
17
|
+
visit: Path
|
|
18
|
+
directory: str
|
|
19
|
+
filename: str
|
|
20
|
+
exposure_time_s: float
|
|
21
|
+
detector_distance_mm: float
|
|
22
|
+
detector_name: Literal["eiger", "pilatus"]
|
|
23
|
+
|
|
24
|
+
@field_validator("visit", mode="before")
|
|
25
|
+
@classmethod
|
|
26
|
+
def _parse_visit(cls, visit: str | Path):
|
|
27
|
+
if isinstance(visit, str):
|
|
28
|
+
return Path(visit)
|
|
29
|
+
return visit
|
|
30
|
+
|
|
31
|
+
@property
|
|
32
|
+
def collection_directory(self) -> Path:
|
|
33
|
+
return Path(self.visit) / self.directory
|
|
34
|
+
|
|
35
|
+
|
|
36
|
+
class LaserExperiment(BaseModel):
|
|
37
|
+
"""Laser settings for pump probe serial collections."""
|
|
38
|
+
|
|
39
|
+
laser_dwell_s: float | None = None # pump exposure time
|
|
40
|
+
laser_delay_s: float | None = None # pump delay
|
|
41
|
+
pre_pump_exposure_s: float | None = None # Pre illumination, just for chip
|
|
42
|
+
|
|
43
|
+
|
|
44
|
+
class ExtruderParameters(SerialExperiment, LaserExperiment):
|
|
45
|
+
"""Extruder parameter model."""
|
|
46
|
+
|
|
47
|
+
num_images: int
|
|
48
|
+
pump_status: bool
|
|
49
|
+
|
|
50
|
+
@classmethod
|
|
51
|
+
def from_file(cls, filename: str | Path):
|
|
52
|
+
with open(filename) as fh:
|
|
53
|
+
raw_params = json.load(fh)
|
|
54
|
+
return cls(**raw_params)
|
|
55
|
+
|
|
56
|
+
|
|
57
|
+
class ChipDescription(BaseModel):
|
|
58
|
+
"""Parameters defining the chip in use for FT collection."""
|
|
59
|
+
|
|
60
|
+
chip_type: ChipType
|
|
61
|
+
x_num_steps: int
|
|
62
|
+
y_num_steps: int
|
|
63
|
+
x_step_size: float
|
|
64
|
+
y_step_size: float
|
|
65
|
+
x_blocks: int
|
|
66
|
+
y_blocks: int
|
|
67
|
+
b2b_horz: float
|
|
68
|
+
b2b_vert: float
|
|
69
|
+
|
|
70
|
+
@property
|
|
71
|
+
def chip_format(self) -> list[int]:
|
|
72
|
+
return [self.x_blocks, self.y_blocks, self.x_num_steps, self.y_num_steps]
|
|
73
|
+
|
|
74
|
+
@property
|
|
75
|
+
def x_block_size(self) -> float:
|
|
76
|
+
if self.chip_type.name == "Custom":
|
|
77
|
+
return 0.0 # placeholder
|
|
78
|
+
else:
|
|
79
|
+
return ((self.x_num_steps - 1) * self.x_step_size) + self.b2b_horz
|
|
80
|
+
|
|
81
|
+
@property
|
|
82
|
+
def y_block_size(self) -> float:
|
|
83
|
+
if self.chip_type.name == "Custom":
|
|
84
|
+
return 0.0 # placeholder
|
|
85
|
+
else:
|
|
86
|
+
return ((self.y_num_steps - 1) * self.y_step_size) + self.b2b_vert
|
|
87
|
+
|
|
88
|
+
|
|
89
|
+
class FixedTargetParameters(SerialExperiment, LaserExperiment):
|
|
90
|
+
"""Fixed target parameter model."""
|
|
91
|
+
|
|
92
|
+
num_exposures: int
|
|
93
|
+
chip: ChipDescription
|
|
94
|
+
map_type: MappingType
|
|
95
|
+
pump_repeat: PumpProbeSetting
|
|
96
|
+
checker_pattern: bool = False
|
|
97
|
+
total_num_images: int = 0 # Calculated in the code for now
|
|
98
|
+
|
|
99
|
+
@classmethod
|
|
100
|
+
def from_file(cls, filename: str | Path):
|
|
101
|
+
with open(filename) as fh:
|
|
102
|
+
raw_params = json.load(fh)
|
|
103
|
+
return cls(**raw_params)
|
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
from typing import Any
|
|
2
|
+
|
|
3
|
+
from mx_bluesky.beamlines.i24.serial.fixed_target.ft_utils import ChipType
|
|
4
|
+
from mx_bluesky.beamlines.i24.serial.parameters.experiment_parameters import (
|
|
5
|
+
ChipDescription,
|
|
6
|
+
)
|
|
7
|
+
from mx_bluesky.beamlines.i24.serial.setup_beamline import caget, pv
|
|
8
|
+
|
|
9
|
+
|
|
10
|
+
def get_chip_format(chip_type: ChipType) -> ChipDescription:
|
|
11
|
+
"""Default parameter values."""
|
|
12
|
+
defaults: dict[str, int | float] = {}
|
|
13
|
+
match chip_type:
|
|
14
|
+
case ChipType.Oxford:
|
|
15
|
+
defaults["x_num_steps"] = defaults["y_num_steps"] = 20
|
|
16
|
+
defaults["x_step_size"] = defaults["y_step_size"] = 0.125
|
|
17
|
+
defaults["x_blocks"] = defaults["y_blocks"] = 8
|
|
18
|
+
defaults["b2b_horz"] = defaults["b2b_vert"] = 0.800
|
|
19
|
+
case ChipType.OxfordInner:
|
|
20
|
+
defaults["x_num_steps"] = defaults["y_num_steps"] = 25
|
|
21
|
+
defaults["x_step_size"] = defaults["y_step_size"] = 0.600
|
|
22
|
+
defaults["x_blocks"] = defaults["y_blocks"] = 1
|
|
23
|
+
defaults["b2b_horz"] = defaults["b2b_vert"] = 0.0
|
|
24
|
+
case ChipType.Minichip:
|
|
25
|
+
defaults["x_num_steps"] = defaults["y_num_steps"] = 20
|
|
26
|
+
defaults["x_step_size"] = defaults["y_step_size"] = 0.125
|
|
27
|
+
defaults["x_blocks"] = defaults["y_blocks"] = 1
|
|
28
|
+
defaults["b2b_horz"] = defaults["b2b_vert"] = 0.0
|
|
29
|
+
case ChipType.Custom:
|
|
30
|
+
defaults["x_num_steps"] = int(caget(pv.me14e_gp6))
|
|
31
|
+
defaults["y_num_steps"] = int(caget(pv.me14e_gp7))
|
|
32
|
+
defaults["x_step_size"] = float(caget(pv.me14e_gp8))
|
|
33
|
+
defaults["y_step_size"] = float(caget(pv.me14e_gp99))
|
|
34
|
+
defaults["x_blocks"] = defaults["y_blocks"] = 1
|
|
35
|
+
defaults["b2b_horz"] = defaults["b2b_vert"] = 0.0
|
|
36
|
+
case ChipType.MISP:
|
|
37
|
+
defaults["x_num_steps"] = defaults["y_num_steps"] = 78
|
|
38
|
+
defaults["x_step_size"] = defaults["y_step_size"] = 0.1193
|
|
39
|
+
defaults["x_blocks"] = defaults["y_blocks"] = 1
|
|
40
|
+
defaults["b2b_horz"] = defaults["b2b_vert"] = 0.0
|
|
41
|
+
chip_params: dict[str, Any] = {"chip_type": chip_type, **defaults}
|
|
42
|
+
return ChipDescription(**chip_params)
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Get edm path from input
|
|
4
|
+
edm_path=$1
|
|
5
|
+
|
|
6
|
+
# Get the directory of this script
|
|
7
|
+
current=$( realpath "$( dirname "$0" )" )
|
|
8
|
+
|
|
9
|
+
# Run script to start blueapi serve
|
|
10
|
+
. $current/start_blueapi.sh
|
|
11
|
+
|
|
12
|
+
# Open the edm screen for an extruder serial collection
|
|
13
|
+
echo "Starting extruder edm screen."
|
|
14
|
+
edm -x "${edm_path}/EX-gui/DiamondExtruder-I24-py3v1.edl"
|
|
15
|
+
|
|
16
|
+
echo "Edm screen closed, bye!"
|
|
17
|
+
|
|
18
|
+
pgrep blueapi | xargs kill
|
|
19
|
+
echo "Blueapi process killed"
|
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
#!/bin/bash
|
|
2
|
+
|
|
3
|
+
# Get edm path from input
|
|
4
|
+
edm_path=$1
|
|
5
|
+
|
|
6
|
+
# Export env variable for the stages edm to work properly
|
|
7
|
+
export EDMDATAFILES="/dls_sw/prod/R3.14.12.3/support/motor/6-7-1dls14/motorApp/opi/edl"
|
|
8
|
+
|
|
9
|
+
# Get the directory of this script
|
|
10
|
+
current=$( realpath "$( dirname "$0" )" )
|
|
11
|
+
|
|
12
|
+
# Run script to start blueapi serve
|
|
13
|
+
. $current/start_blueapi.sh
|
|
14
|
+
|
|
15
|
+
# Open the edm screen for a fixed target serial collection
|
|
16
|
+
echo "Starting fixed target edm screen."
|
|
17
|
+
edm -x "${edm_path}/FT-gui/DiamondChipI24-py3v1.edl"
|
|
18
|
+
|
|
19
|
+
echo "Edm screen closed, bye!"
|
|
20
|
+
|
|
21
|
+
pgrep blueapi | xargs kill
|
|
22
|
+
echo "Blueapi process killed"
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import logging
|
|
2
|
+
import subprocess
|
|
3
|
+
from os import environ
|
|
4
|
+
from pathlib import Path
|
|
5
|
+
|
|
6
|
+
logger = logging.getLogger("I24ssx.run")
|
|
7
|
+
|
|
8
|
+
|
|
9
|
+
def get_location(default: str = "dev") -> str:
|
|
10
|
+
return environ.get("BEAMLINE") or default
|
|
11
|
+
|
|
12
|
+
|
|
13
|
+
def get_edm_path() -> Path:
|
|
14
|
+
return Path(__file__).parents[5] / "edm_serial"
|
|
15
|
+
|
|
16
|
+
|
|
17
|
+
def _get_file_path() -> Path:
|
|
18
|
+
return Path(__file__).parent
|
|
19
|
+
|
|
20
|
+
|
|
21
|
+
def run_extruder():
|
|
22
|
+
loc = get_location()
|
|
23
|
+
logger.debug(f"Running on {loc}.")
|
|
24
|
+
edm_path = get_edm_path()
|
|
25
|
+
filepath = _get_file_path()
|
|
26
|
+
logger.debug(f"Running {filepath}/run_extruder.sh")
|
|
27
|
+
subprocess.run(["sh", filepath / "run_extruder.sh", edm_path.as_posix()])
|
|
28
|
+
|
|
29
|
+
|
|
30
|
+
def run_fixed_target():
|
|
31
|
+
loc = get_location()
|
|
32
|
+
logger.info(f"Running on {loc}.")
|
|
33
|
+
edm_path = get_edm_path()
|
|
34
|
+
filepath = _get_file_path()
|
|
35
|
+
logger.debug(f"Running {filepath}/run_fixed_target.sh")
|
|
36
|
+
subprocess.run(["sh", filepath / "run_fixed_target.sh", edm_path.as_posix()])
|
|
@@ -30,6 +30,11 @@ echo "Reading visit from file: $filename"
|
|
|
30
30
|
visit=$(sed -n '1p' $filename)
|
|
31
31
|
expt_type=${1:-FT}
|
|
32
32
|
|
|
33
|
+
# Append a / to the visit if missing to avoid filepaths issues later on
|
|
34
|
+
if [[ "${visit: -1}" != "/" ]]; then
|
|
35
|
+
visit="${visit}/"
|
|
36
|
+
fi
|
|
37
|
+
|
|
33
38
|
ex_pv=BL24I-EA-IOC-12:GP1
|
|
34
39
|
ft_pv=ME14E-MO-IOC-01:GP100
|
|
35
40
|
|
|
@@ -48,4 +53,4 @@ then
|
|
|
48
53
|
else
|
|
49
54
|
echo -e "Unknown experiment type, visit PV not set. \nValid experiment values: fixed-target, extruder."
|
|
50
55
|
exit 1
|
|
51
|
-
fi
|
|
56
|
+
fi
|
|
@@ -19,7 +19,7 @@ def __show__(name):
|
|
|
19
19
|
def __which__():
|
|
20
20
|
"""Return script directory, used for finding which pv.py you are running"""
|
|
21
21
|
pathname, scriptname = os.path.split(sys.argv[0])
|
|
22
|
-
print(
|
|
22
|
+
print("Current dir: " + os.path.abspath(pathname))
|
|
23
23
|
print("path to pv.py: ")
|
|
24
24
|
|
|
25
25
|
|
|
@@ -90,60 +90,6 @@ eiger_beamy = "BL24I-EA-EIGER-01:CAM:BeamY"
|
|
|
90
90
|
eiger_omegaincr = "BL24I-EA-EIGER-01:CAM:OmegaIncr"
|
|
91
91
|
eiger_ODfilenameRBV = "BL24I-EA-EIGER-01:OD:FP:FileName_RBV"
|
|
92
92
|
|
|
93
|
-
# eiger_filenumber = 'BL24I-EA-PILAT-01:cam1:FileNumber'
|
|
94
|
-
# eiger_imagemode = 'BL24I-EA-PILAT-01:cam1:ImageMode'
|
|
95
|
-
# eiger_filetemplate = 'BL24I-EA-PILAT-01:cam1:FileTemplate'
|
|
96
|
-
# eiger_delaytime = 'BL24I-EA-PILAT-01:cam1:DelayTime'
|
|
97
|
-
# eiger_filtertrasm = 'BL24I-EA-PILAT-01:cam1:FilterTransm'
|
|
98
|
-
# eiger_filetemplate = 'BL24I-EA-PILAT-01:cam1:FileTemplate'
|
|
99
|
-
# eiger_startangle = 'BL24I-EA-PILAT-01:cam1:StartAngle'
|
|
100
|
-
# eiger_angleincr = 'BL24I-EA-PILAT-01:cam1:AngleIncr'
|
|
101
|
-
|
|
102
|
-
# eiger_cbftemplate = 'BL24I-EA-PILAT-01:cam1:CbfTemplateFile'
|
|
103
|
-
|
|
104
|
-
# ZEBRA
|
|
105
|
-
zebra1_and2_inp1 = "BL24I-EA-ZEBRA-01:AND2_INP1"
|
|
106
|
-
zebra1_and2_inp2 = "BL24I-EA-ZEBRA-01:AND2_INP2"
|
|
107
|
-
zebra1_and3_inp1 = "BL24I-EA-ZEBRA-01:AND3_INP1"
|
|
108
|
-
zebra1_and3_inp2 = "BL24I-EA-ZEBRA-01:AND3_INP2"
|
|
109
|
-
zebra1_and4_inp1 = "BL24I-EA-ZEBRA-01:AND4_INP1"
|
|
110
|
-
zebra1_and4_inp2 = "BL24I-EA-ZEBRA-01:AND4_INP2"
|
|
111
|
-
zebra1_out1_ttl = "BL24I-EA-ZEBRA-01:OUT1_TTL"
|
|
112
|
-
zebra1_out2_ttl = "BL24I-EA-ZEBRA-01:OUT2_TTL"
|
|
113
|
-
zebra1_out3_ttl = "BL24I-EA-ZEBRA-01:OUT3_TTL"
|
|
114
|
-
zebra1_out4_ttl = "BL24I-EA-ZEBRA-01:OUT4_TTL"
|
|
115
|
-
zebra1_pc_arm_out = "BL24I-EA-ZEBRA-01:PC_ARM_OUT"
|
|
116
|
-
zebra1_pc_arm = "BL24I-EA-ZEBRA-01:PC_ARM"
|
|
117
|
-
zebra1_pc_disarm = "BL24I-EA-ZEBRA-01:PC_DISARM"
|
|
118
|
-
zebra1_pc_arm_sel = "BL24I-EA-ZEBRA-01:PC_ARM_SEL"
|
|
119
|
-
zebra1_pc_gate_sel = "BL24I-EA-ZEBRA-01:PC_GATE_SEL"
|
|
120
|
-
zebra1_pc_gate_inp = "BL24I-EA-ZEBRA-01:PC_GATE_INP"
|
|
121
|
-
zebra1_pc_gate_start = "BL24I-EA-ZEBRA-01:PC_GATE_START"
|
|
122
|
-
zebra1_pc_gate_width = "BL24I-EA-ZEBRA-01:PC_GATE_WID"
|
|
123
|
-
zebra1_pc_gate_step = "BL24I-EA-ZEBRA-01:PC_GATE_STEP"
|
|
124
|
-
zebra1_pc_gate_ngate = "BL24I-EA-ZEBRA-01:PC_GATE_NGATE"
|
|
125
|
-
zebra1_pc_pulse_sel = "BL24I-EA-ZEBRA-01:PC_PULSE_SEL"
|
|
126
|
-
zebra1_pc_pulse_inp = "BL24I-EA-ZEBRA-01:PC_PULSE_INP"
|
|
127
|
-
zebra1_pc_pulse_start = "BL24I-EA-ZEBRA-01:PC_PULSE_START"
|
|
128
|
-
zebra1_pc_pulse_width = "BL24I-EA-ZEBRA-01:PC_PULSE_WID"
|
|
129
|
-
zebra1_pc_pulse_step = "BL24I-EA-ZEBRA-01:PC_PULSE_STEP"
|
|
130
|
-
zebra1_pc_pulse_max = "BL24I-EA-ZEBRA-01:PC_PULSE_MAX"
|
|
131
|
-
zebra1_soft_in_b0 = "BL24I-EA-ZEBRA-01:SOFT_IN:B0"
|
|
132
|
-
zebra1_soft_in_b1 = "BL24I-EA-ZEBRA-01:SOFT_IN:B1"
|
|
133
|
-
zebra1_soft_in_b2 = "BL24I-EA-ZEBRA-01:SOFT_IN:B2"
|
|
134
|
-
zebra1_soft_in_b3 = "BL24I-EA-ZEBRA-01:SOFT_IN:B3"
|
|
135
|
-
zebra1_pc_enc = "BL24I-EA-ZEBRA-01:PC_ENC"
|
|
136
|
-
zebra1_pc_dir = "BL24I-EA-ZEBRA-01:PC_DIR"
|
|
137
|
-
zebra1_reset_proc = "BL24I-EA-ZEBRA-01:SYS_RESET.PROC"
|
|
138
|
-
zebra1_config_read_proc = "BL24I-EA-ZEBRA-01:CONFIG_READ.PROC"
|
|
139
|
-
zebra1_or1_ena_b0 = "BL24I-EA-ZEBRA-01:OR1_ENA:B0"
|
|
140
|
-
zebra1_pulse1_inp = "BL24I-EA-ZEBRA-01:PULSE1_INP"
|
|
141
|
-
zebra1_pulse1_delay = "BL24I-EA-ZEBRA-01:PULSE1_DLY"
|
|
142
|
-
zebra1_pulse1_width = "BL24I-EA-ZEBRA-01:PULSE1_WID"
|
|
143
|
-
zebra1_pulse2_inp = "BL24I-EA-ZEBRA-01:PULSE2_INP"
|
|
144
|
-
zebra1_pulse2_delay = "BL24I-EA-ZEBRA-01:PULSE2_DLY"
|
|
145
|
-
zebra1_pulse2_width = "BL24I-EA-ZEBRA-01:PULSE2_WID"
|
|
146
|
-
|
|
147
93
|
# BPMs
|
|
148
94
|
qbpm1_inten = "BL24I-DI-QBPM-01:INTEN"
|
|
149
95
|
qbpm1_intenN = "BL24I-DI-QBPM-01:INTEN_N"
|
|
@@ -209,13 +155,6 @@ dcm_pitch2 = "BL24I-MO-DCM-01:XTAL2:PITCH"
|
|
|
209
155
|
dcm_lambda = "BL24I-MO-DCM-01:LAMBDA"
|
|
210
156
|
dcm_energy = "BL24I-MO-DCM-01:ENERGY"
|
|
211
157
|
|
|
212
|
-
# OLD Mono. Left for short term reference only 10Nov21
|
|
213
|
-
# dcm_bragg = 'BL24I-OP-DCM-01:BRAGG'
|
|
214
|
-
# dcm_t2 = 'BL24I-OP-DCM-01:T2'
|
|
215
|
-
# dcm_roll1 = 'BL24I-OP-DCM-01:ROLL1'
|
|
216
|
-
# dcm_pitch2 = 'BL24I-OP-DCM-01:PITCH2'
|
|
217
|
-
# dcm_lambda = 'BL24I-OP-DCM-01:LAMBDA'
|
|
218
|
-
# dcm_energy = 'BL24I-OP-DCM-01:ENERGY'
|
|
219
158
|
# S2
|
|
220
159
|
s2_x_plus = "BL24I-AL-SLITS-02:X:PLUS"
|
|
221
160
|
s2_x_minus = "BL24I-AL-SLITS-02:X:MINUS"
|
|
@@ -4,11 +4,8 @@ Cleaner abstractions of the PV table.
|
|
|
4
4
|
Takes the PV tables from I24's setup_beamline and wraps a slightly more
|
|
5
5
|
abstract wrapper around them.
|
|
6
6
|
"""
|
|
7
|
-
from __future__ import annotations
|
|
8
7
|
|
|
9
|
-
from
|
|
10
|
-
|
|
11
|
-
from mx_bluesky.I24.serial.setup_beamline import pv
|
|
8
|
+
from mx_bluesky.beamlines.i24.serial.setup_beamline import pv
|
|
12
9
|
|
|
13
10
|
|
|
14
11
|
class Pilatus:
|
|
@@ -19,7 +16,7 @@ class Pilatus:
|
|
|
19
16
|
image_size_pixels = (2463, 2527)
|
|
20
17
|
pixel_size_mm = (0.172, 0.172)
|
|
21
18
|
image_size_mm = tuple(
|
|
22
|
-
round(a * b, 3) for a, b in zip(image_size_pixels, pixel_size_mm)
|
|
19
|
+
round(a * b, 3) for a, b in zip(image_size_pixels, pixel_size_mm, strict=False)
|
|
23
20
|
)
|
|
24
21
|
|
|
25
22
|
det_y_threshold = 560.0
|
|
@@ -48,7 +45,7 @@ class Eiger:
|
|
|
48
45
|
image_size_pixels = (3108, 3262)
|
|
49
46
|
|
|
50
47
|
image_size_mm = tuple(
|
|
51
|
-
round(a * b, 3) for a, b in zip(image_size_pixels, pixel_size_mm)
|
|
48
|
+
round(a * b, 3) for a, b in zip(image_size_pixels, pixel_size_mm, strict=False)
|
|
52
49
|
)
|
|
53
50
|
|
|
54
51
|
det_y_threshold = -10.0
|
|
@@ -58,15 +55,17 @@ class Eiger:
|
|
|
58
55
|
detector_distance = pv.eiger_detdist
|
|
59
56
|
wavelength = pv.eiger_wavelength
|
|
60
57
|
transmission = "BL24I-EA-PILAT-01:cam1:FilterTransm"
|
|
58
|
+
filenameRBV = pv.eiger_ODfilenameRBV
|
|
61
59
|
file_name = pv.eiger_ODfilename
|
|
62
60
|
file_path = pv.eiger_ODfilepath
|
|
63
61
|
file_template = None
|
|
64
62
|
sequence_id = pv.eiger_seqID
|
|
65
63
|
beamx = pv.eiger_beamx
|
|
66
64
|
beamy = pv.eiger_beamy
|
|
65
|
+
bit_depth = pv.eiger_bitdepthrbv
|
|
67
66
|
|
|
68
67
|
def __str__(self) -> str:
|
|
69
68
|
return self.name
|
|
70
69
|
|
|
71
70
|
|
|
72
|
-
Detector =
|
|
71
|
+
Detector = Pilatus | Eiger
|