Adding mono + commit after the sticky bit.
This commit is contained in:
54
cristallina.py
Normal file → Executable file
54
cristallina.py
Normal file → Executable file
@ -78,11 +78,19 @@ from channels.bs_channels import (
|
||||
from channels.pv_channels import pv_channels
|
||||
from spreadsheet import overview
|
||||
|
||||
from channels.bs_channels import bs_channels_bernina_DCM
|
||||
from channels.pv_channels import pv_channels_bernina_DCM
|
||||
|
||||
from channels.bs_channels import bs_channels_cristallina_beamline
|
||||
from channels.pv_channels import pv_channels_cristallina_beamline
|
||||
|
||||
|
||||
# from channels_minimal import detectors_min, channels_min, pvs_min
|
||||
|
||||
|
||||
################# DEVICES #################
|
||||
dummy = DummyAdjustable(units="au")
|
||||
dummy2 = DummyAdjustable(ID='DUMMY2', name='Dummy2', units="au")
|
||||
|
||||
|
||||
# from devices.knife_edge import KnifeEdge
|
||||
@ -97,7 +105,8 @@ from beamline.components import (
|
||||
pulsepicker,
|
||||
alignment_laser,
|
||||
pbps113,
|
||||
pbps149,
|
||||
mono,
|
||||
m3,
|
||||
)
|
||||
|
||||
from beamline.components import kbHor, kbVer
|
||||
@ -107,13 +116,32 @@ from systems.components import cta
|
||||
from gp_exp.components import Newport_large, OWIS
|
||||
|
||||
|
||||
|
||||
|
||||
# Undulators
|
||||
from beamline import undulator
|
||||
|
||||
undulators = undulator.Undulators()
|
||||
|
||||
logger.info(f"Using undulator (Aramis) offset to PSSS energy of {undulator.energy_offset} eV.")
|
||||
|
||||
|
||||
|
||||
# Undulators & mono
|
||||
from beamline import photon_energy
|
||||
|
||||
cr_photon_energy = photon_energy.PhotonEnergy()
|
||||
|
||||
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.")
|
||||
|
||||
|
||||
|
||||
|
||||
# Pulse picker shutter
|
||||
#pp_shutter = PP_Shutter(
|
||||
# "SARES30-LTIM01-EVR0:RearUniv0-Ena-SP", name="Cristallina pulse picker shutter"
|
||||
#) # Shutter buttton when using the pulse picker
|
||||
|
||||
## Slits
|
||||
from slic.devices.xoptics import slits
|
||||
|
||||
@ -129,9 +157,11 @@ BerninaDCM = BerninaMono("SAROP21-ODCM098")
|
||||
|
||||
# Diffractometer
|
||||
from crq_exp.diffractometer import Diffractometer
|
||||
dm1 = Diffractometer("SARES30-CPCL-ECMC02")
|
||||
dm2 = Diffractometer("SARES32-GPS")
|
||||
|
||||
diffractometer = Diffractometer("diffractometer")
|
||||
|
||||
# Set according to which diffractometer is being used
|
||||
diffractometer = dm1
|
||||
|
||||
# Dilution fridge
|
||||
from crq_exp.dilsc import Dilution
|
||||
@ -144,7 +174,7 @@ except Exception as e:
|
||||
|
||||
|
||||
# MX adajustables
|
||||
import mx.mx_adjustables
|
||||
# import mx.mx_adjustables
|
||||
|
||||
|
||||
################# Stand setup ##################
|
||||
@ -158,8 +188,8 @@ adjs_for_spreadsheet = {
|
||||
#"Time": Time(),
|
||||
"Transmission": attenuator.trans1st,
|
||||
"Upstream Transmission": upstream_attenuator.trans1st,
|
||||
"Energy_setpoint": undulators,
|
||||
"Energy_offset": undulator.energy_offset,
|
||||
"Energy_setpoint": cr_photon_energy,
|
||||
"Energy_offset undulator": photon_energy.energy_offset_undulators,
|
||||
"TD": diffractometer.td,
|
||||
"TRX": diffractometer.tr_x,
|
||||
"TRY": diffractometer.tr_y,
|
||||
@ -176,7 +206,7 @@ if dilution is not None:
|
||||
"Magnet_Y": dilution.y,
|
||||
"Magnet_Z": dilution.z,
|
||||
"DilSc_T_chip": dilution.T_chip,
|
||||
"DilSc_T_pucksensor": dilution.T_pucksensor,
|
||||
"DilSc_T_pucksensor": dilution.T_reg,
|
||||
}
|
||||
adjs_for_spreadsheet.update(adjs_dilsc)
|
||||
|
||||
@ -195,7 +225,6 @@ spreadsheet = 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()
|
||||
@ -209,7 +238,8 @@ except Exception as error:
|
||||
|
||||
################# DAQ Setup #################
|
||||
instrument = "cristallina"
|
||||
experiment_type = "MX" # "MX" or "Q" for the different setups and detector configurations
|
||||
# experiment_type = "MX" # "MX" or "Q" for the different setups and detector configurations
|
||||
experiment_type = "Q" # "MX" or "Q" for the different setups and detector configurations
|
||||
|
||||
from pgroups import pgroup, pgroup_scratch
|
||||
|
||||
@ -242,6 +272,9 @@ else:
|
||||
logger.error(f"Experiment type {experiment_type} not supported. Exiting.")
|
||||
sys.exit(1)
|
||||
|
||||
# default_channels=bs_channels,
|
||||
# default_pvs=pv_channels,
|
||||
|
||||
|
||||
daq.update_config_pvs()
|
||||
|
||||
@ -262,7 +295,7 @@ DAQS = multiple_daqs.generate_DAQS(instrument, pgroup, bs_channels, pv_channels,
|
||||
# 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=4,
|
||||
vmin=400,
|
||||
vmax=2000,
|
||||
wait_time=0.5,
|
||||
required_fraction=0.8,
|
||||
@ -271,5 +304,6 @@ check_intensity_gas_monitor = PVCondition(
|
||||
scan = Scanner(default_acquisitions=[daq], condition=check_intensity_gas_monitor)
|
||||
gui = GUI(scan, show_goto=True, show_spec=True)
|
||||
|
||||
|
||||
logger.info(f"Running at {instrument} with pgroup {pgroup}. Experiment type: {experiment_type}.")
|
||||
logger.info("Loading finished.")
|
||||
|
Reference in New Issue
Block a user