Files
EsfRixsApps/ESF_RIXS/RIXScfg.py
2024-09-17 10:36:47 +02:00

62 lines
2.2 KiB
Python

import numpy as np
class Config:
#_lutProbes={
# '<key>':{
# 'R':<radius of the grating mirror>
# 'a0':<lines/mm>,'a1':<lines/mm^2>,'a2':<lines/mm^3>,'a3':<lines/mm^4> # polynome for line density of the mirror
# 'eqs'{ #<equation solving parameters>
# 'k': <deflection_lutColor order (default=1)>,
# 'lut': [# lookup table for starting guess values at a given energy for equation solver
# ( <energy (eV)>, <r1(mm)>, <r2(mm)>, <alpha(rad)>),
# ( ... ),
# ],
# },
# },
# '<key>':{
# ...
# }
#}
_lutProbes={
'g80_1':{ # grating-key { radius of the grating mirror, polynome for line density of the mirror
'R':65144.054, 'a0':1160.759,'a1':0.3409,'a2':-3.74E-5,'a3':1.98E-7,
'e':(300,1600), #optional energy range min max
'esp':{'k': 1, # equation solving parameters { deflection order
'lut': [ # lookup table for starting guess values at a given energy for equation solver
(300, 1193, 4127, np.deg2rad(88)), # energy(eV), r1(mm), r2(mm), alpha(rad),
],},},
'g80_2':{
'R':65144.054, 'a0':1160.759,'a1':0.3409,'a2':-3.74E-5,'a3':1.98E-7,
'esp':{'k': 2,
'lut': [
(350, 1045, 4557, np.deg2rad(88)),
(500, 1398, 3763, np.deg2rad(88)),
],},},
'g80_3':{
'R':65144.054, 'a0':1160.759,'a1':0.3409,'a2':-3.74E-5,'a3':1.98E-7,
'esp':{'k': 3,
'lut': [
(400, 988, 4778, np.deg2rad(88)),
(800, 1156, 4218, np.deg2rad(88)),
],},},
'gtst_1':{
'R':65144.054, 'a0':1360.759,'a1':0.3409,'a2':-3.74E-5,'a3':1.98E-7,
'e':(1500,1900), #optional energy range min max
'esp':{'k': 1,
'lut': [
(300, 1133, 4468, np.deg2rad(88)),
],},},
}
_spectrometer={
'vis':{'ofs':(500, 500),},
'probes':{ # upstream 2x6
'80meV' :{'probe':'g80_1','txy':(0., 0.),}, # txy='sample motor positions for probe'
'80meV_k=2' :{'probe':'g80_2','txy':(0., 1.),}, # ofs= offsets for various motors
'80meV_k=3' :{'probe':'g80_3','txy':(0., 2.),},
'gratingTest1':{'probe':'gtst_1','txy':(0., 3.),},
},
}