ratal / mdfreader

Read Measurement Data Format (MDF) versions 3.x and 4.x file formats in python
Other
169 stars 74 forks source link

wrong output data from getChannelData #67

Closed danielhrisca closed 6 years ago

danielhrisca commented 7 years ago

when looking at the last 100 samples of the channel "MAIN_CLOCK" they should be:

[1305 1306 1307 1308 1309 1310 1311 1312 1313 1314 1315 1316 1317 1318 1319
 1320 1321 1322 1323 1324 1325 1326 1327 1328 1329 1330 1331 1332 1333 1334
 1335 1336 1337 1338 1339 1340 1341 1342 1343 1344 1345 1346 1347 1348 1349
 1350 1351 1352 1353 1354 1355 1356 1357 1358 1359 1360 1361 1362 1363 1364
 1365 1366 1367 1368 1369 1370 1371 1372 1373 1374 1375 1376 1377 1378 1379
 1380 1381 1382 1383 1384 1385 1386 1387 1388 1389 1390 1391 1392 1393 1394
 1395 1396 1397 1398 1399 1400 1401 1402 1403 1404]

instead they are

[         5  654311424   86507520     338176       1322   83886085
     327680       1280          5   83886080 2735013888   10683648
      41733        163   83886080   84213760   84215040   84215045
   84215045     328965       1285          5   83886080   84213760
   84215040  453313797 2736456965   10689285      41755        163
  100663296 2063990784    8062464  805337862  171442299     671744
       2632         10 2734686208   10682368      41728        163
          0          0  452984832  907739136   87431936     341531
       1334          5 4278190080 4294901760   16776960      65535
 2734686463   10682368      41728        163  251658240  319750144
   18026240      70415   83886355     327681       1280          5
          0          0 3305111552  263847936   17837568      69695
 1795162384   24379393   83980288   84214130 2902787329   28116229
     109829        429 4043309057  250806272    1004800       3917
  486539279    1966080       7680          0  842032753  875573554
          0          0          0 1650552421          0          0
          0          0 1918986272          0]

The sample file:

error.zip

ratal commented 7 years ago

Hi Daniel, What you have seems indeed not normal. However, I could not reproduce your issue with your attached file on both python 2.7&3.5 with master branch (pre 0.2.5) I have a channel going linearly up to 4585 and back to 0 (not exactly what you showed, probably another file ?) So what platform are you using (python version, OS; mdfreader version) ?

danielhrisca commented 7 years ago

Hello, I get this error using WinPython 3.6.1.0Qt5-32bit. Indeed with WinPython 3.5.3.0Qt5-32bit the channel data is loaded correctly, so it must be related to Python 3.6 since numpy and pandas versions are the same between them.

PS: tested on Windows 7 64bit and Windows 10 64bit, mdfreader 0.2.4 and 0.2.5

danielhrisca commented 6 years ago

This wass probably a bug in Python 3.6.1 With 3.6.2 and mdfreader 0.2.6 there is no problem