-
Notifications
You must be signed in to change notification settings - Fork 19
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
Strange problem with decimal places #8
Comments
Dear @amindervirdee, Thank you very much for creating this thread and for the presented detailed example regarding the identified issue. This should ensure the uniformity of the output data format. However, I will carefully wait for your feedback to understand if you are still facing problems! |
Hi Again I updated the library but still having the same issue. Additionally, some of the sensors are picking up quite erratic and non-realistic measurements? especially ECG and EDA - Is this an issue with the sensors provided or something within the code? Thanks! |
Dear @amindervirdee, Thank you very much for your most recent comment/feedback! This is a quite strange behaviour, but, we are always ready to face a tricky challenge :-) In order to fully replicate the problem, I will kindly request you some further information's:
Regarding the erratic values, the API returns RAW data values (integers generated by the Analog to Digital Converter | ADC), so, for BITalino typically we will obtain values between 0 and 1023 (2^resolution - 1 = 2^10 - 1 = 1023). However, taking into consideration that these values don't present a direct physical meaning, while analysing the results it is advisable to convert them through the available transfer function for the sensor being used. Each sensor has a datasheet with the correspondent transfer function, which you will be able to access at https://bitalino.com/en/learn/documentation For the particular cases of EDA and ECG: https://bitalino.com/datasheets/REVOLUTION_EDA_Sensor_Datasheet.pdf#page=2 | https://bitalino.com/datasheets/REVOLUTION_ECG_Sensor_Datasheet.pdf#page=2 Are you obtaining values outside the normal range? I will carefully wait for your kind feedback ;-) |
Hello. I am using Python 3.7.6, and the script am using is the Python example code on this page. As far as utilising these transfer functions, is there any example of them being applied in code, Python or otherwise? It's not that I am receiving values outside the normal range, it's just that the sensor data presents erratically - fluctuating randomly between the high and low parts of the range. |
Dear @amindervirdee, I am grateful for this clarification, it will be helpful in our try to fully replicate all experimental conditions. Regarding the transfer functions, in fact there are some examples of application in Python:
The previous links are dedicated to apply the transfer functions of biosignalsplux ECG and EDA sensors (which are not exactly identical to BITalino), however, the steps that should be followed in Python are exactly the same. Saturation is an undesirable situation, which could be caused by a malfunctioning of the sensor or by a problem in the reference/ground definition. Despite not impossible, the first option seems less probable, considering that both sensors are presenting the same behaviour. Meanwhile, I will start the procedures to replicate the identified error in your experimental conditions! |
Dear @amindervirdee, Since our last communication I have positive news regarding the original question! I was able to replicate the problem, it is probably related with the import statement. In the README.md of the GitHub repository, the 2nd Installation step request the installation of BITalino API through pip However, the last update (4e67908) was only applied to the GitHub repository, so, you should locate the site-packages folder of your Python installation (as demonstrated on the followin animation) and replace the bitalino.py file for the one available in the GitHub repository (https://github.com/BITalinoWorld/revolution-python-api/blob/master/bitalino.py). I believe that this will solve the problem :-D |
Hello,
I am using this example code with my Revolution board, and I have verified that all my sensors and outputs work.
However, I have a very strange problem that occurs where the data randomly changes between int and float, which is making doing anything else with the data quite difficult.
This is what I mean:
[[1.400e+01 1.000e+00 1.000e+00 1.000e+00 0.000e+00 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00 2.900e+01]
[1.500e+01 1.000e+00 1.000e+00 1.000e+00 0.000e+00 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00 2.900e+01]
[0.000e+00 1.000e+00 1.000e+00 1.000e+00 0.000e+00 0.000e+00 1.600e+02
0.000e+00 0.000e+00 0.000e+00 2.900e+01]
[1.000e+00 1.000e+00 1.000e+00 1.000e+00 0.000e+00 0.000e+00 1.022e+03
0.000e+00 0.000e+00 0.000e+00 2.900e+01]
[2.000e+00 1.000e+00 1.000e+00 1.000e+00 0.000e+00 0.000e+00 1.022e+03
0.000e+00 0.000e+00 0.000e+00 2.900e+01]
[3.000e+00 1.000e+00 1.000e+00 1.000e+00 0.000e+00 0.000e+00 0.000e+00
0.000e+00 0.000e+00 0.000e+00 2.900e+01]
[4.000e+00 1.000e+00 1.000e+00 1.000e+00 0.000e+00 0.000e+00 4.710e+02
0.000e+00 0.000e+00 0.000e+00 2.800e+01]
[5.000e+00 1.000e+00 1.000e+00 1.000e+00 0.000e+00 0.000e+00 6.880e+02
0.000e+00 0.000e+00 0.000e+00 2.800e+01]
[6.000e+00 1.000e+00 1.000e+00 1.000e+00 0.000e+00 0.000e+00 3.870e+02
0.000e+00 0.000e+00 0.000e+00 2.800e+01]
[7.000e+00 1.000e+00 1.000e+00 1.000e+00 0.000e+00 0.000e+00 8.420e+02
0.000e+00 0.000e+00 0.000e+00 2.800e+01]]
[[ 8. 1. 1. 1. 0. 0. 908. 0. 0. 0. 28.]
[ 9. 1. 1. 1. 0. 0. 0. 0. 0. 0. 28.]
[ 10. 1. 1. 1. 0. 0. 75. 0. 0. 0. 28.]
[ 11. 1. 1. 1. 0. 0. 551. 0. 0. 0. 28.]
[ 12. 1. 1. 1. 0. 0. 519. 0. 0. 0. 28.]
[ 13. 1. 1. 1. 0. 0. 504. 0. 0. 0. 28.]
[ 14. 1. 1. 1. 0. 0. 617. 0. 0. 0. 28.]
[ 15. 1. 1. 1. 0. 0. 499. 0. 0. 0. 28.]
[ 0. 1. 1. 1. 0. 0. 388. 0. 0. 0. 28.]
[ 1. 1. 1. 1. 0. 0. 601. 0. 0. 0. 28.]]
[[ 2. 1. 1. 1. 0. 0. 554. 0. 0. 0. 28.]
[ 3. 1. 1. 1. 0. 0. 500. 0. 0. 0. 28.]
[ 4. 1. 1. 1. 0. 0. 639. 0. 0. 0. 28.]
[ 5. 1. 1. 1. 0. 0. 442. 0. 0. 0. 28.]
[ 6. 1. 1. 1. 0. 0. 462. 0. 0. 0. 28.]
[ 7. 1. 1. 1. 0. 0. 431. 0. 0. 0. 28.]
[ 8. 1. 1. 1. 0. 0. 470. 0. 0. 0. 28.]
[ 9. 1. 1. 1. 0. 0. 363. 0. 0. 0. 28.]
[ 10. 1. 1. 1. 0. 0. 630. 0. 0. 0. 28.]
[ 11. 1. 1. 1. 0. 238. 493. 0. 0. 0. 28.]]
[[ 12. 1. 1. 1. 0. 461. 428. 0. 0. 0. 29.]
[ 13. 1. 1. 1. 0. 583. 358. 0. 0. 0. 29.]
[ 14. 1. 1. 1. 0. 761. 262. 0. 0. 0. 29.]
[ 15. 1. 1. 1. 0. 797. 226. 0. 0. 0. 29.]
[ 0. 1. 1. 1. 0. 686. 199. 0. 0. 0. 29.]
[ 1. 1. 1. 1. 0. 800. 142. 0. 0. 0. 29.]
[ 2. 1. 1. 1. 0. 872. 175. 0. 0. 0. 29.]
[ 3. 1. 1. 1. 0. 872. 243. 0. 0. 0. 29.]
[ 4. 1. 1. 1. 0. 846. 248. 0. 0. 0. 29.]
[ 5. 1. 1. 1. 0. 792. 228. 0. 0. 0. 29.]]
The text was updated successfully, but these errors were encountered: