Skip to content

add method to rereference channels #619

Open

Activity

  1. IbrahimBagalwa commented on Mar 29, 2023

    @IbrahimBagalwa

    https://pressrelease.brainproducts.com/referencing/

    Hello @Andrey1994 , I would like to kindly request for further explanation regarding the issue at hand. I am interested in working on this matter and would greatly appreciate it if you could provide more details. Thank you very much for your time and consideration.

  2. Andrey1994 commented on Mar 29, 2023

    @Andrey1994
    MemberAuthor

    Hi and thanks for willing to implement it!

    I think method signature should look like this: void reference(BrainFlowArray<double, 2> data, std::vector<int> channels_to_reference, std::vector<int> reference_channels)

    That should be done for all supported languages.

    In terms of implementation first of all you need to average data from reference_channels and after that subtract the averaged data from channels_to_reference

    In BrainFlow in general we implement everything in C\C++ and call methods from dyn libs from other languages, but here since implementation is very simple(just average multiple arrays and subtract) and since it requires 2d arrays I think it's ok to just implement it for each language

  3. kkashiva commented on May 15, 2023

    @kkashiva

    Hi @Andrey1994, I'm trying to implement this and was reading your comment. The reference method signature and the implementation logic seem helpful.

    When you say

    That should be done for all supported languages.

    As an example for java_package, do we need to add a helper method to the DataFilter.java? (brainflow/java_package/brainflow/src/main/java/brainflow/DataFilter.java)

    Or the reference method needs to be added to a separate/different file?

  4. Andrey1994 commented on May 16, 2023

    @Andrey1994
    MemberAuthor

    Hi and thanks for working on it!

    It should be a static method of DataFilter class for all languages

  5. kkashiva commented on May 27, 2023

    @kkashiva

    Hi @Andrey1994 The reference method implementation in DataFilter class is ready for review for the java_package in this draft PR #630
    I'll work on similar logic to implement this in other languages (Java is my strongest, so I started there).

    I just have 1 doubt on where will this method be called from?

  6. ShakeelAhmed-NeuroAI commented on Nov 18, 2026

    @ShakeelAhmed-NeuroAI

    "Hi, I would like to implement this EEG channel re-referencing method. Is this still open for contribution?"

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions