updates for p22761 PuMa

This commit is contained in:
2025-09-11 17:38:48 +02:00
parent cce4cf69ed
commit 84948e2b7f
5 changed files with 70 additions and 26 deletions

View File

@@ -31,11 +31,11 @@ DCCM_MOVE = True
TRAJECTORY_FEEDBACK_DISABLE_ENABLE = False
POINTING_FEEDFORWARD = False
energy_offset_undulators = 41 # eV
energy_offset_PSSS = 1 # eV
energy_offset_undulators = 52 # eV
energy_offset_PSSS = 2 # eV
energy_offset_DCCM = 0 # eV
DCCM_RX2_energy_offset = 6.05 # eV
DCCM_RX2_energy_offset = 1.6 # eV
# eV
################

View File

@@ -9,7 +9,7 @@ from slic.core.acquisition.detcfg import DetectorConfig
detectors = [
"JF16T03V02", # 1.5M from 2025
# "JF16T03V01", # 1.5M from 2022
"JF17T16V01", # 8M
# "JF17T16V01", # 8M
"JF20T01V01", # IO
# "JF05T01V01", # 0.5M stripsel borrowed from Bernina, now registered in esc network
]
@@ -75,12 +75,12 @@ detectors_I0_only["JF20T01V01"]['geometry'] = False
# 12, 13, 14, 15] # bottom module:0, middle module:1, top module:2
detectors["JF17T16V01"]['remove_raw_files'] = True # We switched off quite a few modules, let's not keep all the raw data.
detectors["JF17T16V01"]['compression'] = True
detectors["JF17T16V01"]['adc_to_energy'] = True # We switched off quite a few modules, let's not keep all the raw data.
detectors["JF17T16V01"]['factor'] = 0.1 # Some useful compromise to save space.
detectors["JF17T16V01"]['save_dap_results'] = False
detectors["JF17T16V01"]['geometry'] = True
#detectors["JF17T16V01"]['remove_raw_files'] = True # We switched off quite a few modules, let's not keep all the raw data.
#detectors["JF17T16V01"]['compression'] = True
#detectors["JF17T16V01"]['adc_to_energy'] = True # We switched off quite a few modules, let's not keep all the raw data.
#detectors["JF17T16V01"]['factor'] = 0.1 # Some useful compromise to save space.
#detectors["JF17T16V01"]['save_dap_results'] = False
#detectors["JF17T16V01"]['geometry'] = True
detectors_MX = DetectorConfig()

View File

@@ -881,6 +881,22 @@ pvs_DilSc_Lakeshore = [
ID_DilSc_LakeShore + ":H0_PWR_GET",
]
###############################
# PuMa Aerotech motor controller
ID_PuMa_Aerotech = "SARES30-PUMA"
pvs_PuMa_Aerotech = [
ID_PuMa_Aerotech + "-SX:MOT.RBV",
ID_PuMa_Aerotech + "-SY:MOT.RBV",
ID_PuMa_Aerotech + "-SZ:MOT.RBV",
ID_PuMa_Aerotech + "-SR:MOT.RBV",
ID_PuMa_Aerotech + "-MX:MOT.RBV",
ID_PuMa_Aerotech + "-MY:MOT.RBV",
ID_PuMa_Aerotech + "-MZ:MOT.RBV",
ID_PuMa_Aerotech + "-MR:MOT.RBV",
]
###############################
# Huber vertical stage
@@ -954,10 +970,11 @@ pv_channels = (
+ pvs_standa
# + pvs_newport_300
# + pvs_smaract_xyz
+ pvs_diffractometer_1
# + pvs_diffractometer_1
+ pvs_diffractometer_2
+ pvs_diffractometer_extras
+ pvs_DilSc_Lakeshore
# + pvs_DilSc_Lakeshore
+ pvs_PuMa_Aerotech
+ pvs_huber_z
+ pvs_JJ_slits
# + pvs_attocube

View File

@@ -134,6 +134,10 @@ from beamline import photon_energy
cr_photon_energy = photon_energy.PhotonEnergy()
# added limit to photon energy setpoint
cr_photon_energy.set_limits(5720-100, 5720+100)
logger.info(f"Photon energy offsets: PSSS {photon_energy.energy_offset_PSSS} eV , DCCM {photon_energy.energy_offset_DCCM} eV, undulator {photon_energy.energy_offset_undulators} eV.")
@@ -163,7 +167,7 @@ dm1 = Diffractometer("SARES31-GPS")
dm2 = Diffractometer("SARES32-GPS")
# Set according to which diffractometer is being used
diffractometer = dm1
diffractometer = dm2
# Dilution fridge
#from crq_exp.dilsc import Dilution
@@ -192,6 +196,10 @@ downstream_transmission = PVAdjustable("SARFE10-OATT053:UsrRec.TC1")
from crq_exp.puma import Puma
puma = Puma()
################# Stand setup ##################
# TODO: requires the stand client, need small howto how to start and configure or let it run all the time
@@ -202,23 +210,31 @@ time_adjustable = Time()
adjs_for_spreadsheet = {
"Time": time_adjustable,
"T_reg": T_reg,
"T_plato": T_plato,
"T_chip":T_chip,
# "T_reg": T_reg,
# "T_plato": T_plato,
# "T_chip":T_chip,
"Transmission": downstream_transmission,
"Upstream Transmission": upstream_transmission,
"Energy_setpoint": cr_photon_energy,
"Energy_offset undulator": photon_energy.energy_offset_undulators,
"TD": diffractometer.td,
"TDY": diffractometer.td_y,
"TRX": diffractometer.tr_x,
"TRY": diffractometer.tr_y,
"TRXBASE": diffractometer.trx_base,
"TRYBASE": diffractometer.try_base,
"THETA": diffractometer.theta,
"TWOTHETA": diffractometer.twotheta,
"Sample_X": puma.sample_x,
"Sample_Y": puma.sample_y,
"Sample_Z": puma.sample_z,
"Sample_R": puma.sample_r,
"Magnet_X": puma.magnet_x,
"Magnet_Y": puma.magnet_y,
"Magnet_Z": puma.magnet_z,
}
dilution = None
if dilution is not None:
adjs_dilsc = {
#"Magnet_X": dilution.x,
@@ -316,7 +332,7 @@ DAQS = multiple_daqs.generate_DAQS(instrument, pgroup, bs_channels, pv_channels,
# required fraction defines amount of data recorded to save the step and move on to the next one
check_intensity_gas_monitor = PVCondition(
"SARFE10-PBPG050:PHOTON-ENERGY-PER-PULSE-US",
vmin=500,
vmin=400,
vmax=2000,
wait_time=0.5,
required_fraction=0.8,
@@ -342,6 +358,8 @@ from slic.utils import nice_arange
from crq_exp import synchronization
# Temperature setpoint
temperature_setpoint=PVAdjustable('SARES31-DIL-LS1:H0_SETP_SET')
# d fixed to 3.0 mm, x_0 = 4.574 mm and theta_0 = -67.853 deg
import numpy as np
@@ -361,7 +379,7 @@ TRX = d * np.sin(np.deg2rad(thetas + theta_0)) + x_0
linked_theta_s3 = LinkedInterpolated("ThetaLinked", diffractometer.theta, diffractometer.tr_x, thetas, TRX)
# Beware: double_pixels_action interpolate does not seem to work, results in empty data
detector_8M = DetectorConfig()
detector_8M.add("JF17T16V01", adc_to_energy=True, compression=True, crystfel_lists_laser=False, factor=0.1,
remove_raw_files=True, save_dap_results=False, geometry=True, disabled_modules = [0,1,2,3,4,5,8,9,10,11,12,13,14,15],double_pixels_action="keep")
@@ -420,11 +438,18 @@ def scan_with_sync(adjustable, start_pos, end_pos, step_size, n_pulses, filename
while not successful_acquisition:
condition.clear_and_start_counting()
# Measure the step and save the pids
pids = synchronization.start_sequence(n_pulses)
scan_info_d = scaninfo.to_sfdaq_dict()
successful_acquisition = check_intensity_gas_monitor.stop_counting_and_analyze()
try:
# Measure the step and save the pids
# It's done with try because every now and then the pids are not retrieved and the step should be repeated.
pids = synchronization.start_sequence(n_pulses)
scan_info_d = scaninfo.to_sfdaq_dict()
successful_acquisition = check_intensity_gas_monitor.stop_counting_and_analyze()
except KeyboardInterrupt:
print('Aborting.')
break
except:
successful_acquisition = False
else:
# Measure the step and save the pids
pids = synchronization.start_sequence(n_pulses)
@@ -447,4 +472,4 @@ def scan_with_sync(adjustable, start_pos, end_pos, step_size, n_pulses, filename
# Write to stand table
stand_client.add_row(run=str(run_number), filename=filename, n_pulses=str(n_pulses), sync="True", **spreadsheet.get_adjs_values())
print(f"Scan {run_number} finished")
print(f"Scan {run_number} finished")

View File

@@ -50,6 +50,8 @@ pgroup_scratch = "p19150" # Scratch
# pgroup = "p22478" # Cr-Q commissioning Mar-Apr-Mai 2025
pgroup = "p22266" # Cr-Q user Khim
# pgroup = "p22266" # Cr-Q user Khim
# pgroup = "p22581" # Cr-Q commissioning Puma June 2025
pgroup = "p22761" # Cr-Q commissioning Puma June 2025