ActiView example client raw data transformation

Post Reply
DorAmrani
Posts: 8
Joined: Tue May 25, 2021 3:41 pm

ActiView example client raw data transformation

Post 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.

Coen
Site Admin
Posts: 1124
Joined: Fri Mar 26, 2004 7:00 pm
Location: Amsterdam, Netherlands
Contact:

Re: ActiView example client raw data transformation

Post 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)

DorAmrani
Posts: 8
Joined: Tue May 25, 2021 3:41 pm

Re: ActiView example client raw data transformation

Post by DorAmrani »

Thank you very much!

Dor.

Post Reply