Common average referencing

619 views
Skip to first unread message

Vincent Prevosto

unread,
Jan 9, 2016, 1:23:50 AM1/9/16
to Open Ephys
Hi,
The wiki is lacking reference page for the Common Avg Ref module (common average referencing - CAR).
I had never used this module, until recently when I tested it to see if it would fix some intermittent movement noise. I couldn't see any change in the signal, even though the artifacts were propagated across all channels.
I played with selecting all channels, or only a few in the CAR module's Param tab. I also played with its gain. I checked the code, but things look pretty straightforward.
Not sure why it didn't seem to make any difference. Considering the major limitation of Intan-based headstages, namely the dedicated reference channel that cannot be modified for a given implant, I thought the CAR module would be greatly effective to address common noise issues.
Couple of questions:
- where is this module best located in the chain? Right after the rythm FPGA? Or after a Bandpass filter?
- can its parameters be changed on the fly (ie, while playing)? (I don't see why they could not, but just checking)
More generally, does anyone have feedback related to using this module?
Thanks,
Vincent

Kyler Brown

unread,
Jan 17, 2016, 2:11:45 PM1/17/16
to Open Ephys
Hi Vincent,

I've been using the CAR module and it seems to work as far as I can tell. If the input is two channels, the two output channels look identical when the gain is set to 100% (which makes sense to me). The gain can be changed on the fly. I use it for realtime visualization only. I haven't compared the output to something computed off-line.
The chain I use:
RHD2000 -> bandpass -> CAR -> LFP viewer

I have found that raising the RHD2000 highpass filter frequency reduces movement artifact as well.

Best,
Kyler
grad student
Margoliash Lab

Vincent Prevosto

unread,
Feb 17, 2016, 7:51:31 PM2/17/16
to Open Ephys
Thanks Kyler for your reply, and sorry for the delay in mine.
I'm not sure that I follow you, though. To me, your two output channels should not look the same. The purpose of common average referencing is to only substract the common signal average. If the signals are completely different at the input, they should stay so at the output.

In my case, I even see detrimental effects when using CAR, as shown below (top image, 0% gain, bottom image, 100% gain, with CAR over the first 16 channels).
 


Auto Generated Inline Image 1
Auto Generated Inline Image 2

Kyler Brown

unread,
Feb 17, 2016, 8:13:20 PM2/17/16
to Vincent Prevosto, Open Ephys
Hi Vincent,
I forgot to mention, use a channel map to select only the channels you want to use for CAR. Documentation here: https://open-ephys.atlassian.net/wiki/display/OEW/Channel+Map

It's not so obvious from the GUI but I'm pretty sure you can't use the CAR parameters to remove channels from the calculated channels, you can only select the degree to which the mean is removed from a selected channel. Perhaps someone more familiar can chime in?

From your image, I'm guessing at least one of the other channels (17+) has a lot of line noise and is contaminating the average.

Regarding the difference of two channels: my logic is that A - (A+B)/2 = A/2 - B/2, and B - (A+B)/2 = B/2 - A/2 = -1*(A/2 - B/2), so I suppose they are identical but inverted.

Good luck!
Kyler

--
You received this message because you are subscribed to a topic in the Google Groups "Open Ephys" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/open-ephys/5GSL1u49y5c/unsubscribe.
To unsubscribe from this group and all its topics, send an email to open-ephys+...@googlegroups.com.
To post to this group, send email to open-...@googlegroups.com.
Visit this group at https://groups.google.com/group/open-ephys.
To view this discussion on the web visit https://groups.google.com/d/msgid/open-ephys/941bb416-fb74-47df-8989-96e32b55685b%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Arne Meyer

unread,
Feb 18, 2016, 1:43:46 PM2/18/16
to Open Ephys, prevo...@gmail.com
Hi Vincent,

Looks like you have some floating channel that dominates the CAR. Do you have any input ADC channels activated without input load? You might also want to try a virtual reference plugin for the new plugin-GUI that uses a full reference matrix (requires compiling from source):
https://github.com/arnefmeyer/open-ephys_plugins/tree/master/ChannelRef

Let me know if you need any help with that.

Arne

Vincent Prevosto

unread,
Feb 18, 2016, 4:01:33 PM2/18/16
to Open Ephys, prevo...@gmail.com
Kyler, Arne,
thanks for your feedback. You're both right, in this particular setting I had floating channels, but I didn't care about those as I thought the CAR module would only take as source the channels selected in its PARAM tab. My bad. Removing floating channels with the channel map indeed drastically changed the CAR output. Hence the need for proper documentation on this module! :)
The question now is, does the CAR channel selection in PARAM play any role at all? As far as I can see, only the Gain control is doing anything.
Arne, I'll take a look at the virtual reference plugin.
Thanks,
Vincent

Arne Meyer

unread,
Feb 24, 2016, 10:38:40 AM2/24/16
to Open Ephys, prevo...@gmail.com
Hi Vincent,

The CAR PARAM selection should certainly do something useful. Why don't you go ahead and file an issue on github (and ideally also add 1-2 sentence to the wiki)?

Arne

Vincent Prevosto

unread,
Feb 24, 2016, 3:04:57 PM2/24/16
to Open Ephys, prevo...@gmail.com
Sure! Done.
Reply all
Reply to author
Forward
0 new messages