Feb 2024 status

This commit is contained in:
gac-furka
2024-02-08 14:01:58 +01:00
parent b6746d317a
commit f7ee0918c3
17 changed files with 758 additions and 47 deletions

BIN
.furka.py.swp Normal file

Binary file not shown.

33
NightScan_last.py Executable file
View File

@ -0,0 +1,33 @@
#%run -i ./script.py
import time
from epics import caput
caput("SATOP11-OSGM087:EXITSLIT", 50)
caput("SLAAT31-LMOT-M806:MOT.VAL", 173.02)
scan.scan1D(mu, -70, -50, 0.5, 4000, "rock_curve_t0", return_to_initial_values=True)
caput("SLAAT31-LMOT-M806:MOT.VAL", 173.6)
scan.scan1D(mu, -70, -50, 0.5, 4000, "rock_curve_aft_t0", return_to_initial_values=True)
caput("SLAAT31-LMOT-M806:MOT.VAL", 172.5)
scan.scan1D(mu, -70, -50, 0.5, 4000, "rock_curve_bef_t0", return_to_initial_values=True)
caput("SATOP11-OSGM087:EXITSLIT", 100)
mu.set_target_value(-60.8)
time.sleep(20)
mu.park()
scan.scan1D(Thz_delay, 172.5, 174.35, 0.02, 3000, "CDW_midIR_20K", return_to_initial_values=True)
scan.scan1D(Thz_delay, 172.5, 174.35, 0.02, 3000, "CDW_midIR_20K", return_to_initial_values=True)
scan.scan1D(Thz_delay, 172.5, 174.35, 0.02, 3000, "CDW_midIR_20K", return_to_initial_values=True)
scan.scan1D(Thz_delay, 172.5, 174.35, 0.02, 3000, "CDW_midIR_20K", return_to_initial_values=True)
scan.scan1D(Thz_delay, 172.5, 174.35, 0.02, 3000, "CDW_midIR_20K", return_to_initial_values=True)
scan.scan1D(Thz_delay, 172.5, 174.35, 0.02, 3000, "CDW_midIR_20K", return_to_initial_values=True)

35
SASE_motions.py Normal file
View File

@ -0,0 +1,35 @@
from time import sleep
import numpy as np
from epics import PV
from logzero import logger as log
from slic.core.adjustable import Adjustable
from slic.core.adjustable import PVAdjustable
from slic.core.scanner.scanbackend import wait_for_all #, stop_all
from slic.devices.general.motor import Motor
class SASE_coupled_camera(Adjustable):
def __init__(self, ID="SASE YAG Coupled Camera", units="mm", delta=0, name="" ):
super().__init__(ID, name=name, units=units)
self.cam_y = Motor("SATOP11-PSAS079:MOT_DDCAM_Y")
self.cryst_y = Motor("SATOP11-PSAS079:MOT_DDC_Y")
self.delta = delta
def set_target_value(self, value):
s_cryst_y = value
s_cam_y = value + self.delta ## delta = -41.149
t_cryst_y = self.cryst_y.set_target_value(s_cryst_y)
t_cam_y = self.cam_y.set_target_value(s_cam_y)
t_cryst_y.wait()
t_cam_y.wait()
def get_current_value(self):
return self.cryst_y.get_current_value()
def is_moving(self):
return any([self.cryst_y.is_moving(),self.cam_y.is_moving()])

20
SASEspec_test_motions.py Normal file
View File

@ -0,0 +1,20 @@
#%run -i ./script.py
import time
## go to Ne K
#sasespecs.ds_det.cryst_y.set_target_value(-84.178).wait()
#sasespecs.ds_det.cam_y.set_target_value(-125.327).wait()
# go to out of beam position
#sasespecs.ds_det.cryst_y.set_target_value(-84.178).wait()
# test repeated motion of camera + shield
sasespecs.ds_det.cam_y.set_target_value(-1).wait()
time.sleep(60)
print('top')
sasespecs.ds_det.cam_y.set_target_value(-298).wait()
time.sleep(60)
print('bottom')

19
Tdep_RIXS.py Normal file
View File

@ -0,0 +1,19 @@
#%run -i ./script.py
import time
## change to 20 K
caput("SATES30-BRKHF:FLMTR-SET-SETPOINT",50)
caput("SATES30-LS336:LOOP1_SP",10)
time.sleep(900)
print('done changing temp')
scan.scan1D(gate_delay, 111, 112, 0.1, 3000, "gate_delay_20K", return_to_initial_values=True)
## change to 50 K
#caput("SATES30-BRKHF:FLMTR-SET-SETPOINT",20)
#caput("SATES30-LS336:LOOP1_SP",43)
#time.sleep(900)

86
Tdep_RIXS_YBCFO.py Normal file
View File

@ -0,0 +1,86 @@
#%run -i ./script.py
import time
#############################
## change to 150 K
#caput("SATES30-BRKHF:FLMTR-SET-SETPOINT",10)
#caput("SATES30-LS336:LOOP1_SP",135)
#time.sleep(600)
#print('10min')
#time.sleep(600)
#print('20min')
### RIXS at 4 energies
mono_new.set_target_value(930.6).wait()
daq.acquire("YBCFO_150K_930p6eV", n_pulses=30000)
mono_new.set_target_value(932.2).wait()
daq.acquire("YBCFO_150K_932p2eV", n_pulses=30000)
mono_new.set_target_value(933.0).wait()
daq.acquire("YBCFO_150K_933p0eV", n_pulses=30000)
mono_new.set_target_value(934.2).wait()
daq.acquire("YBCFO_150K_934p2eV", n_pulses=30000)
#############################
## change to 200 K
caput("SATES30-BRKHF:FLMTR-SET-SETPOINT",5)
caput("SATES30-LS336:LOOP1_SP",185)
time.sleep(600)
print('10min')
time.sleep(600)
print('20min')
time.sleep(600)
print('30min')
time.sleep(600)
print('40min')
time.sleep(600)
print('50min')
time.sleep(600)
print('60min')
### RIXS at 4 energies
mono_new.set_target_value(930.6).wait()
daq.acquire("YBCFO_200K_930p6eV", n_pulses=30000)
mono_new.set_target_value(932.2).wait()
daq.acquire("YBCFO_200K_932p2eV", n_pulses=30000)
mono_new.set_target_value(933.0).wait()
daq.acquire("YBCFO_200K_933p0eV", n_pulses=30000)
mono_new.set_target_value(934.2).wait()
daq.acquire("YBCFO_200K_934p2eV", n_pulses=30000)
#############################
## change to 250 K
caput("SATES30-LS336:LOOP1_SP",235)
time.sleep(600)
print('10min')
time.sleep(600)
print('20min')
time.sleep(600)
print('30min')
time.sleep(600)
print('40min')
time.sleep(600)
print('50min')
time.sleep(600)
print('60min')
### RIXS at 4 energies
mono_new.set_target_value(930.6).wait()
daq.acquire("YBCFO_250K_930p6eV", n_pulses=30000)
mono_new.set_target_value(932.2).wait()
daq.acquire("YBCFO_250K_932p2eV", n_pulses=30000)
mono_new.set_target_value(933.0).wait()
daq.acquire("YBCFO_250K_933p0eV", n_pulses=30000)
mono_new.set_target_value(934.2).wait()
daq.acquire("YBCFO_250K_934p2eV", n_pulses=30000)

129
Tdep_RIXS_YBCFO_OKedge.py Normal file
View File

@ -0,0 +1,129 @@
#%run -i ./script.py
import time
### start from 100 K
### RIXS at 4 energies
mono_new.set_target_value(528.0).wait()
time.sleep(10)
mono_new.set_target_value(529.5).wait()
daq.acquire("YBCFO_100K_529p5V", n_pulses=30000)
mono_new.set_target_value(530.2).wait()
daq.acquire("YBCFO_100K_530p2eV", n_pulses=30000)
mono_new.set_target_value(530.9).wait()
daq.acquire("YBCFO_100K_530p9eV", n_pulses=30000)
mono_new.set_target_value(531.7).wait()
daq.acquire("YBCFO_100K_531p7eV", n_pulses=30000)
mono_new.set_target_value(533.3).wait()
daq.acquire("YBCFO_100K_533p3eV", n_pulses=30000)
mono_new.set_target_value(528.0).wait()
#############################
## change to 150 K
caput("SATES30-BRKHF:FLMTR-SET-SETPOINT",10)
caput("SATES30-LS336:LOOP1_SP",135)
time.sleep(600)
print('10min')
time.sleep(600)
print('20min')
time.sleep(600)
print('30min')
time.sleep(600)
print('40min')
time.sleep(600)
print('50min')
time.sleep(600)
print('60min')
### RIXS at 4 energies
mono_new.set_target_value(529.5).wait()
daq.acquire("YBCFO_150K_529p5V", n_pulses=30000)
mono_new.set_target_value(530.2).wait()
daq.acquire("YBCFO_150K_530p2eV", n_pulses=30000)
mono_new.set_target_value(530.9).wait()
daq.acquire("YBCFO_150K_530p9eV", n_pulses=30000)
mono_new.set_target_value(531.7).wait()
daq.acquire("YBCFO_150K_531p7eV", n_pulses=30000)
mono_new.set_target_value(533.3).wait()
daq.acquire("YBCFO_150K_533p3eV", n_pulses=30000)
mono_new.set_target_value(528.0).wait()
#############################
## change to 200 K
caput("SATES30-BRKHF:FLMTR-SET-SETPOINT",5)
caput("SATES30-LS336:LOOP1_SP",185)
time.sleep(600)
print('10min')
time.sleep(600)
print('20min')
time.sleep(600)
print('30min')
time.sleep(600)
print('40min')
time.sleep(600)
print('50min')
time.sleep(600)
print('60min')
### RIXS at 4 energies
mono_new.set_target_value(529.5).wait()
daq.acquire("YBCFO_200K_529p5V", n_pulses=30000)
mono_new.set_target_value(530.2).wait()
daq.acquire("YBCFO_200K_530p2eV", n_pulses=30000)
mono_new.set_target_value(530.9).wait()
daq.acquire("YBCFO_200K_530p9eV", n_pulses=30000)
mono_new.set_target_value(531.7).wait()
daq.acquire("YBCFO_200K_531p7eV", n_pulses=30000)
mono_new.set_target_value(533.3).wait()
daq.acquire("YBCFO_200K_533p3eV", n_pulses=30000)
mono_new.set_target_value(528.0).wait()
#############################
## change to 250 K
caput("SATES30-LS336:LOOP1_SP",235)
time.sleep(600)
print('10min')
time.sleep(600)
print('20min')
time.sleep(600)
print('30min')
time.sleep(600)
print('40min')
time.sleep(600)
print('50min')
time.sleep(600)
print('60min')
### RIXS at 4 energies
mono_new.set_target_value(529.5).wait()
daq.acquire("YBCFO_250K_529p5V", n_pulses=30000)
mono_new.set_target_value(530.2).wait()
daq.acquire("YBCFO_250K_530p2eV", n_pulses=30000)
mono_new.set_target_value(530.9).wait()
daq.acquire("YBCFO_250K_530p9eV", n_pulses=30000)
mono_new.set_target_value(531.7).wait()
daq.acquire("YBCFO_250K_531p7eV", n_pulses=30000)
mono_new.set_target_value(533.3).wait()
daq.acquire("YBCFO_250K_533p3eV", n_pulses=30000)

18
Tdep_RIXS_YBCFO_test.py Normal file
View File

@ -0,0 +1,18 @@
#%run -i ./script.py
import time
#############################
## change to 150 K
#caput("SATES30-BRKHF:FLMTR-SET-SETPOINT",10)
#caput("SATES30-LS336:LOOP1_SP",133)
#time.sleep(600)
#print('10min')
#time.sleep(600)
#print('20min')
### RIXS at 4 energies
mono_new.set_target_value(930.6).wait()
daq.acquire("YBCFO_150K_930p6eV_while_warming", n_pulses=30000)

48
Tdep_macro.py Executable file
View File

@ -0,0 +1,48 @@
#%run -i ./script.py
import time
from epics import caput
#caput("SATES30-LS336:HTR1_RNG", "High")
caput("SATES30-LS336:LOOP1_SP", 10)
caput("SATES30-BRKHF:FLMTR-SET-SETPOINT",45)
time.sleep(10)
scan.scan1D(Thz_delay, 172.8, 174.0, 0.025, 10000, "CDW_midIR_Tdep", return_to_initial_values=True)
caput("SATES30-LS336:LOOP1_SP", 23)
caput("SATES30-BRKHF:FLMTR-SET-SETPOINT",37)
time.sleep(600)
scan.scan1D(Thz_delay, 172.8, 174.0, 0.025, 10000, "CDW_midIR_Tdep", return_to_initial_values=True)
caput("SATES30-LS336:LOOP1_SP", 33)
caput("SATES30-BRKHF:FLMTR-SET-SETPOINT",30)
time.sleep(600)
scan.scan1D(Thz_delay, 172.8, 174.0, 0.025, 10000, "CDW_midIR_Tdep", return_to_initial_values=True)
caput("SATES30-LS336:LOOP1_SP", 43)
caput("SATES30-BRKHF:FLMTR-SET-SETPOINT",25)
time.sleep(600)
scan.scan1D(Thz_delay, 172.8, 174.0, 0.025, 10000, "CDW_midIR_Tdep", return_to_initial_values=True)
caput("SATES30-LS336:LOOP1_SP", 53)
caput("SATES30-BRKHF:FLMTR-SET-SETPOINT",20)
time.sleep(600)
scan.scan1D(Thz_delay, 172.8, 174.0, 0.025, 10000, "CDW_midIR_Tdep", return_to_initial_values=True)
caput("SATES30-LS336:LOOP1_SP", 63)
time.sleep(600)
scan.scan1D(Thz_delay, 172.8, 174.0, 0.025, 10000, "CDW_midIR_Tdep", return_to_initial_values=True)
caput("SATES30-LS336:LOOP1_SP", 73)
time.sleep(600)
scan.scan1D(Thz_delay, 172.8, 174.0, 0.025, 10000, "CDW_midIR_Tdep", return_to_initial_values=True)
caput("SATES30-LS336:LOOP1_SP", 83)
time.sleep(600)
scan.scan1D(Thz_delay, 172.8, 174.0, 0.025, 10000, "CDW_midIR_Tdep", return_to_initial_values=True)

10
Test.py Executable file
View File

@ -0,0 +1,10 @@
#%run -i ./script.py
import time
from epics import caput
#caput("SATES30-LS336:HTR1_RNG", "High")
caput("SATES30-LS336:LOOP1_SP", 10)

View File

@ -25,7 +25,7 @@ channels = [
# "SATES31-CAMS187-RIXS1:SPC_wgt",
# "SATES31-CAMS187-RIXS1:Spectrum",
# "SATES31-CAMS187-RIXS1:evt_list",
"SATES30-RIXS-CAM01:FPICTURE",
#"SATES30-RIXS-CAM01:FPICTURE",
"SATES30-RIXS-CAM01:EVENT_NUM",
"SATES30-RIXS-CAM01:EVENT_CHARGE",
"SATES30-RIXS-CAM01:EVENT_I",
@ -37,7 +37,7 @@ channels = [
#"SATES30-CAMS182-GIGE2:FPICTURE",
#"SATES31-CAMS187-RIXS1:FPICTURE",
"SATES31-CAMS187-RIXS1:x_profile",
"SATES31-CAMS187-RIXS1:y_profile",
# "SATES31-CAMS187-RIXS1:y_profile",
"SATES31-CAMS187-RIXS1:intensity",
"SATES30-CVME-EVR0:DUMMY_PV1_NBS",
"SATES30-CVME-EVR0:DUMMY_PV2_NBS",
@ -50,19 +50,36 @@ channels = [
"SATES30-CVME-EVR0:DUMMY_PV9_NBS",
"SATES30-CVME-EVR0:DUMMY_PV10_NBS",
"SATES30-CVME-EVR0:CALCY",
"SLAAT31-LSCP1-FNS:CH0:VAL_GET",
"SLAAT31-LSCP1-FNS:CH0:VAL_GET", #2um beam intensity (out of vacuum)
"SLAAT31-LSCP1-FNS:CH1:VAL_GET",
"SLAAT31-LSCP1-FNS:CH2:VAL_GET",
"SLAAT31-LTIM01-EVR0:CALCI",
"SLAAT31-LTIM01-EVR0:CALCS",
"SAT-CVME-TIFALL5:EvtSet",
"SAT-CVME-TIFALL6:EvtSet"
"SAT-CVME-TIFALL6:EvtSet",
"SATOP31-PMOS132-2D:SPECTRUM_X",
"SATOP31-PMOS132-2D:SPECTRUM_Y"
]
pvs = [
#"SIN-LPOSIC1:POS1",
#"SIN-LPOSIC1:POS2",
"SATFE10-PEPG046:PHOTON-ENERGY-PER-PULSE-AVG",
"SIN-LPOSIC1:POS1",
"SIN-LPOSIC1:POS2",
"SIN-LPOSIC2:POS1",
"SIN-LPOSIC2:POS2",
#"SATFE10-PEPG046:PHOTON-ENERGY-PER-PULSE-AVG",
"SLAAT01-TLSY-EPL:GEN-ADC-1-6",
"SLAAT01-TLSY-EPL:GEN-ADC-1-0",
"SLAAT01-TLSY-EPL:GEN-DAC-5-4",
"SLAAT01-TLSY-EPL:PIDOUTMON",
"SLAAT01-LI2C01_CH1:TEMP",
"SLAAT01-LI2C01_CH1:HUMIREL",
"SLAAT01-LI2C01_CH1:PRES",
"SATOP31-OKBV178:BU.RBV",
"SATOP31-OKBV178:BD.RBV",
"SATOP31-OKBH179:W_RY.RBV",
"SATOP31-OKBH179:BU.RBV",
"SATOP31-OKBH179:BD.RBV",
"SATOP31-OKBV178:W_RX.RBV",
"SATUN13-UIND030:POL-SET",
"SATES30-ARES:MOT_2TRY.RBV",
"SATES30-ARES:MOT_DRY.RBV",
@ -72,14 +89,16 @@ pvs = [
"SATES30-ARES:MOT_SRX.RBV",
"SATES30-ARES:MOT_SRY.RBV",
"SATES30-ARES:MOT_SRZ.RBV",
#"SLAAT31-LMOT-M801:MOT.RBV",
"SLAAT31-LMOT-M801:MOT.RBV",
#"SLAAT31-LMOT-M802:MOT.RBV",
#"SLAAT31-LMOT-M803:MOT.RBV",
#"SLAAT31-LMOT-M804:MOT.RBV",
#"SLAAT31-LMOT-M805:MOT.RBV",
"SLAAT31-LDIO-LAS6411:SET_BO02", ## new
"SLAAT31-LMOT-M805:MOT.RBV",
"SLAAT31-LMOT-M806:MOT.RBV",
"SLAAT31-LMOT-M807:MOT.RBV",
"SLAAT31-LMOT-M808:MOT.RBV",
"SLAAT31-LMOT-M809:MOT.RBV",
"SATOP11-OSGM087:exitslit",
"SATOP11-OSGM087:photonenergy",
"SATUN:FELPHOTENE",
@ -95,13 +114,42 @@ pvs = [
#"SATOP21-PMOS127-2D:SPECTRUM_Y",
#"SATES30-CAMS182-GIGE1_sp1:x_center_of_mass",
#"SATES30-CAMS182-GIGE1_sp1:y_center_of_mass",
"SLAAT31-LCAM-C801:FIT-XPOS_EGU",
"SLAAT31-LCAM-C801:FIT-YPOS_EGU",
#"SLAAT31-LCAM-C801:FIT-XPOS_EGU",
#"SLAAT31-LCAM-C801:FIT-YPOS_EGU",
# "SLAAT31-LCAM-C801:FIT-XEGU-ARRAY",
"SLAAT31-LCAM-C802:FIT-XPOS_EGU",
"SLAAT31-LCAM-C802:FIT-YPOS_EGU"
"SATES30-RIXS-CAM01:cam1:AcquireTime_RBV",
"SATES30-RIXS-CAM01:cam1:Temperature_RBV",
"SLAAT31-LCAM-C805:FIT-XPOS", # 2um X
"SLAAT31-LCAM-C805:FIT-YPOS", # 2um Y
"SLAAT31-LCAM-C805:INTEGRAL_AVE", # 2 um intensity (image intergral)
"SLAAT31-LCAM-C805:FIT-XWID", # 2um width X
"SLAAT31-LCAM-C805:FIT-YWID", # 2um width Y
#"SLAAT31-LCAM-C802:FIT-XPOS_EGU",
#"SLAAT31-LCAM-C802:FIT-YPOS_EGU",
"SATES30-RIXS-CAM01:cam1:MinX_RBV",
"SATES30-RIXS-CAM01:cam1:SizeX_RBV",
"SATES30-RIXS-CAM01:cam1:MinY_RBV",
"SATES30-RIXS-CAM01:cam1:SizeY_RBV",
"SLAAT31-LMOT-M816:MOT.RBV",
# "SLAAT31-LCAM-C802:FIT-XEGU-ARRAY",
#"SATES30-CAMS182-GIGE2_sp1:x_center_of_mass",
#"SATES30-CAMS182-GIGE2_sp1:y_center_of_mass"
#"SATES30-CAMS182-GIGE2_sp1:y_center_of_mass",
"SATES30-RIXS:MOT_FT.RBV",
"SATES30-RIXS:MOT_RY.RBV",
"SATES30-RIXS:MOT_RRY1.RBV",
"SATES30-RIXS:MOT_GTY1.RBV",
"SATES30-RIXS:MOT_MT.RBV",
"SATES30-RIXS:MOT_GTX.RBV",
"SATES30-RIXS:MOT_GTZ.RBV",
"SATES30-RIXS:MOT_GRX.RBV",
"SATES30-RIXS:MOT_DTY1.RBV",
"SATES30-RIXS:MOT_DTZ.RBV",
"SATES30-RIXS:MOT_DRX.RBV",
"SLAAT01-TLSY-EPL:JITTERMON",
"SATOP11-OSGM087:ENCA_GR1", #Encoder on mono grating pitch
"SATOP11-OSGM087:ENCA_GR2", #Encoder on mono grating pitch
"SLAAT31-LMOT-M813:MOT.RBV",
"SATOP11-OSGM087:ENCA_MR1", #Encoder on mono grating pitch
"SATOP11-OSGM087:ENCA_MR2" #Encoder on mono grating pitch
]

155
furka.py
View File

@ -2,6 +2,7 @@
from slic.core.acquisition import SFAcquisition
from slic.core.acquisition import PVAcquisition
from slic.core.acquisition import BSChannels, PVChannels, DetectorConfig
#from slic.core.acquisition import FakeAcquisition
from slic.core.adjustable import PVAdjustable, DummyAdjustable
from slic.core.condition import PVCondition
@ -25,17 +26,20 @@ from sensors import *
mono_new = PVAdjustable("SATOP11-OSGM087:SetEnergy", "SATOP11-OSGM087:photonenergy", accuracy=0.1, process_time=10, name="Mono new")
from tth import Coupled_tth
from tth import Coupled_tth, Coupled_tth_outer, Coupled_tth_RIXSside
from tth import LakeShore
from tth import Coupled_THzGate
from tth import Coupled_THzGate_fixedDelta
from SASE_motions import SASE_coupled_camera
from qspace import QSpace3D
from qspace import Wavelength
from qspace import HistoryDummy
from constraints import ExtraConstraint
from sasespec import sasespecs
@ -43,7 +47,7 @@ from epics import caput
class ParkableMotor(Motor):
def park(self):
kill_pvname = self.pvname[:-4] + "_KILL"
kill_pvname = self.pvname + "_KILL"
caput(kill_pvname, 1)
@ -52,8 +56,8 @@ dummy = DummyAdjustable(units="au")
from slic.devices.general.smaract import SmarActAxis
parab_RY = SmarActAxis("SATES30-XSMA182:MOT4", name="Parab RY")
parab_RX = SmarActAxis("SATES30-XSMA182:MOT7", name="Parab RX")
parab_RY = Motor("SATES30-MCS001:MOT_4", name="Parab RY")
parab_RX = Motor("SATES30-MCS001:MOT_7", name="Parab RX")
taget_along_beam = SmarActAxis("SATES30-XSMA184:MOT6", name="Target along beam")
@ -66,8 +70,14 @@ taget_along_beam = SmarActAxis("SATES30-XSMA184:MOT6", name="Target along beam")
#Furka Kbs motors
KBV_RX = PVAdjustable("SATOP31-OKBV178:W_RX.VAL", pvname_moving="SATOP31-OKBV178:MOVING", name = "KB Ver RX")
KBH_RY = PVAdjustable("SATOP31-OKBH179:W_RY.VAL", pvname_moving="SATOP31-OKBH179:MOVING", name = "KB Horiz RY")
KBv_RX = PVAdjustable("SATOP31-OKBV178:W_RX.VAL", pvname_moving="SATOP31-OKBV178:MOVING", name = "KB Ver RX")
KBv_B1 = PVAdjustable("SATOP31-OKBV178:BU.VAL", pvname_moving="SATOP31-OKBV178:MOVING", name = "KB Ver B1")
KBv_B2 = PVAdjustable("SATOP31-OKBV178:BD.VAL", pvname_moving="SATOP31-OKBV178:MOVING", name = "KB Ver B2")
KBh_RY = PVAdjustable("SATOP31-OKBH179:W_RY.VAL", pvname_moving="SATOP31-OKBH179:MOVING", name = "KB Horiz RY")
KBh_B1 = PVAdjustable("SATOP31-OKBH179:BU.VAL", pvname_moving="SATOP31-OKBH179:MOVING", name = "KB Hor B1")
KBh_B2 = PVAdjustable("SATOP31-OKBH179:BD.VAL", pvname_moving="SATOP31-OKBH179:MOVING", name = "KB Hor B2")
@ -130,25 +140,30 @@ wl = Wavelength(mono_new)
#Diffractometer motions
mu = ParkableMotor("SATES30-ARES:MOT_SRY.VAL", name = "Diff RY")
chi = ParkableMotor("SATES30-ARES:MOT_SRZ.VAL", name = "Diff RZ")
phi = ParkableMotor("SATES30-ARES:MOT_SRX.VAL", name = "Diff RX")
nu = ParkableMotor("SATES30-ARES:MOT_DRY.VAL", name = "Diff DRY")
q = QSpace3D("SOMETHING:Q", mu, chi, phi, nu, wl)
##Diffractometer motions
mu = ParkableMotor("SATES30-ARES:MOT_SRY", name = "Diff RY")
chi = ParkableMotor("SATES30-ARES:MOT_SRZ", name = "Diff RZ")
phi = ParkableMotor("SATES30-ARES:MOT_SRX", name = "Diff RX")
nu = ParkableMotor("SATES30-ARES:MOT_DRY", name = "Diff DRY")
#q = QSpace3D("SOMETHING:Q", mu, chi, phi, nu, wl)
TX = ParkableMotor("SATES30-ARES:MOT_STX.VAL", name = "Diff TX")
TY = ParkableMotor("SATES30-ARES:MOT_STY.VAL", name = "Diff TY")
TZ = ParkableMotor("SATES30-ARES:MOT_STZ.VAL", name = "Diff TZ")
TwoTRY=ParkableMotor("SATES30-ARES:MOT_2TRY.VAL", name = "Diff 2TRY")
TX = ParkableMotor("SATES30-ARES:MOT_STX", name = "Diff TX")
TY = ParkableMotor("SATES30-ARES:MOT_STY", name = "Diff TY")
TZ = ParkableMotor("SATES30-ARES:MOT_STZ", name = "Diff TZ")
TwoTRY=ParkableMotor("SATES30-ARES:MOT_2TRY", name = "Diff 2TRY")
tth_scan = Coupled_tth(delta=0, name="theta 2theta")
tth_scan_RIXS = Coupled_tth_RIXSside(delta=0, name='theta 2theta RIXS side')
tth_scan_outer = Coupled_tth_outer(delta=0, name="theta 2theta outer")
Thz_Gate_scan = Coupled_THzGate( name = "THz Gate coupled ")
Thz_Gate_scan_fixedD = Coupled_THzGate_fixedDelta(delta=36.932, name = "Thz Gate fix Delta")
Thz_Gate_scan_fixedD = Coupled_THzGate_fixedDelta(delta=60.65, name = "Thz Gate fix Delta")
GRX = Motor("SATES30-RIXS:MOT_GRX.VAL", name = "Pitch grating")
DTZ = Motor("SATES30-RIXS:MOT_DTZ.VAL", name = "DTZ (r2)")
GRX = Motor("SATES30-RIXS:MOT_GRX", name = "Pitch grating")
DTZ = Motor("SATES30-RIXS:MOT_DTZ", name = "DTZ (r2)")
SASE_camera_scan = SASE_coupled_camera(delta=-41.149, name="SASE YAG Coupled Camera")
#fake_mu = HistoryDummy.init_from(mu)
#fake_chi = HistoryDummy.init_from(chi)
@ -171,7 +186,11 @@ WL_delay = Motor("SLAAT31-LMOT-M807:MOT", name="WL Delay")
gate_delay = Motor("SLAAT31-LMOT-M808:MOT", name="Gate Delay")
twomicron_delay = Motor("SLAAT31-LMOT-M813:MOT", name="2um Delay")
laser_WP = Motor("SLAAT31-LMOT-M801:MOT", name="Laser WavePlate")
#laser_WP = Motor("SLAAT31-LMOT-M801:MOT", name="Laser WavePlate")
laser_WP = Motor("SLAAT31-LMOT-M809:MOT", name="Laser WavePlate")
laser_fluence = Motor("SLAAT31-LMOT-M801:MOT", name="Laser fluence")
@ -187,14 +206,18 @@ spreadsheet = Spreadsheet(spreadsheet_info, placeholders=["comment", "sample"],
instrument = "furka"
pgroup = "p21266" #Commissioning p group
pgroup = "p21613" #User p group
#check_intensity = PVCondition("SATFE10-PEPG046:FCUP-INTENSITY-CAL", vmin=5, vmax=None, wait_time=3, required_fraction=0.8)
check_intensity = PVCondition("SATBD01-DBPM060:Q2", vmin=5, vmax=None, wait_time=1, required_fraction=0.8)
#check_intensity = None
daq = SFAcquisition(instrument, pgroup, default_channels=channels, default_pvs=pvs, rate_multiplicator=1, spreadsheet=spreadsheet)
detectors = DetectorConfig("JF18T01V01")
#detectors = None #Remove this line to enable Jungfrau!
daq = SFAcquisition(instrument, pgroup, default_channels=channels, default_pvs=pvs, default_detectors=detectors, rate_multiplicator=1, spreadsheet=spreadsheet)
daq.update_config_pvs()
#daq = FakeAcquisition(instrument, pgroup, default_channels=channels, default_pvs=pvs, rate_multiplicator=1)
#daq = BSAcquisition .... TBI
@ -203,6 +226,7 @@ daq.update_config_pvs()
scan = Scanner(default_acquisitions=[daq], condition=check_intensity, default_sensor=s3)
gui = GUI(scan, show_goto=True, show_spec=True, show_run=True)
guitest = GUI(scan, show_goto=True, show_spec=True, show_run=True, title="Test GUI")
#scanPV = Scanner(default_acquisitions=[daqPV], condition=check_intensity)
@ -248,24 +272,93 @@ def Diffr_pos(TRYv, DRYv, TXv , TYv, TZv, RXv, RYv, RZv):
for t in ts:
t.wait()
print("moving done")
for t in ts:
t.park()
pms=[TwoTRY, nu, TX, TY, TZ, phi, mu, chi]
for pm in pms:
pm.park()
print("done")
def KBv_Focusing(KBv_B1v, KBv_B2v):
KBv_B1.set_target_value(KBv_B1v-0.15).wait()
KBv_B1.set_target_value(KBv_B1v).wait()
KBv_B2.set_target_value(KBv_B2v-0.15).wait()
KBv_B2.set_target_value(KBv_B2v).wait()
print("KBv moving done")
def KBh_Focusing(KBh_B1v, KBh_B2v):
KBh_B1.set_target_value(KBh_B1v-0.15).wait()
KBh_B1.set_target_value(KBh_B1v).wait()
KBh_B2.set_target_value(KBh_B2v-0.15).wait()
KBh_B2.set_target_value(KBh_B2v).wait()
print("KBh moving done")
def KBv_Pointing(KBv_RXv):
KBv_RX.set_target_value(KBv_RXv-0.15).wait()
KBv_RX.set_target_value(KBv_RXv).wait()
print("KBv pointing change done")
def KBh_Pointing(KBh_RYv):
KBh_RY.set_target_value(KBh_RYv-0.15).wait()
KBh_RY.set_target_value(KBh_RYv).wait()
print("KBh pointing change done")
def GoToXAS_RIXS(TRYv, Del_or_Norm, ESv, GAv, MonoNewv, HWPv, KBv_B1v, KBv_B2v, KBh_B1v, KBh_B2v, KBv_RXv, KBh_RYv ):
#close shutter
caput('SATOP31-OPSH138:REQUEST', 'close')
KBv_Focusing(KBv_B1v, KBv_B2v)
KBv_Pointing(KBv_RXv)
KBh_Focusing(KBh_B1v, KBh_B2v)
KBh_Pointing(KBh_RYv)
TwoTRY.set_target_value(TRYv).wait()
print("2TRY movement done")
if Del_or_Norm == "Del":
caput('SLAAT01-LTIM-PDLY:DELAYEDSHOT.PROC', 1 )
else:
caput('SLAAT01-LTIM-PDLY:NORMAL.PROC', 1 )
print("delay mode done")
Mon_ES.set_target_value(ESv).wait()
print("Mono done")
gas_attenuator_trans.set_target_value(GAv).wait()
print("GA done")
mono_new.set_target_value( MonoNewv).wait()
print("Mono done")
laser_WP.set_target_value(HWPv).wait()
print("HWP done")
print("all done")
return 1
@as_shortcut
def TrXAS_pos(name = "TrXAS Positions"):
GoToXAS_RIXS(85, "Del", 400, 1.0, 529, 42, 3.221, 3.444, 3.723, 3.917, 13.218, 13.215)
@as_shortcut
def RIXS_pos(name = "RIXS Positions"):
GoToXAS_RIXS(85, "Norm", 200, 0.8, 529, 42, 3.0209, 3.2439, 3.023, 3.217, 13.233, 13.245)
@as_shortcut
def EOS_pos(name = "EOS Positions"):
Diffr_pos(149.440, 29.5, 3.5, 1.6, -0.7, 0, 82, 0)
Diffr_pos(148.335, 74.5, 0, 3.0, -6.5, 0, -90, -3.0)
@as_shortcut
def Sample_position_45deg(name = "Sample Positions (45 deg)"):
Diffr_pos(65.0, 29.5, 2, -3.6, -0.9, 0, 45, 0)
def CTape_pos(name = "X-ray knife edge"):
Diffr_pos(85, 95, -1, -1.6, -1.5, 0, -30, 0)
@as_shortcut
def EOS_LV_pos(name = "EOS LV Positions"):
Diffr_pos(149.440, 29.5, 3.0, 2.5, -0.69, 15, 82, 0)
def xray_knife(name = "X-ray knife edge"):
Diffr_pos(125, 165.3, 0, 2.0, -6.5, 0, -90, -3.0)
#@as_shortcut
#def Sample_position_RIXS(name = "Sample Positions RIXS"):
# Diffr_pos(85.0, 80.5, -3.6, -1.3, -3, 0, -8, -4)
#@as_shortcut
#def EOS_LV_pos(name = "EOS LV Positions"):
# Diffr_pos(149.440, 29.5, 3.0, 2.5, -0.69, 15, 82, 0)
@as_shortcut
def Transfer_pos(name = "Transfer Positions"):

35
sasespec.py Normal file
View File

@ -0,0 +1,35 @@
from slic.devices.general.motor import Motor
from slic.core.device import SimpleDevice
##gui(extras={"Tweak SASE Spec": "Tweak"})
us_gr = SimpleDevice(
"SASE Spec US Grating",
gr_x = Motor("SATOP11-PSAS079:MOT_UG_X", name="SASE US Grating X"),
gr_y = Motor("SATOP11-PSAS079:MOT_UG_Y", name="SASE US Grating Y"),
gr_z = Motor("SATOP11-PSAS079:MOT_UG_Z", name="SASE US Grating Z"),
#...
)
ds_det = SimpleDevice(
"SASE Spec DS Detector",
filt_x = Motor("SATOP11-PSAS079:MOT_DDF_X", name="SASE DS Det Filt X"),
slit1_y = Motor("SATOP11-PSAS079:MOT_DDS_Y1", name="SASE DS Det Slit1 Y"),
slit2_y = Motor("SATOP11-PSAS079:MOT_DDS_Y2", name="SASE DS Det Slit2 Y"),
cryst_rx = Motor("SATOP11-PSAS079:MOT_DDC_RX", name="SASE DS YAG RX"),
cryst_x = Motor("SATOP11-PSAS079:MOT_DDC_X", name="SASE DS YAG X"),
cryst_y = Motor("SATOP11-PSAS079:MOT_DDC_Y", name="SASE DS YAG Y"),
cam_y = Motor("SATOP11-PSAS079:MOT_DDCAM_Y", name="SASE DS Camera Y"),
)
sasespecs = SimpleDevice(
"SASE Spectrometer",
us_gr = us_gr,
ds_det = ds_det
)

View File

@ -33,6 +33,8 @@ spreadsheet_info = dict(
DiffrRX = PVAdjustable("SATES30-ARES:MOT_SRX.VAL", internal=True),
DiffrRY = PVAdjustable("SATES30-ARES:MOT_SRY.VAL", internal=True),
DiffrRZ = PVAdjustable("SATES30-ARES:MOT_SRZ.VAL", internal=True),
KBV_BU = PVAdjustable("SATOP31-OKBV178:BU.RBV", internal=True),
KBV_BD = PVAdjustable("SATOP31-OKBV178:BD.RBV", internal=True),

22
static_RIXS_macro.py Normal file
View File

@ -0,0 +1,22 @@
import time
## 800 shutter: SLAAT31-LDIO-LAS6411:SET_BO02
# RIXS scans opening/closing the laser shutter
caput("SLAAT31-LDIO-LAS6411:SET_BO02",0)
#daq.acquire("RIXS_on", n_pulses=30000, wait=True)
#daq.acquire("RIXS_on", n_pulses=30000, wait=True)
#caput("SLAAT31-LDIO-LAS6411:SET_BO02",0)
#daq.acquire("RIXS_off", n_pulses=30000, wait=True)
#daq.acquire("RIXS_off", n_pulses=30000, wait=True)
#caput("SLAAT31-LDIO-LAS6411:SET_BO02",1)
#daq.acquire("RIXS_on", n_pulses=30000, wait=True)
#daq.acquire("RIXS_on", n_pulses=30000, wait=True)
#caput("SLAAT31-LDIO-LAS6411:SET_BO02",0)
#daq.acquire("RIXS_off", n_pulses=30000, wait=True)
#daq.acquire("RIXS_off", n_pulses=30000, wait=True)
#gate_delay.set_target_value(112).wait()

71
test_static.py Normal file
View File

@ -0,0 +1,71 @@
import time
#Starting temperature setpoint 202K
laser_delay.set_target_value(112).wait()
mu.set_target_value(21.3).wait()
nu.set_target_value(-125.8).wait()
#Theta scan
scan.scan1D(mu, 20,24,0.2, 1200, "Th_cm", return_to_initial_values=True)
#DS @ CM
scan.scan1D(laser_delay, 107, 110.2, 0.2, 2400, "DS_range1", return_to_initial_values=False)
scan.scan1D(laser_delay, 110.21, 110.5, 0.01, 2400, "DS_range2", return_to_initial_values=False)
scan.scan1D(laser_delay, 111, 130, 0.5, 2400, "DS_range3", return_to_initial_values=False)
#DS @ ICM
mu.set_target_value(22.5).wait()
nu.set_target_value(-125.4).wait()
scan.scan1D(laser_delay, 107, 110.2, 0.2, 2400, "DS_range1", return_to_initial_values=False)
scan.scan1D(laser_delay, 110.21, 110.5, 0.01, 2400, "DS_range2", return_to_initial_values=False)
scan.scan1D(laser_delay, 111, 130, 0.5, 2400, "DS_range3", return_to_initial_values=False)
lakeshore.set_target_value(207).wait()
time.sleep(30*60)
laser_delay.set_target_value(112).wait()
mu.set_target_value(21.3).wait()
nu.set_target_value(-125.8).wait()
#Theta scan
scan.scan1D(mu, 20,24,0.2, 1200, "Th_cm", return_to_initial_values=True)
#DS @ CM
scan.scan1D(laser_delay, 107, 110.2, 0.2, 2400, "DS_range1", return_to_initial_values=False)
scan.scan1D(laser_delay, 110.21, 110.5, 0.01, 2400, "DS_range2", return_to_initial_values=False)
scan.scan1D(laser_delay, 111, 130, 0.5, 2400, "DS_range3", return_to_initial_values=False)
#DS @ ICM
mu.set_target_value(22.5).wait()
nu.set_target_value(-125.4).wait()
scan.scan1D(laser_delay, 107, 110.2, 0.2, 2400, "DS_range1", return_to_initial_values=False)
scan.scan1D(laser_delay, 110.21, 110.5, 0.01, 2400, "DS_range2", return_to_initial_values=False)
scan.scan1D(laser_delay, 111, 130, 0.5, 2400, "DS_range3", return_to_initial_values=False)
lakeshore.set_target_value(212).wait()
time.sleep(30*60)
laser_delay.set_target_value(112).wait()
mu.set_target_value(21.3).wait()
nu.set_target_value(-125.8).wait()
#Theta scan
scan.scan1D(mu, 20,24,0.2, 1200, "Th_cm", return_to_initial_values=True)
#DS @ CM
scan.scan1D(laser_delay, 107, 110.2, 0.2, 2400, "DS_range1", return_to_initial_values=False)
scan.scan1D(laser_delay, 110.21, 110.5, 0.01, 2400, "DS_range2", return_to_initial_values=False)
scan.scan1D(laser_delay, 111, 130, 0.5, 2400, "DS_range3", return_to_initial_values=False)
#DS @ ICM
mu.set_target_value(22.5).wait()
nu.set_target_value(-125.4).wait()
scan.scan1D(laser_delay, 107, 110.2, 0.2, 2400, "DS_range1", return_to_initial_values=False)
scan.scan1D(laser_delay, 110.21, 110.5, 0.01, 2400, "DS_range2", return_to_initial_values=False)
scan.scan1D(laser_delay, 111, 130, 0.5, 2400, "DS_range3", return_to_initial_values=False)

46
tth.py
View File

@ -40,8 +40,8 @@ class Coupled_tth(Adjustable):
def __init__(self, ID="tth", units="deg", delta=0, name="" ):
super().__init__(ID, name=name, units=units)
self.SRY = Motor("SATES30-RIXS:MOT_SRY.VAL")
self.DRY = Motor("SATES30-RIXS:MOT_DRY.VAL")
self.SRY = Motor("SATES30-ARES:MOT_SRY.VAL")
self.DRY = Motor("SATES30-ARES:MOT_DRY.VAL")
self.delta = delta
def set_target_value(self, value):
@ -56,7 +56,49 @@ class Coupled_tth(Adjustable):
def is_moving(self):
return any([self.SRY.is_moving(),self.DRY.is_moving()])
class Coupled_tth_RIXSside(Adjustable):
def __init__(self, ID="tth", units="deg", delta=0, name="" ):
super().__init__(ID, name=name, units=units)
self.SRY = Motor("SATES30-ARES:MOT_SRY.VAL")
self.DRY = Motor("SATES30-ARES:MOT_DRY.VAL")
self.delta = delta
def set_target_value(self, value):
s_SRY = value -90 + self.delta
s_DRY = 2*value-199.9
t_SRY = self.SRY.set_target_value(s_SRY)
t_DRY = self.DRY.set_target_value(s_DRY)
t_SRY.wait()
t_DRY.wait()
def get_current_value(self):
return (self.DRY.get_current_value()*(-1)-199.9)*(-.5)
def is_moving(self):
return any([self.SRY.is_moving(),self.DRY.is_moving()])
class Coupled_tth_outer(Adjustable):
def __init__(self, ID="tth", units="deg", delta=0, name="" ):
super().__init__(ID, name=name, units=units)
self.SRY = Motor("SATES30-ARES:MOT_SRY.VAL")
self.twoTRY = Motor("SATES30-ARES:MOT_2TRY.VAL")
self.delta = delta
def set_target_value(self, value):
s_SRY = value-90+self.delta
s_2TRY = 215.435 -2*value
t_SRY = self.SRY.set_target_value(s_SRY)
t_2TRY = self.twoTRY.set_target_value(s_2TRY)
t_SRY.wait()
t_2TRY.wait()
def get_current_value(self):
return (215.435-self.twoTRY.get_current_value())*0.5
def is_moving(self):
return any([self.SRY.is_moving(),self.twoTRY.is_moving()])