lsl_archived icon indicating copy to clipboard operation
lsl_archived copied to clipboard

ReceiveData examples are unable to pick up on EEG stream from actiChamp

Open neelsomani opened this issue 8 years ago • 6 comments

I’m trying to get the BrainProducts actiChamp working with LSL. I’m hoping to display the stream of data. I’m working on a 64-bit Windows machine.

The Python script “ReceiveData.py” prints “looking for an EEG stream…” and then doesn’t output anything else. The Matlab script ReceiveData.m prints: “Loading the library... Resolving an EEG stream... Opening an inlet... Now receiving data…”

This makes me think that the scripts aren’t able to pick up on the EEG stream. Here are the steps that I’ve taken.

  1. I downloaded the binary release for “Actichamp” from the SCCN FTP site: ftp://sccn.ucsd.edu/pub/software/LSL/

  2. I downloaded BCILAB-1.1.

  3. I clone the labstreaminglayer Github repo to my Desktop. I run the “get_deps.py” script. Then I run the “premangle_boost.py” script.

  4. In the libsls-Python directory, I run the “setup.py” script. For Matlab, I add the liblsl-Matlab directory to my path recursively. I also add the BCILAB folder recursively.

  5. I run the Actichamp LSL executable. I checked the “Use AUX Channels” checkbox and added eight channel labels. Then I clicked “Link.” I’ve confirmed that the Device Number is correct, and the computer is capable of receiving data from the Actichamp (I have another piece of software that is able to receive the channel data).

  6. When I run the ReceiveData examples, I get the problems listed above.

What am I missing? Are there any steps that I should take to troubleshoot?

neelsomani avatar Sep 19 '16 18:09 neelsomani

Here is a super simple Python script to look at what streams are on the network and, for a particular stream with name assigned to the myStreamName variable, print how many samples are in the latest chunk of data.

import time, pylsl
contResolver = pylsl.ContinuousResolver()
inlet = None
myStreamName = 'ActiChamp-'
while True:
    streams = contResolver.results()
    stream_names = [si.name() for si in streams]
    print(stream_names)
    if myStreamName in stream_names and inlet is None:
        stream_index = stream_names.index(myStreamName)
        stream = streams[stream_index]
        inlet = pylsl.StreamInlet(stream)
    if inlet is not None:
        data, sampletimes  = inlet.pull_chunk()
        if len(sampletimes) > 0:
            print(len(data[0]), len(sampletimes))
    time.sleep(0.5)

Modify the myStreamName to match whatever stream name is associated with ActiChamp. You can run the script once to find the stream name, then edit the script with the correct name, then run it again to make sure data are coming through.

cboulay avatar Sep 19 '16 19:09 cboulay

Hi, thanks for the quick response. The beginning of that script worked; after turning on LSL, the script displayed the streams' names. I set the stream name to "ActiChamp-0" and inlet was not None (I checked with a print statement). But the data/sampletimes returned by inlet.pull_chunk() were still empty.

What should I try next?

neelsomani avatar Sep 19 '16 19:09 neelsomani

OK that means that the ActiChamp application is running but it is not sending any data. In this scenario, the results of your Matlab test is perfectly expected.

I don't have an ActiChamp device to test and I didn't have anything to do with writing its application. Sorry I can't be of any more assistance.

cboulay avatar Sep 19 '16 19:09 cboulay

By the way, this is unrelated to your problem with picking up the stream, but the current binary release of the ActiChamp app on our ftp has a bug related to the resampling routine that makes the output data totally wrong. This bug has been corrected, but I haven't posted the latest release since no one has tested this very thoroughly, as far as I know. I will upload the latest release today.

Also, have you tried using PyCorder (Brain Products' data streaming pipeline) to stream EEG data from ActiChamp via LSL? I know this works well for other people.

On 9/19/2016 11:48 AM, Neel Somani wrote:

I’m trying to get the BrainProducts actiChamp working with LSL. I’m hoping to display the stream of data. I’m working on a 64-bit Windows machine.

The Python script “ReceiveData.py” prints “looking for an EEG stream…” and then doesn’t output anything else. The Matlab script ReceiveData.m prints: “Loading the library... Resolving an EEG stream... Opening an inlet... Now receiving data…”

This makes me think that the scripts aren’t able to pick up on the EEG stream. Here are the steps that I’ve taken.

  1. I downloaded the binary release for “Actichamp” from the SCCN FTP site: ftp://sccn.ucsd.edu/pub/software/LSL/

  2. I downloaded BCILAB-1.1.

  3. I clone the labstreaminglayer Github repo to my Desktop. I run the “get_deps.py” script. Then I run the “premangle_boost.py” script.

  4. In the libsls-Python directory, I run the “setup.py” script. For Matlab, I add the liblsl-Matlab directory to my path recursively. I also add the BCILAB folder recursively.

  5. I run the Actichamp LSL executable. I checked the “Use AUX Channels” checkbox and added eight channel labels. Then I clicked “Link.” I’ve confirmed that the Device Number is correct, and the computer is capable of receiving data from the Actichamp (I have another piece of software that is able to receive the channel data).

  6. When I run the ReceiveData examples, I get the problems listed above.

What am I missing? Are there any steps that I should take to troubleshoot?

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sccn/labstreaminglayer/issues/140, or mute the thread https://github.com/notifications/unsubscribe-auth/ADch7vHc4JSXhy3FdoEYg_AO05k5zni6ks5qrtkbgaJpZM4KA1Tb.

dmedine avatar Sep 19 '16 19:09 dmedine

Ok, latest and greatest actichamp app is here: ftp://sccn.ucsd.edu/pub/software/LSL/Apps/Brain%20Products%20ActiChamp%201.10.3.zip

On 9/19/2016 12:40 PM, Chadwick Boulay wrote:

OK that means that the ActiChamp application is running but it is not sending any data. In this scenario, the results of your Matlab test is perfectly expected.

I don't have an ActiChamp device to test and I didn't have anything to do with writing its application. Sorry I can't be of any more assistance.

— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub https://github.com/sccn/labstreaminglayer/issues/140#issuecomment-248100476, or mute the thread https://github.com/notifications/unsubscribe-auth/ADch7qKWUyvHH6iIiLx79r_eFQagehn6ks5qruVFgaJpZM4KA1Tb.

dmedine avatar Sep 19 '16 19:09 dmedine

We recently tried the new version (1.10.3) and we're getting a consistent wave thats just alternating between -10 and +10. I've tried different sampling rates and settings, but I'm just getting this consistent wave (looks like 60hz). FWIW, this is the same system that Neel has been working on.

ActiChamp Connector seems to be "Linked" and when I try the Matlab LSL example scripts, I get data that just seems to be an oscillating signal. These Matlab scripts don't run if the Connector isn't linked. Any advice would be amazing!

sanchezdanj avatar Dec 01 '16 20:12 sanchezdanj