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
03f0809c
Commit
03f0809c
authored
Nov 06, 2018
by
Peter Jansweijer
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Repaired hard coded sample period for "wrong correlation"
parent
f2d72f4a
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
AnalyzeScopeData.py
sw/eooe/AnalyzeScopeData.py
+5
-5
No files found.
sw/eooe/AnalyzeScopeData.py
View file @
03f0809c
...
...
@@ -54,9 +54,9 @@ lib_path = os.path.join(lib_path,"..")
sys
.
path
.
insert
(
0
,
lib_path
)
# import docopt
import
lib.LeCroy8254
as
DSO
#
import lib.LeCroy8254 as DSO
#
import lib.Keysight_DSO_S_254A as DSO
import
lib.Keysight_DSO_S_254A
as
DSO
import
lib.delay_determination
as
dd
...
...
@@ -195,9 +195,9 @@ def dowork(filename,dirname):
estimated_max
=
numpy
.
argmax
(
cy
)
-
correlation_zero
# print ("estimated max raw type: ",type(estimated_max))
# if emstimated_max is more + 3 ns: wrong correlation: add 2**7-1
gigabit periods
# if emstimated_max is more + 3 ns: wrong correlation: add 2**7-1
(=PRBS-7) gigabit periods (= 800 ps)
if
estimated_max
<
-
400
/
topt
:
# -12E-9 / sample_period:
estimated_max
=
estimated_max
+
8128
/
topt
# (2**7-1) * 0.8E-9 / sample_period
estimated_max
=
numpy
.
int64
(
estimated_max
+
((
2
**
7
-
1
)
*
0.8E-9
)
/
(
sample_period
*
topt
))
# (2**7-1) * 0.8E-9 / sample_period
# print ("estimated max type: ",type(estimated_max),estimated_max)
delay1
=
sample_period
*
dd
.
peak_position
(
cx
,
cy
,
x_estimate
=
estimated_max
)
...
...
@@ -239,7 +239,7 @@ def dowork(filename,dirname):
cor_fig
=
plt
.
figure
(
"correlation"
)
ax
=
cor_fig
.
add_subplot
(
111
)
ax
.
text
(
0.01
,
0.95
,
'correlation of ch: '
+
str
(
trace1
)
+
' and '
+
str
(
trace2
),
transform
=
ax
.
transAxes
)
ax
.
text
(
0.01
,
0.90
,
'delay at estimated max {0:
d
} = {1:.6g}'
.
format
(
estimated_max
,
delay1
),
transform
=
ax
.
transAxes
)
ax
.
text
(
0.01
,
0.90
,
'delay at estimated max {0:
f
} = {1:.6g}'
.
format
(
estimated_max
,
delay1
),
transform
=
ax
.
transAxes
)
ax
.
set_xlabel
(
'sample'
)
ax
.
set_ylabel
(
'correlation'
)
ax
.
plot
(
cx
,
cy
)
...
...
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