Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
F
FMC DEL 1ns 2cha
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
9
Issues
9
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
image/svg+xml
Discourse
Discourse
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Projects
FMC DEL 1ns 2cha
Commits
48ce8a91
Commit
48ce8a91
authored
Aug 18, 2016
by
Jan Pospisil
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
little bit of calibration
parent
e938e57a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
5 deletions
+7
-5
FFPG_driver.py
sw/FFPG_driver.py
+7
-5
No files found.
sw/FFPG_driver.py
View file @
48ce8a91
...
...
@@ -470,7 +470,8 @@ RF_2_BUNCH_RATIO = 5
# delay - delay parameter to be set
def
CalculateParams
(
t
):
rfPeriod
=
4.99
delayOffset
=
3.739
delayOffset
=
3.714
delayScale
=
1.0362
if
(
t
<
0
)
or
(
t
>
RF_2_BUNCH_RATIO
*
rfPeriod
):
raise
Exception
(
"Parameter t can be just in one bunch clock period!"
)
...
...
@@ -478,7 +479,7 @@ def CalculateParams(t):
bit
=
int
(
t
/
rfPeriod
)
# bit position
rest
=
t
-
bit
*
rfPeriod
# in ns
rest
+=
delayOffset
delay
=
int
(
round
(
rest
*
100
))
# delay IC value
delay
=
int
(
round
(
delayScale
*
rest
*
100
))
# delay IC value
return
(
bit
,
delay
)
...
...
@@ -497,11 +498,12 @@ def SetPulseShape(channel, delay, width):
def
TestPulse
(
channel
=
1
,
overflow
=
17820
):
# configure channel
WbWrite
(
'overflow'
,
overflow
)
WbWrite
(
'trig_latency'
,
1
0
)
WbWrite
(
'trig_latency'
,
1
2
)
pulseDelay
=
0
# inter-bunch pulse delay in [ns]
pulseWidth
=
1
2.5
# inter-bunch pulse width in [ns]
pulseDelay
=
1
0
# inter-bunch pulse delay in [ns]
pulseWidth
=
1
0
# inter-bunch pulse width in [ns]
bunches
=
(
0
,
1
,
2
,
10
,
50
)
# in which bunches pulse should be
bunches
=
range
(
overflow
/
RF_2_BUNCH_RATIO
)
(
setBit
,
resBit
)
=
SetPulseShape
(
channel
,
pulseDelay
,
pulseWidth
)
for
bunch
in
bunches
:
...
...
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