Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
W
White Rabbit Calibration
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
1
Issues
1
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
White Rabbit Calibration
Commits
cd706b7c
Commit
cd706b7c
authored
Jun 05, 2018
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
typo's in comments
parent
20d82320
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
9 deletions
+9
-9
pps_diff.py
sw/insitu_alpha/pps_diff.py
+9
-9
No files found.
sw/insitu_alpha/pps_diff.py
View file @
cd706b7c
...
...
@@ -338,7 +338,7 @@ def tic_init(counter):
def
delta_delay_dso
(
scope
,
num_avg
=
1
):
"""
Performs a Delta Delay Measurment.
Performs a Delta Delay Measur
e
ment.
scope -- instance of python-vxi connected to the oscilloscope
num_avg -- <int> number of measurements to average
...
...
@@ -361,7 +361,7 @@ def delta_delay_dso(scope, num_avg = 1):
def
spec_alpha
(
alpha
):
"""
returns the value of alpha as it is used by the SPEC
(see also White Rabbit Calibration proc
ude
ure:
(see also White Rabbit Calibration proc
ed
ure:
http://www.ohwr.org/attachments/4092/WR_Calibration-v1.1-20151109.pdf
equation 11.
...
...
@@ -396,7 +396,7 @@ def file_to_array(filename):
line
=
data_file
.
readline
()
if
line
.
strip
()
!=
"# Proposed Delta Delay measurements"
:
Exception
(
"file_to_arrays: Not a Del
at
Delay measurements file."
)
Exception
(
"file_to_arrays: Not a Del
ta
Delay measurements file."
)
data_file
.
close
()
return
(
False
,
alpha_spec_data
)
...
...
@@ -444,7 +444,7 @@ Options:
if
__name__
==
"__main__"
:
#arguments = docopt(__doc__,version='White Rabbit controled via serial port')
#arguments = docopt(__doc__,version='White Rabbit control
l
ed via serial port')
import
argparse
parser
=
argparse
.
ArgumentParser
()
parser
.
add_argument
(
"name"
,
help
=
"file containing ddelay measurements to perform"
)
...
...
@@ -462,7 +462,7 @@ if __name__ == "__main__":
print
(
"Use Master Serial port: "
,
args
.
mserial
)
print
(
"Use Slave Serial port: "
,
args
.
sserial
)
print
(
"Fiber spool temperature track: "
,
args
.
t
)
#print("Osciloscope: ",args.dso)
#print("Oscil
l
oscope: ",args.dso)
print
(
"Time Interval Counter: "
,
args
.
tic
)
print
(
"Output directory: "
,
args
.
output_dir
)
print
(
"measurement avg: "
,
args
.
a
)
...
...
@@ -495,7 +495,7 @@ if __name__ == "__main__":
fixed_delay_slv
=
int
(
0
)
# Slave (dTx + dRx) [ps]
master_is_switch
=
False
# If the master is a WR switch then the restart sequence is different from CLB or SPEC
master_has_tunable
=
True
# det
rmines w
ether the master or the slave has the tunable SFP (due to sfp functions needed
master_has_tunable
=
True
# det
ermines wh
ether the master or the slave has the tunable SFP (due to sfp functions needed
# this only works when master is a CLB or SPEC)
# Master SFP (tunable)
...
...
@@ -580,12 +580,12 @@ if __name__ == "__main__":
ch
=
pair
[
0
]
alpha
=
int
(
round
(
pair
[
1
]))
# Set Master Tunable to the prefered ITU channel
# Set Master Tunable to the prefer
r
ed ITU channel
if
ch
<
itu_channel_start
or
ch
>
itu_channel_stop
:
print
(
"ITU channel out of range "
+
str
(
itu_channel_start
)
+
" to "
+
str
(
itu_channel_stop
))
exit
()
elif
(
ch
>
(
itu_channel_skip
-
itu_skip_width
)
and
ch
<
(
itu_channel_skip
+
itu_skip_width
)):
print
(
"Cho
o
sen ITU channel "
+
str
(
ch
)
+
" is too close to Slave-Master return Channel "
+
str
(
itu_channel_skip
))
print
(
"Chosen ITU channel "
+
str
(
ch
)
+
" is too close to Slave-Master return Channel "
+
str
(
itu_channel_skip
))
exit
()
else
:
sfp_ch
=
tunable
.
sfp_channel
(
ch
)
...
...
@@ -675,7 +675,7 @@ if __name__ == "__main__":
mean
=
arr_value
.
mean
()
sdev
=
arr_value
.
std
(
ddof
=
1
)
if
args
.
t
!=
None
:
# open and configue Digital Multimeter with attached PT100
if
args
.
t
!=
None
:
# open and configu
r
e Digital Multimeter with attached PT100
spool_temp
=
float
(
dmm
.
ask
(
"MEAS:TEMP? FRTD"
))
print
(
"delta delay: "
+
str
(
mean
)
+
" Std Deviation: "
+
str
(
sdev
)
+
" fiber-spool temp: "
+
str
(
spool_temp
))
...
...
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