Channel duplication problem with Rhd2000EvalBoard

98 views
Skip to first unread message

Wei Guo

unread,
Apr 25, 2018, 5:42:09 PM4/25/18
to Bonsai Users

Hi Gonçalo,


First of all thank you for writing Bonsai. I really enjoy using it. Please keep up the good work!

I recently ran into a problem using Bonsai to record Ephys data with an OpenEphys acquisition board. The neural signals came out of a 64 channel tetrode array and were amplified with an RHD2164 64-channel amplifier/accelerometer board (http://intantech.com/RHD2164_amp_board.html) and fed into the acquisition board with a single SPI cable. I used the following example Bonsai Ephys workflow to record raw binary neural signals at 30000 Hz sampling rate and wrote it into a file with MatrixWriter:


I used the following Matlab code to load the data from the file:


datafile = fopen('.\test0.neu');

rawdata = fread(datafile,'uint16');

fclose(datafile);

chanData = reshape(rawdata,64,size(rawdata,1)/64);


The size of the matrices matched the length of the recording.

However, when I plot the waveform, I found that channels 1~32 and 33~64 were exact duplicates.

For example, this is channel 1 and 33 (I added a little offset between them). They are exactly the same.

While channel 1 vesus 2 (or any other channel between 2 and 32) show clear differences:

Furthermore, If I don't break the data down into 64 channels and simply plot the raw binary trace, it looks like that it's going through cylces of 32 samples, rather than 64 sample. And the neighboring two cycles' values are duplicated.

I can record normal data (64 different channels) using the OpenEphys GUI. So I was wondering what I've done wrong in Bonsai. I'm running Bonsai 2.3.1. And my OpenEphys bit file (rhd2000_usb3.bit) is up to date.



Thank you in advance!


Best regard,

Wei



Gonçalo Lopes

unread,
Apr 25, 2018, 5:54:23 PM4/25/18
to Wei Guo, Bonsai Users
Hi Wei and welcome to the forums!

What happens when you plot the data in real-time using Bonsai? Do you also observe such duplicated channels? You can use the visualizer to help you confirm this: if you open the visualizer of AmplifierData node, then right-click on top of the traces, you can find at the bottom an icon in the shape of a grid. If you click on it, you can see the individual channels. Furthermore, if you click on top of individual channel numbers, you can select the channels that you want to view when you go back to the "mixed" view. In this case, you can pick channel 0 and 32 for example.

This is a surprising issue, since we routinely record from Bonsai using both OpenEphys and Intan with up to 128 channels with a single SPI cable. However, since you are using the USB 3.0 interface, there are some differences to the USB 2.0 code. We did try it with a variety of different headstages, but it's the only difference I can see. It would be nice to confirm whether this is happening in real-time.


--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.
Visit this group at https://groups.google.com/group/bonsai-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/a87120f7-d0e3-4710-be4d-4b9577ade6ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Wei Guo

unread,
Apr 25, 2018, 6:05:32 PM4/25/18
to Bonsai Users
Hi Gonçalo,

Thanks for the quick reply.

I tried it in Bonsai GUI and saw the same problem.
This is the live stream of channels 1 and 2:


And this is channels 1 and 33:



Best,
Wei
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.

goncal...@gmail.com

unread,
Apr 25, 2018, 6:19:04 PM4/25/18
to Wei Guo, Bonsai Users

Hmmm, that is strange indeed. Have you tried using the USB 3.0 bitfile that is included in the Bonsai Ephys example (Tools > Bonsai Gallery > Bonsai – Ephys Example)?

 

That is the one used for validation of USB 3 support and I’m almost certain I tried it with our 64-channel headstages… Otherwise I'll try to reproduce it over here.

 

 

From: Wei Guo
Sent: 25 April 2018 23:05
To: Bonsai Users
Subject: Re: [bonsai-users] Channel duplication problem with Rhd2000EvalBoard

 

Hi Gonçalo,

 

Thanks for the quick reply.

 

I tried it in Bonsai GUI and saw the same problem.

This is the live stream of channels 1 and 2:

https://lh3.googleusercontent.com/-Ib7ero1Jzco/WuD7Z2bL0VI/AAAAAAAADZY/51i_q7DIDi0rP-NhuNzXBe-zfcxWlem_gCLcBGAs/s400/BonsaiData4.png

 

And this is channels 1 and 33:

https://lh3.googleusercontent.com/-NK0dn6AO86E/WuD7dNX95GI/AAAAAAAADZc/PVYHA2mfWUMR7UybwqNxLBNxBMs8FkOZQCLcBGAs/s320/BonsaiData5.png

 

 

Best,

Wei

On Wednesday, April 25, 2018 at 5:54:23 PM UTC-4, goncaloclopes wrote:

Hi Wei and welcome to the forums!

What happens when you plot the data in real-time using Bonsai? Do you also observe such duplicated channels? You can use the visualizer to help you confirm this: if you open the visualizer of AmplifierData node, then right-click on top of the traces, you can find at the bottom an icon in the shape of a grid. If you click on it, you can see the individual channels. Furthermore, if you click on top of individual channel numbers, you can select the channels that you want to view when you go back to the "mixed" view. In this case, you can pick channel 0 and 32 for example.

This is a surprising issue, since we routinely record from Bonsai using both OpenEphys and Intan with up to 128 channels with a single SPI cable. However, since you are using the USB 3.0 interface, there are some differences to the USB 2.0 code. We did try it with a variety of different headstages, but it's the only difference I can see. It would be nice to confirm whether this is happening in real-time.

On 25 April 2018 at 22:42, Wei Guo <victor....@gmail.com> wrote:

Hi Gonçalo,

 

First of all thank you for writing Bonsai. I really enjoy using it. Please keep up the good work!

 

I recently ran into a problem using Bonsai to record Ephys data with an OpenEphys acquisition board. The neural signals came out of a 64 channel tetrode array and were amplified with an RHD2164 64-channel amplifier/accelerometer board (http://intantech.com/RHD2164_amp_board.html) and fed into the acquisition board with a single SPI cable. I used the following example Bonsai Ephys workflow to record raw binary neural signals at 30000 Hz sampling rate and wrote it into a file with MatrixWriter:

 

https://lh3.googleusercontent.com/-iPMe3VdGx6A/WuDwgW8ga-I/AAAAAAAADYs/qsKcd7t213QgfCKWQE6qV6cEBDusSBnSwCLcBGAs/s1600/BonsaiEphys.png

 

I used the following Matlab code to load the data from the file:

 

datafile = fopen('.\test0.neu');

rawdata = fread(datafile,'uint16');

fclose(datafile);

chanData = reshape(rawdata,64,size(rawdata,1)/64);

 

The size of the matrices matched the length of the recording.

However, when I plot the waveform, I found that channels 1~32 and 33~64 were exact duplicates.

For example, this is channel 1 and 33 (I added a little offset between them). They are exactly the same.

https://lh3.googleusercontent.com/-l3DI-w3q2W8/WuDy09C0nmI/AAAAAAAADY4/0AdoxkZE2G0EmJm_X7LBuLz4U96M0sSzQCLcBGAs/s1600/BonsaiData1.png

While channel 1 vesus 2 (or any other channel between 2 and 32) show clear differences:

https://lh3.googleusercontent.com/-r4cuTKnUyRw/WuDzTPWKT7I/AAAAAAAADZA/IFgkmzFywg4lfMqdrloLQY5IX6evUbnGgCLcBGAs/s1600/BonsaiData2.png

Furthermore, If I don't break the data down into 64 channels and simply plot the raw binary trace, it looks like that it's going through cylces of 32 samples, rather than 64 sample. And the neighboring two cycles' values are duplicated.

https://lh3.googleusercontent.com/-KibL1PS4z5Y/WuDzwzPqunI/AAAAAAAADZI/7HK5Of-NgzMsc-Kg4f9uXAMD98K-k_XcQCLcBGAs/s1600/BonsaiData3.png

I can record normal data (64 different channels) using the OpenEphys GUI. So I was wondering what I've done wrong in Bonsai. I'm running Bonsai 2.3.1. And my OpenEphys bit file (rhd2000_usb3.bit) is up to date.

 

 

Thank you in advance!

 

Best regard,

Wei

 

 

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/bonsai-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/bonsai-users/a87120f7-d0e3-4710-be4d-4b9577ade6ff%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Bonsai Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users...@googlegroups.com.
Visit this group at https://groups.google.com/group/bonsai-users.

Wei Guo

unread,
Apr 25, 2018, 6:22:16 PM4/25/18
to Bonsai Users
Yes I started with that bit file and it had this problem. So I tried the bit file on the OpenEphys github, still got the same problem.

Wei Guo

unread,
Apr 27, 2018, 7:47:19 PM4/27/18
to Bonsai Users

Hi Gonçalo,


We've tried an acquisition board with a USB 2.0 version of the OpalKelly FPGA (using the USB 2 bit file in Bonsai), and the channel duplication issue was gone. The raw binary data file was clearly going through cycles of 64 samples.


Best regards,
Wei


On Wednesday, April 25, 2018 at 6:19:04 PM UTC-4, goncaloclopes wrote:

Gonçalo Lopes

unread,
Apr 27, 2018, 8:50:53 PM4/27/18
to Wei Guo, Bonsai Users
Hi Wei,

Thanks for the update. This does seem to be an issue related to USB 3.0 support. Unfortunately I don't have any USB 3.0 OpenEphys board with me, so I cannot debug this issue further. I have contacted the hardware team that manufactures the OE boards to see if they can help reproducing the issue so we can try some fixes.

I will let you know how that goes. I am sorry I cannot be of more help at the moment, but this will be a really tough nut to crack without having direct access to the hardware.

To unsubscribe from this group and stop receiving emails from it, send an email to bonsai-users+unsubscribe@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages