Commit 92c8c669 authored by Jan Pospisil's avatar Jan Pospisil

fixed inverted pulse mode

parent 5d8111c5
......@@ -370,10 +370,10 @@ class Ffpg(object):
assert (pulseDelay >= 0) and (pulseDelay < lhcBunchPeriod), "Pulse starts out of the LHC bunch period!"
assert (pulseStop > pulseDelay) and (pulseStop <= lhcBunchPeriod), "Pulse stops out of the LHC bunch period!"
if polarity == 0: # Swap `start` and `stop` for inverted mode
tmp = start
start = stop
stop = tmp
if polarity == 0: # Swap `pulseDelay` and `pulseStop` for inverted mode
tmp = pulseDelay
pulseDelay = pulseStop
pulseStop = tmp
# calculate pulse shape inside the bunch
rfToBunchRatio = int(round(lhcBunchPeriod / clockPeriod))
......
Markdown is supported
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