Python. How to modify the filtering?

Hi there, in comparison to the OpenBCI_GUI in Processing, the Python version does not allow to choose the filtering used by the board (Notch, BP) but only to activate it or not.
Does this mean that a new plugin would need to be written in order to do so? Is there already an example showing the way?
thanks

Comments

  • as far as I can see the written function to enable filters in python are only for 60Hz.




    def enable_filters(self): 
     """ Adds a filter at 60hz to cancel out ambient electrical noise.""" 
     self.the_serial.write(b'f') 
     self.filtering_data = True

    any tips for europeans ? ;)
  • wjcroftwjcroft Mount Shasta, CA
    Monks, hi.

    Most users of the raw data output from OpenBCI devices are doing their own signal processing, and applying various filters such as notch, but also bandpass (for example .5 to 40 Hz) to remove DC offset. So I would suggest you look at the DSP signal processing libraries for Python and construct your own desired filter chain.


    As far as I can tell in looking at the OpenBCI_Python source, the command line switch that supposedly controls notch filtering, is connected up to no code that I can see. It turns on some internal switches (only).


    Additionally the code that is in there, attempts to issue commands to the Cyton of 'f' and 'g' to turn on/off the filter, supposedly INSIDE Cyton. The Cyton has no such internal notch filtering mode, as you can see from the SDK,


    Let me know if you find any actual DSP code in the OpenBCI_Python repo.

    Regards,

    William

Sign In or Register to comment.