Commit 041aae89 authored by rodolakis's avatar rodolakis
Browse files

add beamsteering fct to StartOfTheWeek

parent 89e67da1
......@@ -52,7 +52,7 @@ from Macros_29id.ScanFunctions_LakeShore import *
#MPA_ROI_SetUp calls: from ScanFunctions_AD import AD_ROI_SetUp
#from ScanFunctions_plot import fit_mda, mda_1D,fit_gauss
#import matplotlib.pyplot as plt
......@@ -4767,9 +4767,17 @@ def StartOfTheWeek(GRT,branch,wait=False,**kwargs):
print(scan+" is not a valid scan scanType=['slit1','wire','flux','monoVslit']")
return
def beamsteering(x,y):
D={}
return
def beamsteering(h,v):
D={'V':[' urad up',' urad down'], 'H':[' urad outboard',' urad inboard']}
hrad=round(h*10/0.25,0)
vrad=round(v*10/0.25,0)
if h<0: ih=0
else: ih=1
if v<0: iv=0
else: iv=1
H1=str(hrad)+D['H'][ih]
V1=str(vrad)+D['V'][iv]
return H1,V1
### checking diode settings:
......@@ -4877,6 +4885,10 @@ def StartOfTheWeek(GRT,branch,wait=False,**kwargs):
print(' - horizontal: '+str(slit1h))
print(' - vertical: '+str(slit1v))
print('\n')
a,b=beamsteering(slit1h,slit1v)
print(a+' ; '+b)
except:
print('Unable to fit position; try to tweak xrange or FWHM:')
print('fit_mda('+str(m)+','+str(detCA4)+',1,"gauss",xrange=[-1,1])')
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment