large reorganization, part 1 done
This commit is contained in:
169
cristallina.py
169
cristallina.py
@ -50,21 +50,21 @@ setup_logging()
|
||||
# TODO: this is later overwritten, probably not intended that way?
|
||||
# from epics import PV
|
||||
|
||||
from devices.alignment_laser import AlignmentLaser
|
||||
# from devices.alignment_laser import AlignmentLaser
|
||||
|
||||
from slic.gui import GUI
|
||||
from slic.core.adjustable import Adjustable, PVAdjustable, DummyAdjustable
|
||||
from slic.core.acquisition import SFAcquisition, PVAcquisition
|
||||
from slic.core.condition import PVCondition
|
||||
from slic.core.scanner import Scanner
|
||||
from slic.devices.xdiagnostics.intensitymonitor import IntensityMonitorPBPS
|
||||
|
||||
|
||||
from slic.devices.general.motor import Motor
|
||||
from slic.devices.xoptics.pulsepicker import PulsePicker
|
||||
|
||||
from slic.utils import devices, Marker, as_shortcut
|
||||
from slic.utils import Channels, Config, Elog, Screenshot, PV
|
||||
from slic.core.acquisition.fakeacquisition import FakeAcquisition
|
||||
|
||||
from slic.devices.timing.events import CTASequencer
|
||||
|
||||
from channels.bs_channels import (
|
||||
detectors,
|
||||
@ -73,27 +73,34 @@ from channels.bs_channels import (
|
||||
bs_channels,
|
||||
camera_channels,
|
||||
)
|
||||
|
||||
from channels.pv_channels import pvs
|
||||
from spreadsheet import overview
|
||||
|
||||
# from channels_minimal import detectors_min, channels_min, pvs_min
|
||||
from devices.pp_shutter import PP_Shutter
|
||||
|
||||
|
||||
################# DEVICES #################
|
||||
dummy = DummyAdjustable(units="au")
|
||||
|
||||
# Attenuators
|
||||
from slic.devices.xoptics.aramis_attenuator import Attenuator
|
||||
from devices.knife_edge import KnifeEdge
|
||||
from devices.standa import standa
|
||||
from devices.newport import newport
|
||||
#from slic.devices.xoptics.aramis_attenuator import Attenuator
|
||||
|
||||
Newport_large = Motor("SARES30-MOBI1:MOT_5")
|
||||
OWIS = Motor("SARES30-MOBI1:MOT_6") # small OWIS linear stage
|
||||
#from devices.knife_edge import KnifeEdge
|
||||
#from devices.standa import standa
|
||||
#from devices.newport import newport
|
||||
|
||||
|
||||
|
||||
from beamline.components import upstream_attenuator, attenuator, shutter, pulsepicker, front_end_attenuator
|
||||
|
||||
# from beamline.components import kbHor, kbVer
|
||||
|
||||
from systems.components import cta
|
||||
|
||||
from gp_exp.components import Newport_large, OWIS
|
||||
|
||||
attenuator = Attenuator("SAROP31-OATA150", description="Cristallina attenuator OATA150")
|
||||
|
||||
upstream_attenuator = Attenuator("SARFE10-OATT053", description="Aramis attenuator OATT053")
|
||||
|
||||
def test_attenuator():
|
||||
tfundamental = attenuator.get_transmission()
|
||||
@ -105,26 +112,6 @@ def test_attenuator():
|
||||
|
||||
# test_attenuator()
|
||||
|
||||
front_end_attenuator = Attenuator(
|
||||
"SARFE10-OATT053", description="Front end attenuator OATT053"
|
||||
)
|
||||
cta = CTASequencer("SAR-CCTA-ESC")
|
||||
|
||||
pbps113 = IntensityMonitorPBPS(
|
||||
"SAROP31-PBPS113",
|
||||
# vme_crate="SAROP31-CVME-PBPS1", # please check this!
|
||||
# link=9,
|
||||
description="Intensity/position monitor in the optics hutch",
|
||||
)
|
||||
|
||||
pbps149 = IntensityMonitorPBPS(
|
||||
"SAROP31-PBPS149",
|
||||
# vme_crate="SAROP31-CVME-PBPS2", # please check this!
|
||||
# link=9,
|
||||
description="Intensity/position monitor in the experimental hutch",
|
||||
)
|
||||
|
||||
|
||||
# Undulators
|
||||
from beamline import undulator
|
||||
|
||||
@ -134,35 +121,13 @@ logger.info(
|
||||
)
|
||||
|
||||
|
||||
# Shutter
|
||||
shutter = PP_Shutter(
|
||||
"SARES30-LTIM01-EVR0:RearUniv0-Ena-SP", name="Cristallina pulse picker shutter"
|
||||
) # Shutter button when using the pulse picker
|
||||
|
||||
pulsepicker = PulsePicker(
|
||||
"SAROP31-OPPI151",
|
||||
"SARES30-LTIM01-EVR0:Pul3",
|
||||
name="Cristallina X-ray pulse picker OPPI151",
|
||||
)
|
||||
|
||||
# Alignment laser
|
||||
alignment_laser = AlignmentLaser(
|
||||
"SAROP31-OLAS147:MOTOR_1", name="Cristallina alignment laser OLAS147"
|
||||
)
|
||||
|
||||
## Slits
|
||||
from slic.devices.xoptics import slits
|
||||
|
||||
## Smaract & attocube stages
|
||||
from devices.smaract_device_def import smaract_Juraj, smaract_mini_XYZ
|
||||
from devices.attocube_device_def import attocube
|
||||
from devices.jj_device_def import jjslits
|
||||
|
||||
# KBs
|
||||
from slic.devices.xoptics.kb import KBHor, KBVer
|
||||
|
||||
kbHor = KBHor("SAROP31-OKBH154", description="Cristallina horizontal KB mirror")
|
||||
kbVer = KBVer("SAROP31-OKBV153", description="Cristallina vertical KB mirror")
|
||||
from gp_exp.smaract_device_def import smaract_Juraj, smaract_mini_XYZ
|
||||
from gp_exp.attocube_device_def import attocube
|
||||
from gp_exp.jj_device_def import jjslits
|
||||
|
||||
# Bernina monochromator
|
||||
from beamline.bernina_mono import BerninaMono
|
||||
@ -170,48 +135,48 @@ from beamline.bernina_mono import BerninaMono
|
||||
BerninaDCM = BerninaMono("SAROP21-ODCM098")
|
||||
|
||||
# Diffractometer
|
||||
from devices.diffractometer import Diffractometer
|
||||
from crq_exp.diffractometer import Diffractometer
|
||||
|
||||
diffractometer = Diffractometer("diffractometer")
|
||||
|
||||
|
||||
from devices.dilsc import Dilution
|
||||
from crq_exp.dilsc import Dilution
|
||||
dilution = Dilution()
|
||||
|
||||
|
||||
################# 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
|
||||
#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,
|
||||
"Magnet_X": dilution.x,
|
||||
"Magnet_Y": dilution.y,
|
||||
"Magnet_Z": dilution.z,
|
||||
"DilSc_T_plato": dilution.T_plato,
|
||||
"DilSc_T_pucksensor": dilution.T_pucksensor,
|
||||
},
|
||||
|
||||
placeholders=("comment", "sample", "run_usable"),
|
||||
host="saresc-vcons-02.psi.ch",
|
||||
port=9090,
|
||||
)
|
||||
#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,
|
||||
# "Magnet_X": dilution.x,
|
||||
# "Magnet_Y": dilution.y,
|
||||
# "Magnet_Z": dilution.z,
|
||||
# "DilSc_T_plato": dilution.T_plato,
|
||||
# "DilSc_T_pucksensor": dilution.T_pucksensor,
|
||||
# },
|
||||
#
|
||||
# placeholders=("comment", "sample", "run_usable"),
|
||||
# host="saresc-vcons-02.psi.ch",
|
||||
# port=9090,
|
||||
#)
|
||||
|
||||
try:
|
||||
from stand_client import Client
|
||||
from stand.stand_client import Client
|
||||
|
||||
stand_host = "saresc-vcons-02.psi.ch"
|
||||
stand_client = Client(host=stand_host, port=9090)
|
||||
@ -227,36 +192,8 @@ except Exception as error:
|
||||
################# DAQ Setup #################
|
||||
instrument = "cristallina"
|
||||
|
||||
# pgroup = "p19739" # commissioning March 2022 -- July 2022
|
||||
# pgroup = "p20443" # commissioning Wavefront Sensor August 2022 (active)
|
||||
from pgroups import pgroup, pgroup_scratch
|
||||
|
||||
# pgroup = "p20558" # SwissMX commissioning 3
|
||||
# pgroup = "p20557" # CrQ PMS commisioning 1
|
||||
# pgroup = "p20509" # CrQ commisioning DilSc1
|
||||
# pgroup = "p20519" # beamline commissioning 2
|
||||
# pgroup = "p20841" # CrQ PMS commisioning 2 (Jan 2023)
|
||||
# pgroup = "p20993" # CrQ commisioning DilSc2 (March 2023)
|
||||
# pgroup = "p21147" # SAXS
|
||||
# pgroup = "p21238" # Cristallina photon diagnostics p-group with Chris
|
||||
# pgroup = "p21224" # SwissMX commisioning 7
|
||||
|
||||
# pgroup = "p19150" # Scratch
|
||||
# pgroup = "p19152" # Scratch
|
||||
|
||||
# pgroup = "p20840" # Cr beamline commisioning (Jan-Feb 2023)
|
||||
# pgroup = "p21261" # CrQ PMS-3 July 2023
|
||||
|
||||
# pgroup = "p21528" # Cr-MX Colletier 2023-09-05
|
||||
# pgroup = "p21516" # Beamline commissioning September 26-27, November 7 2023
|
||||
# pgroup = "p21563" # Dil-Sc / diffractometer / tilted bunch / LiErF4 (/ TmVO4)
|
||||
|
||||
# pgroup = "p21569" # Dil-Sc / diffractometer / tilted bunch / LiErF4 (/ TmVO4), November 17-
|
||||
# pgroup = "p21592" # HVE commissioning
|
||||
# pgroup = "p21640" # Dil-Sc / diffractometer / LiErF4 : 4 March 2024
|
||||
|
||||
# pgroup = "p21920" # Beamline commissioning 2024
|
||||
|
||||
pgroup = "p21741" # CrQ - DilSc - SAXS LiHoF4
|
||||
|
||||
# setup pgroup specific logger
|
||||
setup_logging_pgroup(pgroup)
|
||||
@ -268,7 +205,7 @@ daq = SFAcquisition(
|
||||
default_pvs=pvs,
|
||||
default_detectors=detectors,
|
||||
rate_multiplicator=1,
|
||||
spreadsheet=spreadsheet,
|
||||
spreadsheet=None,
|
||||
)
|
||||
|
||||
|
||||
|
Reference in New Issue
Block a user