Page 1 of 1

ActiView example client raw data transformation

Posted: Sat Jul 24, 2021 5:59 pm
by DorAmrani
Hello, I am wondering about the example of the ActiView client in the Biosemi site where the data is first transormed like so:

Code: Select all

 normaldata = rawData(3,:)*(256^3) + rawData(2,:)*(256^2) + rawData(1,:)*256 + 0; 
256 is for the number of channels. To my understanding the powering of 256 is because the data is coming as words(= 3 bytes) according to the documentation, for reference this is said documentation

Code: Select all

 %input buffersize is 3 times the tcp block size %1 word = 3 bytes 
in the code but I still am not grasping why.
I would really appreciate an explanation, even a very general one.
Best regards, Dor.

Re: ActiView example client raw data transformation

Posted: Mon Jul 26, 2021 2:02 pm
by Coen
Each sample is a 24-bit word from the Analog-to Digital converter. Each 24-bit sample is sent as 3 bytes.

TCP blocksize is in samples
Buffersize is in bytes

Best regards, Coen (BioSemi)

Re: ActiView example client raw data transformation

Posted: Sun Aug 01, 2021 10:18 am
by DorAmrani
Thank you very much!

Dor.