updates for first light prep #221

Merged
appel_c merged 7 commits from first_light_prep into main 2026-06-15 15:51:30 +02:00
8 changed files with 205 additions and 66 deletions
+15 -15
View File
@@ -1,25 +1,25 @@
eiger_1_5:
description: Eiger 1.5M in-vacuum detector
deviceClass: csaxs_bec.devices.jungfraujoch.eiger_1_5m.Eiger1_5M
deviceConfig:
detector_distance: 100
beam_center: [0, 0]
onFailure: raise
enabled: true
readoutPriority: async
softwareTrigger: False
# eiger_9:
# description: Eiger 9M detector
# deviceClass: csaxs_bec.devices.jungfraujoch.eiger_9m.Eiger9M
# eiger_1_5:
# description: Eiger 1.5M in-vacuum detector
# deviceClass: csaxs_bec.devices.jungfraujoch.eiger_1_5m.Eiger1_5M
# deviceConfig:
# detector_distance: 100
# beam_center: [0, 0]
# onFailure: raise
# enabled: true
# enabled: True
# readoutPriority: async
# softwareTrigger: False
eiger_9:
description: Eiger 9M detector
deviceClass: csaxs_bec.devices.jungfraujoch.eiger_9m.Eiger9M
deviceConfig:
detector_distance: 100
beam_center: [0, 0]
onFailure: raise
enabled: True
readoutPriority: async
softwareTrigger: False
# ids_cam:
# description: IDS camera for live image acquisition
# deviceClass: csaxs_bec.devices.ids_cameras.IDSCamera
+14 -12
View File
@@ -34,7 +34,7 @@ mcs:
prefix: 'X12SA-MCS:'
onFailure: raise
enabled: true
readoutPriority: monitored
readoutPriority: async
softwareTrigger: false
@@ -302,6 +302,7 @@ fast_shutter_o1_x:
connectionTimeout: 20
userParameter:
init_position: -15.8
in_position: 9.34
# bl_smar_stage to use csaxs reference method. assign number according to axis channel
bl_smar_stage: 6
@@ -750,6 +751,7 @@ xbimtrx:
connectionTimeout: 20
userParameter:
init_position: -14.7
in_position: 9.5
# bl_smar_stage to use csaxs reference method. assign number according to axis channel
bl_smar_stage: 0
@@ -962,17 +964,17 @@ bs2y:
readoutPriority: baseline
softwareTrigger: false
dttrx:
description: Detector table X
deviceClass: ophyd_devices.devices.psi_motor.EpicsUserMotorVME
deviceConfig:
prefix: X12SA-ES1-DETT:TRX1
deviceTags:
- cSAXS_ES
onFailure: retry
enabled: true
readoutPriority: baseline
softwareTrigger: false
# dttrx:
# description: Detector table X
# deviceClass: ophyd_devices.devices.psi_motor.EpicsUserMotorVME
# deviceConfig:
# prefix: X12SA-ES1-DETT:TRX1
# deviceTags:
# - cSAXS_ES
# onFailure: retry
# enabled: true
# readoutPriority: baseline
# softwareTrigger: false
dttry:
description: Detector table Y
+22 -22
View File
@@ -248,7 +248,7 @@ scinx:
description: scintillator in OPbox
deviceClass: csaxs_bec.devices.smaract.smaract_ophyd.SmaractMotor
deviceConfig:
axis_Id: E
axis_Id: C
host: x12sa-eb-smaract-mcs-03.psi.ch
limits:
- -200
@@ -263,28 +263,28 @@ scinx:
userParameter:
# bl_smar_stage to use csaxs reference method. assign number according to axis channel
init_position: -23
bl_smar_stage: 4
bl_smar_stage: 2
poly:
description: polarizer holder in OPbox
deviceClass: csaxs_bec.devices.smaract.smaract_ophyd.SmaractMotor
deviceConfig:
axis_Id: D
host: x12sa-eb-smaract-mcs-03.psi.ch
limits:
- -200
- 200
port: 5000
sign: 1
enabled: true
onFailure: retry
readOnly: false
readoutPriority: baseline
connectionTimeout: 20
userParameter:
# bl_smar_stage to use csaxs reference method. assign number according to axis channel
init_position: -23
bl_smar_stage: 3
# poly:
# description: polarizer holder in OPbox
# deviceClass: csaxs_bec.devices.smaract.smaract_ophyd.SmaractMotor
# deviceConfig:
# axis_Id: D
# host: x12sa-eb-smaract-mcs-03.psi.ch
# limits:
# - -200
# - 200
# port: 5000
# sign: 1
# enabled: true
# onFailure: retry
# readOnly: false
# readoutPriority: baseline
# connectionTimeout: 20
# userParameter:
# # bl_smar_stage to use csaxs reference method. assign number according to axis channel
# init_position: -23
# bl_smar_stage: 3
# dmm1_trx_readback_example: # This is the same template as for i.e. bpm4i
# description: 'This is an example of a read-only Epics signal'
+137 -6
View File
@@ -1,12 +1,12 @@
# This is the main configuration file that is
# commented or uncommented according to the type of experiment
frontend:
- !include ./bl_frontend.yaml
optics:
- !include ./bl_optics_hutch.yaml
# frontend:
# - !include ./bl_frontend.yaml
endstation:
- !include ./bl_endstation.yaml
@@ -16,8 +16,8 @@ detectors:
#sastt:
# - !include ./sastt.yaml
flomni:
- !include ./ptycho_flomni.yaml
# flomni:
# - !include ./ptycho_flomni.yaml
#omny:
# - !include ./ptycho_omny.yaml
@@ -26,4 +26,135 @@ flomni:
# - !include ./ptycho_lamni.yaml
#user setup:
# - !include ./user_setup.yaml
# - !include ./user_setup.yaml
eyex:
description: Owis motor stage samx
deviceClass: ophyd_devices.devices.psi_motor.EpicsUserMotorVME
deviceConfig:
prefix: X12SA-ES2-ES01
motor_resolution: 0.00125
base_velocity: 0.0625
velocity: 10
backlash_distance: 0.125
acceleration: 0.2
user_offset_dir: 0
deviceTags:
- cSAXS
- owis_samx
onFailure: buffer
enabled: true
readoutPriority: baseline
softwareTrigger: false
eyey:
description: Owis motor stage samx
deviceClass: ophyd_devices.devices.psi_motor.EpicsUserMotorVME
deviceConfig:
prefix: X12SA-ES2-ES02
motor_resolution: 0.00125
base_velocity: 0.0625
velocity: 10
backlash_distance: 0.125
acceleration: 0.2
user_offset_dir: 0
deviceTags:
- cSAXS
- owis_samx
onFailure: buffer
enabled: true
readoutPriority: baseline
softwareTrigger: false
samx:
description: Owis motor stage samx
deviceClass: ophyd_devices.devices.psi_motor.EpicsUserMotorVME
deviceConfig:
prefix: X12SA-ES2-ES18
motor_resolution: 0.000125
base_velocity: 0.00625
velocity: 1
backlash_distance: 0.0125
acceleration: 0.2
user_offset_dir: 0
deviceTags:
- cSAXS
- owis_samx
onFailure: buffer
enabled: true
readoutPriority: baseline
softwareTrigger: false
samy:
description: Owis motor stage samx
deviceClass: ophyd_devices.devices.psi_motor.EpicsUserMotorVME
deviceConfig:
prefix: X12SA-ES2-ES19
motor_resolution: 0.000125
base_velocity: 0.00625
velocity: 1
backlash_distance: 0.0125
acceleration: 0.2
user_offset_dir: 0
deviceTags:
- cSAXS
- owis_samx
onFailure: buffer
enabled: true
readoutPriority: baseline
softwareTrigger: false
# eye_cam:
# description: Camera Microscope
# deviceClass: csaxs_bec.devices.ids_cameras.ids_camera.IDSCamera
# deviceConfig:
# camera_id: 1
# bits_per_pixel: 8
# num_rotation_90: 1
# transpose: false
# force_monochrome: false
# m_n_colormode: 1
# enabled: true
# onFailure: buffer
# readOnly: false
# readoutPriority: async
smarx:
description: sample position x with smaract
deviceClass: csaxs_bec.devices.smaract.smaract_ophyd.SmaractMotor
deviceConfig:
axis_Id: G
host: x12sa-eb-smaract-mcs-05.psi.ch
limits:
- -200
- 200
port: 5000
sign: 1
# precision: 3
# tolerance: 0.005
enabled: true
onFailure: retry
readOnly: false
readoutPriority: baseline
connectionTimeout: 20
userParameter:
#init_position: 0
# bl_smar_stage to use csaxs reference method. assign number according to axis channel
bl_smar_stage: 6
smary:
description: sample position y with smaract
deviceClass: csaxs_bec.devices.smaract.smaract_ophyd.SmaractMotor
deviceConfig:
axis_Id: H
host: x12sa-eb-smaract-mcs-05.psi.ch
limits:
- -200
- 200
port: 5000
sign: 1
# precision: 3
# tolerance: 0.005
enabled: true
onFailure: retry
readOnly: false
readoutPriority: baseline
connectionTimeout: 20
userParameter:
#init_position: 0
# bl_smar_stage to use csaxs reference method. assign number according to axis channel
bl_smar_stage: 7
+4 -1
View File
@@ -364,7 +364,10 @@ class Eiger(PSIDeviceBase):
f"JungfrauJoch broker status: {yaml.dump(broker_status.to_dict(), indent=4)}"
)
if broker_status.message_severity == "error": # Raise on error
raise EigerError(
# raise EigerError(
# f"Device {self.name} acquisition completed with error status from JungfrauJoch broker: {yaml.dump(broker_status.to_dict(), indent=4)}"
# )
logger.warning(
f"Device {self.name} acquisition completed with error status from JungfrauJoch broker: {yaml.dump(broker_status.to_dict(), indent=4)}"
)
# Call API endpoint to get statistics
@@ -73,21 +73,21 @@ class BPMControl(PSIPseudoDeviceBase):
BECProcessedSignal,
name="gain",
model_config=None,
kind=Kind.config,
kind=Kind.normal,
doc="Gain of the amplifier",
)
coupling = Cpt(
BECProcessedSignal,
name="coupling",
model_config=None,
kind=Kind.config,
kind=Kind.normal,
doc="Coupling of the amplifier",
)
speed = Cpt(
BECProcessedSignal,
name="speed",
model_config=None,
kind=Kind.config,
kind=Kind.normal,
doc="Speed of the amplifier",
)
+1 -1
View File
@@ -18,7 +18,7 @@ dependencies = [
"bec_server",
"ophyd_devices~=1.29",
"std_daq_client",
"jfjoch-client==1.0.0rc126",
"jfjoch-client==1.0.0rc148",
"rich",
"pyepics",
"pyueye", # for the IDS uEye camera
+9 -6
View File
@@ -72,9 +72,9 @@ def detector_list(request) -> Generator[DetectorList, None, None]:
width=512,
height=512,
pixel_size_mm=0.1,
readout_time_us=100,
min_frame_time_us=1000,
min_count_time_us=100,
readout_time_ns=100000,
min_frame_time_ns=1000000,
min_count_time_ns=100000,
type="EIGER",
),
DetectorListElement(
@@ -87,9 +87,9 @@ def detector_list(request) -> Generator[DetectorList, None, None]:
width=512,
height=512,
pixel_size_mm=0.1,
readout_time_us=100,
min_frame_time_us=1000,
min_count_time_us=100,
readout_time_ns=100000,
min_frame_time_ns=1000000,
min_count_time_ns=100000,
type="EIGER",
),
],
@@ -314,6 +314,9 @@ def test_eiger_on_complete(eiger_1_5m, raise_timeout):
assert status.success == False if raise_timeout else True
@pytest.mark.skip(
reason="This test currently fails because the error should be skipped for now due to HW issues."
)
def test_eiger_on_complete_error_message(eiger_1_5m):
"""Test that on_complete raises if the message severity is error."""
# Test that on_complete raises if message_severity is error