Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
cs
util
sequencer
scan-p-gun-vgrid
Commits
6fb754f0
Commit
6fb754f0
authored
Nov 22, 2022
by
Francesco Tripaldi
Browse files
Fix Topup interlock 0,5mA
parent
1a0dbd20
Changes
1
Hide whitespace changes
Inline
Side-by-side
src/ScanPGunVgrid.py
View file @
6fb754f0
...
...
@@ -85,10 +85,10 @@ def main():
selfseq_dev
.
write_attribute
(
"ScriptErr"
,
"Grid disabled or zero voltage during scan"
)
gun_dev
.
write_attribute
(
'FastGridVoltage'
,
starting_gun
)
sys
.
exit
(
1
)
#
if topup_test_mode == True and (plc_status[9] == True or bool(trigger_gun.read_attribute("gun_trigger_on").value) == False):
#
#print("Interlock dcct booster, stop")
#
scan_stop = x
#
break
if
topup_test_mode
==
True
and
(
plc_status
[
9
]
==
True
or
bool
(
trigger_gun
.
read_attribute
(
"gun_trigger_on"
).
value
)
==
False
):
#print("Interlock dcct booster, stop")
scan_stop
=
x
break
#print("valore gun: " + str(x))
gun_dev
.
write_attribute
(
'FastGridVoltage'
,
x
)
...
...
@@ -133,7 +133,7 @@ def main():
selfseq_dev
.
write_attribute
(
"topup_voltage"
,
topup_grid
)
except
:
pass
print
(
topup_grid
)
#
print(topup_grid)
# calculate second order deriv.
y_conv
=
np
.
convolve
(
y1
,
yp
,
mode
=
"same"
)
# best_vgrid = xp[np.where(y_conv == np.amin(y_conv))[0][0]]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a 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