number of channels value for LSL network-widget to stream Band Power [resolved]

vannvann Cambodia
edited April 2020 in OpenBCI_GUI

My device is Ultracortex Mark IV kit. I want to stream Band Power from LSL networking. What is the value in #channel that I have to set it?

Comments

  • retiututretiutut Louisiana, USA
    edited April 2020

    Looking at this now, I'm not sure, and I think BandPower + LSL may be broken right now. We are currently working on the next major release of the OpenBCI GUI.

    } else if (this.protocol.equals("LSL")) {
    
                    float[] avgPowerLSL = new float[numChan*numBandPower];
                    for (int i=0; i<numChan;i++) {
                        for (int j=0;j<numBandPower;j++) {
                            dataToSend[j+numBandPower*i] = dataProcessing.avgPowerInBins[i][j];
                        }
                    }
                    // Add timestamp to LSL Stream
                    outlet_data.push_chunk(dataToSend, System.currentTimeMillis());
    

    avgPowerLSL is declared but not even used! Thank you for bringing this to our attention.

  • retiututretiutut Louisiana, USA
    edited April 2020

    To answer your original question:

    • I tried both 8 (when using 8 channel synthetic mode)
    • and I tried 5 (number of power bands)
    • Got weird results both times using the Networking Test Kit that's in the GUI repository

    I am going to link to this thread on an existing issue to remove the confusing "# Chan" textbox.

    https://github.com/OpenBCI/OpenBCI_GUI/issues/644

    Again, thank you for noticing this, and I have upgraded the priority of this to high-priority for GUI v5.

  • retiututretiutut Louisiana, USA
    edited April 2020

    The answer is 5.

    Looking yet again at the output from the Networking Test Kit:

    [[0.594548761844635, 2.158696174621582, 2.4985361099243164, 2.541076183319092, 2.3395707607269287], [0.3957584798336029, 1.20045006275177, 1.5954006910324097, 2.426534652709961, 1.9610735177993774], [0.6398046612739563, 1.4542295932769775, 2.600311756134033, 2.315763473510742, 1.0340502262115479], [0.7538342475891113, 2.292661666870117, 5.157269477844238, 2.372204303741455, 1.2841973304748535], [0.1286601722240448, 0.3700842261314392, 2.6763808727264404, 1.8476436138153076, 1.1666150093078613], [0.31063926219940186, 0.9246240854263306, 3.560356378555298, 2.744607448577881, 1.5550593137741089], [0.2162628024816513, 0.865609347820282, 9.070088386535645, 3.5265231132507324, 1.7065619230270386], [0.3282938599586487, 0.7916330099105835, 8.12212085723877, 4.3278608322143555, 2.2962303161621094], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0], [0.0, 0.0, 0.0, 0.0, 0.0]]
    

    This is the output from:

    It sends out 5 band power values per channel, but for some reason tries to send out 16 channels worth of data even though we are using 8 channels in the example.

    Removing the line

    float[] avgPowerLSL = new float[numChan*numBandPower];
    
  • vannvann Cambodia

    I have set it to 5. Everything seems to work for my case. Thank you for your support.

Sign In or Register to comment.