Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Long memory time precision #3

Open
KP1533TM2 opened this issue Sep 2, 2017 · 1 comment
Open

Long memory time precision #3

KP1533TM2 opened this issue Sep 2, 2017 · 1 comment

Comments

@KP1533TM2
Copy link

KP1533TM2 commented Sep 2, 2017

Attempting to export CSV of a 1M long memory capture from a Rigol "DS1152E-EDU" (which is really DS1052E with bandwidth unlocked up to 150MHz) with time column included results in duplicate time records. Looks like there's a loss of time precision going on, probably something like a rounding error:

# a couple oneliners to find duplicates in columns that I took from
# https://stackoverflow.com/questions/32084888/awk-how-do-i-find-duplicates-in-a-column

# Returns nothing
awk -F, 'a[$1]++{count++} END{print count}' normal.csv
# Again, returns nothing
awk -F, '$1 in a{print "line " NR; a[$1]; print} {a[$1]=$0}' normal.csv

# Returns 49571
awk -F, 'a[$1]++{count++} END{print count}' normal.csv
# Returns a huge list of duplicated values in time column
awk -F, '$1 in a{print "line " NR ": " a[$1]} {a[$1]=$0}' longmem.csv | tail -n 10
line 1048566: 0.0104649,-0.15624
line 1048567: 0.0104649,-0.15624
line 1048568: 0.0104649,-0.15624
line 1048569: 0.0104649,-0.15624
line 1048570: 0.0104649,-0.15624
line 1048571: 0.0104649,-0.15624
line 1048572: 0.0104649,-0.15624
line 1048573: 0.0104649,-0.15624
line 1048575: 0.010465,-0.15624
line 1048576: 0.010465,-0.15624

# And, just to be sure, it seems to be the case indeed
tail -n 10 longmem.csv 
0.0104649,-0.15624
0.0104649,-0.15624
0.0104649,-0.15624
0.0104649,-0.15624
0.0104649,-0.15624
0.0104649,-0.15624
0.0104649,-0.15624
0.010465,-0.15624
0.010465,-0.15624
0.010465,-0.15624

I've attached normal.csv and longmem.csv in captures.zip

I almost missed it, but I suspect that's the thing that forced me to spend an evening trying to figure out why my absolutely synchronous signals started to drift apart right in, and only in the middle of my dataset :) :
image

(I'm feeding those CSVs to a Python script for further manual scaling/alignment/slicing so I could visually compare them in the plot)

@wd5gnr
Copy link
Owner

wd5gnr commented Dec 31, 2017

Hmm I no longer have that scope (upgraded) but I suspect you are right.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants