post-p21592 HVE commissioning cleanup

This commit is contained in:
2023-12-13 14:25:59 +01:00
parent a40a4be2b4
commit 7b9f3fa9b7
7 changed files with 346 additions and 43 deletions

View File

@ -69,6 +69,7 @@ from slic.devices.timing.events import CTASequencer
from channels.bs_channels import (
detectors,
detectors_with_config,
detectors_MX,
bs_channels,
camera_channels,
)
@ -78,23 +79,6 @@ from spreadsheet import overview
# from channels_minimal import detectors_min, channels_min, pvs_min
from devices.pp_shutter import PP_Shutter
# TODO: requires the stand client, need small howto how to start and configure or let it run all the time
# from slic.core.acquisition.spreadsheet import Spreadsheet
try:
from stand_client import Client
stand_host = "saresc-vcons-02.psi.ch"
stand_client = Client(host=stand_host, port=9090)
response = stand_client.get()
logger.info("Connected to stand server")
except Exception as error:
# catching with a broad net because different connection errors can occur.
logger.warning(f"Cannot connect to stand server on {stand_host}.")
# spreadsheet = Spreadsheet(adjs, placeholders=PLACEHOLDERS, host="127.0.0.1", port=8080))
################# DEVICES #################
dummy = DummyAdjustable(units="au")
@ -109,6 +93,7 @@ OWIS = Motor("SARES30-MOBI1:MOT_6") # small OWIS linear stage
attenuator = Attenuator("SAROP31-OATA150", description="Cristallina attenuator OATA150")
upstream_attenuator = Attenuator("SARFE10-OATT053", description="Aramis attenuator OATT053")
def test_attenuator():
tfundamental = attenuator.get_transmission()
@ -189,6 +174,47 @@ from devices.diffractometer import Diffractometer
diffractometer = Diffractometer("diffractometer")
################# Stand setup ##################
# TODO: requires the stand client, need small howto how to start and configure or let it run all the time
from slic.core.acquisition.spreadsheet import Spreadsheet
# setup spreadsheet for transmission to stand
spreadsheet = Spreadsheet(
{
"Transmission" : attenuator.trans1st,
"Upstream Transmission": upstream_attenuator.trans1st,
"Energy_setpoint" : undulators,
"Energy_offset": undulator.energy_offset,
"TD": diffractometer.td,
"TRX": diffractometer.tr_x,
"TRY": diffractometer.tr_y,
"TRXBASE": diffractometer.trx_base,
"TRYBASE": diffractometer.try_base,
"THETA": diffractometer.theta,
"TWOTHETA": diffractometer.twotheta,
},
placeholders=("comment", "sample"),
host="saresc-vcons-02.psi.ch",
port=9090,
)
try:
from stand_client import Client
stand_host = "saresc-vcons-02.psi.ch"
stand_client = Client(host=stand_host, port=9090)
response = stand_client.get()
logger.info("Connected to stand server")
except Exception as error:
# catching with a broad net because different connection errors can occur.
logger.warning(f"Cannot connect to stand server on {stand_host}. Disabling spreadsheet.")
spreadsheet = None
# spreadsheet = Spreadsheet(adjs, placeholders=PLACEHOLDERS, host="127.0.0.1", port=8080))
################# DAQ Setup #################
instrument = "cristallina"
@ -215,7 +241,8 @@ instrument = "cristallina"
# pgroup = "p21516" # Beamline commissioning September 26-27, Noveber 7 2023
# pgroup = "p21563" # Dil-Sc / diffractometer / tilted bunch / LiErF4 (/ TmVO4)
pgroup = "p21569" # Dil-Sc / diffractometer / tilted bunch / LiErF4 (/ TmVO4), November 17-
# pgroup = "p21569" # Dil-Sc / diffractometer / tilted bunch / LiErF4 (/ TmVO4), November 17-
# pgroup = "p21592" # HVE commissioning
# setup pgroup specific logger
setup_logging_pgroup(pgroup)
@ -244,7 +271,7 @@ DAQS = multiple_daqs.generate_DAQS(instrument, pgroup,bs_channels, pvs, detector
# required fraction defines ammount 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=10,
vmin=1,
vmax=2000,
wait_time=0.5,
required_fraction=0.8,