differences between raw CSV data and BDF format data ?

This discussion was created from comments split from: large millivolt data values / FbEEG Full Band EEG.

Comments

  • hikinghiking CHINAc
    edited June 2022

    re: differences between raw CSV data and BDF format data ?

    Hello, I am currently encountering a problem similar to the example,

    https://openbci.com/forum/index.php?p=/discussion/201/large-millivolt-data-values-fbeeg-full-band-eeg

    but since the data I often use is data in .bdf format, I tried to band-pass filter the data according to the method you described to remove the DC bias.

    However, since my current work uses the LSL toolkit to receive data in real time, I found that the unfiltered data received in real time is the same as the .txt text data, but not the same as the data in .bdf format, so My core question is: Is there any difference between .txt text data (RAWDATA) and .bdf format data, such as whether there is a fixed conversion formula between the two that can make the two the same in magnitude, this problem bothers me It's been a long time, I hope I can get an answer, thank you very much!

  • wjcroftwjcroft Mount Shasta, CA

    @hiking, hi.

    I split your question into this new thread. I believe this BDF / raw question has been asked in several past threads. For the moment I'm getting the following using the "Google Advanced Search" button in the upper right column,

    https://www.google.com/search?as_q=bdf+raw&as_sitesearch=openbci.com

    Which turns up at least one thread where Richard @retiutut states that the BDF file is indeed the same as the raw data in the CSV txt file:

    https://openbci.com/forum/index.php?p=/discussion/2345/bdf-problem

    If Richard could verify that, it would be helpful.

    William

  • hikinghiking CHINAc
    edited June 2022

    Hello, so now according to the information I found, the .bdf and .txt files are the raw data collected, if I want to convert it into the GUI shown above, what I need to do is to filter the data appropriately, but the filter After that I found out that the collected amplitudes are still different from the GUI, I think maybe it's not a problem with the filter, is it because I didn't multiply the original data by 0.02235, but if I multiplied the scale factor, the amplitude of the data would be smaller , so I want to know how the original data is displayed in the GUI, and if there are other operations besides filtering, I hope to be able to get help, thank you very much!

  • wjcroftwjcroft Mount Shasta, CA

    The CSV text file and BDF file are ALREADY in microvolts. No need for any further conversion.

    DSP signal processing filters differ slightly in their implementations. So the filtering applied by the GUI display screens (done with Brainflow function calls) may produce results slightly different that what you see with another DSP package. That is fine. Also note that bandpass and high pass filters have a "filter order" argument, that may also influence the sharpness of the band cutoff points.

    William

  • retiututretiutut Louisiana, USA

    BDF, CSV, and BrainFlow file outputs are all the same data and always saves raw, unfiltered data to file. This allows users to apply different filters as desired.

  • hikinghiking CHINAc

    @wjcroft said:
    The CSV text file and BDF file are ALREADY in microvolts. No need for any further conversion.

    DSP signal processing filters differ slightly in their implementations. So the filtering applied by the GUI display screens (done with Brainflow function calls) may produce results slightly different that what you see with another DSP package. That is fine. Also note that bandpass and high pass filters have a "filter order" argument, that may also influence the sharpness of the band cutoff points.

    William

    Hello, thank you very much for your answer, but I always have a problem that I can't understand: I use eeglab to import .bdf files and .csv files. After applying the same filtering to the two data, the data amplitude range of .bdf is as shown in Like a picture, and the data amplitude range after importing the .csv file is also filtered like the second picture, I don’t know why the two data are not on the same order of magnitude if they are all original data, resulting in such a difference in scaling. Great, I hope you can help me answer this question, thank you very much!

  • wjcroftwjcroft Mount Shasta, CA

    Your second image shows TONS of mains noise. Did you apply the notch filter, as the GUI does? The CSV file has NO filters. So you need to apply BOTH a bandpass and a notch. Typically .5 to 45 Hz and whatever your local mains frequency is.

  • hikinghiking CHINAc

    @wjcroft said:
    Your second image shows TONS of mains noise. Did you apply the notch filter, as the GUI does? The CSV file has NO filters. So you need to apply BOTH a bandpass and a notch. Typically .5 to 45 Hz and whatever your local mains frequency is.

    This is the normal data behind the .csv, and the picture just now may be due to the noise at the beginning. Whichever file it is, I'm not using a notch filter because my bandpass filter is 0.3-45.

  • wjcroftwjcroft Mount Shasta, CA

    "I'm not using a notch filter because my bandpass filter is 0.3-45."

    But is not your mains at 50 Hz?? You STILL need the notch.

  • hikinghiking CHINAc

    @wjcroft said:
    "I'm not using a notch filter because my bandpass filter is 0.3-45."

    But is not your mains at 50 Hz?? You STILL need the notch.

    That is, do a notch filter even though my bandpass filter range doesn't include 50hz? I'm so sorry, I'm new to this so this question seems a bit silly. In addition to that, if it is the reason for not using a notch filter, both data are not used, but the amplitude ranges are different. So I might need to try adding a notch filter to see the effect.

  • wjcroftwjcroft Mount Shasta, CA
    edited June 2022

    Bandpass filters are not that sharp, and depend on the 'filter order' of the filter. Your images show strong mains effects.

  • hikinghiking CHINAc

    @wjcroft said:
    Bandpass filters are not that sharp, and depend on the 'filter order' of the filter. Your images show strong mains effects.

    Sadly, I used a notch filter for both the .csv data and the .bdf data, the order of the bandpass filter is also the same, but the amplitude range of the two is still very different, I am wondering if the bdf data Low raw data is scaled, or bdf needs to have some other considerations when importing into eeglab.

Sign In or Register to comment.