Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
rodolakis
Macros_29id
Commits
041aae89
Commit
041aae89
authored
Mar 28, 2022
by
rodolakis
Browse files
add beamsteering fct to StartOfTheWeek
parent
89e67da1
Changes
1
Hide whitespace changes
Inline
Side-by-side
ScanFunctions_IEX.py
View file @
041aae89
...
...
@@ -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])'
)
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment