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
e46eb588
Commit
e46eb588
authored
8 months ago
by
hao.zheng
Browse files
Options
Downloads
Patches
Plain Diff
Ocutpole changes
parent
f99ca166
Branches
Shutdown_dev
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
iexcode/instruments/scanRecord.py
+6
-6
6 additions, 6 deletions
iexcode/instruments/scanRecord.py
iexcode/instruments/valves.py
+12
-8
12 additions, 8 deletions
iexcode/instruments/valves.py
iexcode/macros/Octupole/Octupole_endstation.py
+5
-1
5 additions, 1 deletion
iexcode/macros/Octupole/Octupole_endstation.py
with
23 additions
and
15 deletions
iexcode/instruments/scanRecord.py
+
6
−
6
View file @
e46eb588
...
...
@@ -569,7 +569,7 @@ class ScanRecord:
self
.
before_scan_set
(
**
kwargs
)
self
.
after_scan_set
(
**
kwargs
)
time
.
sleep
(
1
)
time
.
sleep
(
.
1
)
def
reset_all
(
self
):
"""
...
...
@@ -952,8 +952,8 @@ class ScanRecord:
returns limits_ok (True / False)
"""
scan_pv
=
self
.
ioc
+
"
scan
"
+
str
(
scan_dim
)
caput
(
scan_pv
+
'
.CMND
'
,
1
)
time
.
sleep
(.
5
)
caput
(
scan_pv
+
'
.CMND
'
,
1
,
wait
=
True
)
#
time.sleep(.5)
-JM added wait=True instead
SMSG
=
caget
(
scan_pv
+
'
.SMSG
'
,
as_string
=
True
)
if
verbose
:
print
(
SMSG
)
...
...
@@ -1047,10 +1047,10 @@ class ScanRecord:
##############################################################################################################
############################# progress, go and abort ##############################
##############################################################################################################
def
progress
(
self
,
scan_dim
,
verbose
=
True
):
def
progress
(
self
,
scan_dim
,
verbose
=
True
,
wait_time
=
30
):
"""
Checks if a scan is in progress, and sleeps until it is done
wait_time is the time in seconds between checks
pv now includes the full 29idARPES:
Previously: Scan_Progress
"""
...
...
@@ -1059,7 +1059,7 @@ class ScanRecord:
while
(
check
!=
0
):
if
verbose
:
print
(
pv
+
"
in progress - please wait...
"
)
time
.
sleep
(
30
)
time
.
sleep
(
wait_time
)
check
=
caget
(
pv
+
"
.FAZE
"
)
def
abort
(
self
):
...
...
This diff is collapsed.
Click to expand it.
iexcode/instruments/valves.py
+
12
−
8
View file @
e46eb588
...
...
@@ -5,7 +5,7 @@ import iexcode.instruments.cfg as iex
branch_GVs
=
{
'
c
'
:(
'
10
'
),
'
d
'
:(
'
14
'
),
'
e
'
:(
'
18
'
),
'
e
'
:(
'
18
'
,
'
19
'
),
}
def
branch_valve_close
(
branch
=
None
):
...
...
@@ -13,17 +13,21 @@ def branch_valve_close(branch=None):
closes the endstation valve for the current branch or specified branch
"""
if
branch
==
None
:
GV
=
branch
_GVs
[
iex
.
BL
.
branch
]
else
:
GV
=
branch_GVs
[
branch
]
valve_close
(
GV
,
verbose
=
True
)
branch
=
[
iex
.
BL
.
branch
]
GVs
=
branch_GVs
[
branch
]
for
GV
in
GVs
:
valve_close
(
GV
,
verbose
=
True
)
def
branch_valve_open
():
"""
closes the endstation valve for the current branch
"""
GV
=
branch_GVs
[
iex
.
BL
.
branch
]
valve_open
(
GV
,
verbose
=
True
)
if
branch
==
None
:
branch
=
[
iex
.
BL
.
branch
]
GVs
=
branch_GVs
[
branch
]
for
GV
in
GVs
:
valve_open
(
GV
,
verbose
=
True
)
#####################################################
def
valve_close
(
GV
,
verbose
=
True
):
...
...
@@ -83,4 +87,4 @@ def valve_status(GV,verbose=True):
else
:
status
=
'
error
'
return
status
\ No newline at end of file
return
status
This diff is collapsed.
Click to expand it.
iexcode/macros/Octupole/Octupole_endstation.py
+
5
−
1
View file @
e46eb588
...
...
@@ -749,7 +749,7 @@ def scanXMCDpulse(field_start,field_stop, field_step,**kwargs):
execute: True/False to start the scan => True (default)
"""
kwargs
.
setdefault
(
'
scan_dim
'
,
1
)
kwargs
.
setdefault
(
'
cts
'
,
0.
1
)
kwargs
.
setdefault
(
'
cts
'
,
1
)
kwargs
.
setdefault
(
'
execute
'
,
True
)
det_dit_True
=
xmcd_detectors
()
...
...
@@ -807,9 +807,11 @@ def Octupole_safe_state(**kwargs):
**kwargs
shutter_close = True; closes the D-shutter
valve_close = True; closes the D-valve
field = True; sets the magnetic field to 0
"""
kwargs
.
setdefault
(
"
shutter_close
"
,
True
)
kwargs
.
setdefault
(
"
valve_close
"
,
True
)
kwargs
.
setdefault
(
"
magnet
"
,
True
)
if
kwargs
[
'
shutter_close
'
]:
branch_shutter_close
(
branch
=
'
d
'
)
...
...
@@ -818,5 +820,7 @@ def Octupole_safe_state(**kwargs):
branch_valve_close
(
branch
=
'
d
'
)
branch_valve_close
(
branch
=
'
e
'
)
if
kwargs
[
'
magnet
'
]:
field
(
V
)
\ No newline at end of file
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