filtering and phase shift?

fanfanfdxfanfanfdx LiaoNing
edited April 3 in Software

After reviewing the C # code, how do you understand the phase shift caused by bandpass filtering in the code?

DataFilter.perform_bandpass (unprocessed_data, eeg_channels[i], BoardShim.get_sampling_rate (board_id), 4.0, 30.0, 4, (int)FilterTypes.BUTTERWORTH, 0.0);

Comments

  • retiututretiutut Louisiana, USA

    Please ask this question in BrainFlow Slack.

  • fanfanfdxfanfanfdx LiaoNing

    After reviewing the C # code, how do you understand the phase shift caused by bandpass filtering in the code?

    DataFilter.perform_bandpass (unprocessed_data, eeg_channels[i], BoardShim.get_sampling_rate (board_id), 4.0, 30.0, 4, (int)FilterTypes.BUTTERWORTH, 0.0);

  • wjcroftwjcroft Mount Shasta, CA

    Hi @fanfanfdx,

    I merged your new thread on phase shift into your previous thread. Did you see Richard's April 3rd comment (above) to post the question in the Brainflow Slack? You sign up for it via the home page:

    https://brainflow.org/

    See the Community / Slack button about halfway down the page.

    All DSP digital filters introduce some amount of phase shift. If you are applying similar filter parameters to each channel you are using, then ALL channels will shift the same amount. Thus you can compare across channels for metric such as coherence or synchrony with no problem.

    There are also quite a few web search results that you can explore:

    https://www.google.com/search?q=dsp+filter+phase+shift

    William

Sign In or Register to comment.