Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
I
iexcode
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
29id
iexcode
Commits
0ebfcd44
Commit
0ebfcd44
authored
2 years ago
by
jmcchesn
Browse files
Options
Downloads
Patches
Plain Diff
BE scanning debug
parent
330e207c
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
iexcode/instruments/Scienta.py
+4
-6
4 additions, 6 deletions
iexcode/instruments/Scienta.py
iexcode/instruments/electron_analyzer.py
+20
-1
20 additions, 1 deletion
iexcode/instruments/electron_analyzer.py
with
24 additions
and
7 deletions
iexcode/instruments/Scienta.py
+
4
−
6
View file @
0ebfcd44
...
...
@@ -35,12 +35,10 @@ def AllowedEnergyRange(*args):
return
Table
if
len
(
args
)
==
2
:
try
:
PassEnergy
,
LensMode
=
args
KEmin
,
KEmax
=
Table
[
LensMode
][
PassEnergy
]
return
KEmin
,
KEmax
except
:
return
None
PassEnergy
,
LensMode
=
args
KEmin
,
KEmax
=
Table
[
LensMode
][
PassEnergy
]
return
KEmin
,
KEmax
else
:
print
(
'
Not a valid argument
'
)
...
...
This diff is collapsed.
Click to expand it.
iexcode/instruments/electron_analyzer.py
+
20
−
1
View file @
0ebfcd44
...
...
@@ -18,7 +18,7 @@ from iexcode.instruments.IEX_BL_config import *
from
iexcode.instruments.AD_utilities
import
AD_filepath
,
AD_prefix
from
iexcode.instruments.scanRecord
import
*
from
iexcode.instruments.conversions_constants
import
*
from
iexcode.instruments.xrays
import
energy
,
scanXAS
,
BL_energy_tables
from
iexcode.instruments.xrays
import
energy
,
scanXAS
,
BL_energy_tables
,
energy_get
from
iexcode.instruments.shutters
import
branch_shutter_close
from
iexcode.instruments.VLS_PGM
import
mono_energy_get
from
iexcode.instruments.files_and_folders
import
get_next_fileNumber
...
...
@@ -362,6 +362,7 @@ def scanEA(EAlist,**kwargs):
pass
else
:
print
(
"
need to specify BE or KE
"
)
return
if
EAlist
[
-
1
]
==
'
BS
'
:
sweeps
=
EAlist
[
-
2
]
...
...
@@ -370,6 +371,20 @@ def scanEA(EAlist,**kwargs):
if
kwargs
[
'
debug
'
]:
print
(
"
sweeps:
"
+
str
(
sweeps
))
#check KEs within limit
if
EAlist
[
0
]
==
"
KE
"
:
KElist
=
np
.
array
(
EAlist
[
1
:
-
3
])
elif
EAlist
[
0
]
==
"
BE
"
:
KElist
=
energy_get
()
-
np
.
array
(
EAlist
[
1
:
-
3
])
if
KElist
[
0
]
>
KElist
[
1
]:
print_warning_message
(
'
EA scans from low to high in kinetic energy
'
)
return
KEmin
,
KEmax
=
AllowedEnergyRange
(
EAlist
[
-
3
],
'
Angular
'
)
if
KElist
[
0
]
<
KEmin
:
print_warning_message
(
'
kinetic energy belowed minimum allowed energy
'
)
print
(
AllowedEnergyRange
())
return
if
EAlist
[
0
]
==
"
BE
"
:
if
len
(
EAlist
)
==
5
:
#Fixed
...
...
@@ -377,6 +392,7 @@ def scanEA(EAlist,**kwargs):
EAlist
[
1
]
=
caget
(
pvCalcOut1
+
'
.VAL
'
)
arrayP1
=
list
(
np
.
full
(
sweeps
,
EAlist
[
1
]))
scan_fillin_table
(
pvCalcOut1
+
'
.PROC
'
,
""
,
kwargs
[
"
scanIOC
"
],
kwargs
[
"
scan_dim
"
],
arrayP1
,
1
)
scan_positioner_after_set
(
positioner_after_scan
=
"
STAY
"
)
EAlist
[
1
]
=
arrayP1
[
0
]
if
kwargs
[
'
debug
'
]:
print
(
'
\n
pvCalcOut1:
'
,
pvCalcOut1
)
...
...
@@ -386,6 +402,7 @@ def scanEA(EAlist,**kwargs):
EAlist
[
1
]
=
caget
(
pvCalcOut1
+
'
.VAL
'
)
arrayP1
=
list
(
np
.
full
(
sweeps
,
EAlist
[
1
]))
scan_fillin_table
(
pvCalcOut1
+
'
PROC
'
,
""
,
kwargs
[
"
scanIOC
"
],
kwargs
[
"
scan_dim
"
],
arrayP1
,
1
)
scan_positioner_after_set
(
positioner_after_scan
=
"
STAY
"
)
print
(
'
\n
pvCalcOut1:
'
,
pvCalcOut1
)
print
(
'
Pos1 table:
'
,
arrayP1
)
elif
len
(
EAlist
)
==
7
:
#Sweep
...
...
@@ -397,6 +414,7 @@ def scanEA(EAlist,**kwargs):
arrayP2
=
list
(
np
.
full
(
sweeps
,
EAlist
[
2
]))
scan_fillin_table
(
pvCalcOut1
+
'
.PROC
'
,
""
,
kwargs
[
"
scanIOC
"
],
kwargs
[
"
scan_dim
"
],
arrayP1
,
1
)
scan_fillin_table
(
pvCalcOut2
+
'
.PROC
'
,
""
,
kwargs
[
"
scanIOC
"
],
kwargs
[
"
scan_dim
"
],
arrayP2
,
2
)
scan_positioner_after_set
(
positioner_after_scan
=
"
STAY
"
)
if
kwargs
[
'
debug
'
]:
print
(
"
\n
pvCalcOut1
"
,
pvCalcOut1
)
print
(
"
\n
pvCalcOut2
"
,
pvCalcOut2
)
...
...
@@ -442,6 +460,7 @@ def scanEA(EAlist,**kwargs):
EAlog_update
()
scanEA_reset
(
**
kwargs
)
scan_after_table_reset
(
**
kwargs
)
scan_positioner_after_set
(
positioner_after_scan
=
"
PRIOR
"
)
else
:
return
EAparms
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
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!
Save comment
Cancel
Please
register
or
sign in
to comment