Page 1 of 1

Weird TCP readings.

Posted: Fri Nov 29, 2013 10:17 am
by dunguyen
Hi Coen and the rest of the BioSemi team.

I have been making some measurements using a plethysmograph (and later emg and gsr). I have been picking up the data with TCP, converted to 24-bit numbers and so on and everything looks fine except that sometimes the values are being subtracted by what looks like a certain number.
When I plot it it looks like this:
[attachment=2]figure_1.png[/attachment]
Which is very weird looking. If you notice the top it looks signal the signal that I'm interested in.
[attachment=1]figure_2.png[/attachment]
Which is very similar to what I saw in the actiview acqusition program.
If I remove all values below zero I get this:
[attachment=0]figure_3.png[/attachment]
Which is ultimately what I want, except that almost half of the values are removed.
What causes this? And how can I avoid it?

Re: Weird TCP readings.

Posted: Mon Dec 02, 2013 1:11 pm
by Coen
Treating two's complement numbers as unsigned ?

Best regards, Coen (BioSemi)

Re: Weird TCP readings.

Posted: Wed Dec 04, 2013 10:51 am
by dunguyen
Thanks that worked!
For anybody else wondering I used this solution: http://stackoverflow.com/a/3783679
The readings are correct now:
[attachment=0]fixed!.png[/attachment]