You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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.
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
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?
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?
Activity
IbrahimBagalwa commentedon Mar 29, 2023
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.
Andrey1994 commentedon Mar 29, 2023
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
kkashiva commentedon May 15, 2023
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
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?
Andrey1994 commentedon May 16, 2023
Hi and thanks for working on it!
It should be a static method of DataFilter class for all languages
kkashiva commentedon May 27, 2023
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?
Implement rereference_channels in DataHandler and bindings
ShakeelAhmed-NeuroAI commentedon Nov 18, 2026
"Hi, I would like to implement this EEG channel re-referencing method. Is this still open for contribution?"