added lots of .py

This commit is contained in:
gac-alvra
2023-10-23 18:49:28 +02:00
parent 56327ce073
commit fa2caeff3e
24 changed files with 1771 additions and 0 deletions

24
dioderata/infinite_jest.py Executable file
View File

@ -0,0 +1,24 @@
#!/usr/bin/env python
import epics
from epics import caput
import numpy as np
# config
#STAGEpv = epics.PV('SLAAR11-LMOT-M452:MOTOR_1.VAL') # global globi
stagePV = epics.PV('SLAAR11-LMOT-M424:MOT.VAL')
c = 299792458
def mm2fs(d):
# d in mm, output in fs
return np.around(2*d*10**(-3)/c*10**15, decimals=5)
def fs2mm(t):
# t in fs, output in mm
return np.around(c*t/2*10**(-12), decimals=5)
t0 = 168.760
while True:
stagePV.put(t0 - fs2mm(200))
stagePV.put(t0 + fs2mm(500))