Data exported with taurustrend is rounded off but the data is clearly visible in the plot.
For example:
Data is exported as
2016-03-23_16:30:06.418375 1
2016-03-23_16:30:09.418396 1
2016-03-23_16:30:12.418492 1
2016-03-23_16:30:15.418351 1
2016-03-23_16:30:57.418210 1
When it should be
2016-03-23_17:05:43.190242 1.0
2016-03-23_17:05:46.190838 1.0000000000001
2016-03-23_17:05:49.190763 1.0000000000001998
2016-03-23_17:05:52.190034 1.0000000000002998
2016-03-23_17:05:55.190817 1.0000000000003997
2016-03-23_17:05:58.190714 1.0000000000004996
2016-03-23_17:06:01.190875 1.0000000000005995
2016-03-23_17:06:04.190881 1.0000000000006994
2016-03-23_17:06:07.190186 1.0000000000007994
2016-03-23_17:06:10.190832 1.0000000000008993
2016-03-23_17:06:13.188450 1.0000000000009992
Steps for reproduction
at = pt.AttributeProxy("sys/tg_test/1/double_scalar_w")
ydata = np.arange(1,1.000000000001,0.0000000000001)
for a in ydata:
at.write(a)
time.sleep(3)
print a
Proposed fix
Changing %g to repr() in QDataExportDialog will not round off the python objects but instead export the string representation. Also see attached patch.
Hi Ludvig,
I could reproduce the bug and reviewed the patch, and I'm agree with your solution.
As a comment for the integrator, I will prefer create the string without using the append command, and fix the PEP8.
Thanks so much!!
The patch has been applied in Taurus 3.7.2. It is still pending do it in develop (Taurus 4).
Thanks,
Carlos
Fixed in develop.
Thanks for the contribution!