Skip to content

Commit

Permalink
Merge remote-tracking branch 'openbci/master'
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrey1994 committed Jan 14, 2020
2 parents 72af3a4 + 8f63d10 commit f465a2d
Show file tree
Hide file tree
Showing 9 changed files with 47 additions and 30 deletions.
17 changes: 17 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -339,3 +339,20 @@ installed*
compiled/
python/flowcat.egg-info/
.Rproj.user

java-package/brainflow/target
java-package/brainflow/.classpath
java-package/brainflow/.project
csharp-package/brainflow/brainflow/lib/brainflow_boards.json
csharp-package/brainflow/brainflow/libBoardController.dylib
csharp-package/brainflow/brainflow/libDataHandler.dylib
java-package/brainflow/.settings/org.eclipse.jdt.apt.core.prefs
java-package/brainflow/.settings/org.eclipse.jdt.core.prefs
java-package/brainflow/.settings/org.eclipse.m2e.core.prefs
java-package/brainflow/src/main/resources/brainflow_boards.json
java-package/brainflow/src/main/resources/libBoardController.dylib
java-package/brainflow/src/main/resources/libDataHandler.dylib
matlab-package/lib/brainflow_boards.json
python-package/brainflow/lib/brainflow_boards.json
python-package/brainflow/lib/libBoardController.dylib
python-package/brainflow/lib/libDataHandler.dylib
4 changes: 2 additions & 2 deletions docs/AskHelp.rst
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Ask Help
Contact Info, Feature Request, Report an Issue
-----------------------------------------------

- Preferred: create issues or feature requests in our `GitHub Page <https://github.com/Andrey1994/brainflow>`_ or in `OpenBCI Fork <https://github.com/OpenBCI/brainflow>`_
- **Preferred:** create issues or feature requests in our `GitHub Page <https://github.com/Andrey1994/brainflow>`_ or in `OpenBCI Fork <https://github.com/OpenBCI/brainflow>`_
- For questions about BrainFlow integration to other apps and frameworks use `Andrey\'s email <a1994ndrey@gmail.com>`_
- For hardware related questions and issues contact board manufacturer
- For issues with OpenBCI boards and BrainFlow feel free to use `OpenBCI Forum <https://openbci.com/forum/>`_
Expand All @@ -20,7 +20,7 @@ First of all you need to run your code with:
enable_dev_board_logger ()
After that make sure that:
After that, make sure:

- you've specified BrainFlow version and OS version
- you've attached all logs to your issue description
Expand Down
8 changes: 4 additions & 4 deletions docs/BrainFlowEmulator.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
BrainFlow Emulator
===================

BrainFlow Emulator allows you to run all integration tests for all supported boards without real hardware, our CI uses it for test automation, also you can run it on your own PC.
BrainFlow Emulator allows you to run all integration tests for all supported boards without real hardware. Our CI uses it for test automation. Also, you can run it on your own PC!

Streaming Board
-----------------
Expand All @@ -19,7 +19,7 @@ Run tests ::

python emulator\brainflow_emulator\streaming_board_emulator.py python tests\python\brainflow_get_data.py --log --board-id -2 --ip-address 225.1.1.1 --ip-port 6677 --other-info -1

This emulator uses synthetic board as a master board and ip address and port are hardcoded.
This emulator uses synthetic board as a master board and the IP address and port are hardcoded.

OpenBCI Cyton
--------------
Expand All @@ -29,7 +29,7 @@ Cyton emulator simulate COM port using:
- `com0com <http://com0com.sourceforge.net/>`_ for Windows
- pty for Linux and MacOS

You should pass test command line directly to cyton_linux.py or to cyton_windows.py, script will add port automatically to provided command line and will start an application.
You should pass test command line directly to cyton_linux.py or to cyton_windows.py. The script will add the port automatically to provided command line and will start an application.


Install emulator package::
Expand All @@ -46,7 +46,7 @@ Run tests for Linux\MacOS and Windows (port argument will be added by Emulator!)
OpenBCI NovaXR
---------------

NovaXR emulator creates socket server and streams data to BrainFlow like it's a real board but with much lower sampling rate.
NovaXR emulator creates socket server and streams data to BrainFlow like it's a real board, but with much lower sampling rate.

Install emulator package::

Expand Down
8 changes: 4 additions & 4 deletions docs/BuildBrainFlow.rst
Original file line number Diff line number Diff line change
Expand Up @@ -8,21 +8,21 @@ Python

.. compound::

You are able to install the latest release from PYPI ::
Please, make sure to use Python 3+. Next, install the latest release from PYPI with the following command in terminal ::

python -m pip install brainflow

.. compound::

If you want to install it from source files or build unreleased version from github you should compile core module first and run ::
If you want to install it from source files or build unreleased version from Github, you should compile core module first and run ::

cd python-package
python -m pip install -e .

C#
----

For C# only Windows is currently supported.
For C#, only Windows is currently supported.

You are able to install the latest release from `Nuget <https://www.nuget.org/packages/brainflow/>`_ or build it yourself:

Expand All @@ -43,7 +43,7 @@ Unity Integration
R
-----

R binding is based on `reticulate <https://rstudio.github.io/reticulate/>`_ package and calls python code, so you need to install Python binding first, make sure that reticulate uses correct virtual environment, after that you will be able to build R package from command line or using R Studio, install it and run samples.
R binding is based on `reticulate <https://rstudio.github.io/reticulate/>`_ package and calls Python code, so you need to install Python binding first, make sure that reticulate uses correct virtual environment, after that you will be able to build R package from command line or using R Studio, install it and run samples.

Java
-----
Expand Down
8 changes: 4 additions & 4 deletions docs/CoreModuleAPI.rst
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
BrainFlow Core API
===================

Core module of BrainFlow API is represented by two dynamic libraries:
The Core module of BrainFlow API is represented by two dynamic libraries:

* BoardController for data acquisition
* DataHandler for signal processing

These libraries are independent and you can use only one of them if you want to.
These libraries are independent and you can use one or both of them as you wish.

All possible exit codes and supported boards
----------------------------------------------
Expand All @@ -17,7 +17,7 @@ All possible exit codes and supported boards
BoardController Interface
---------------------------

This library reads data from a board and provides an API to request information about this board and data format. In User API these methods are available via BoardShim class.
This library reads data from a board and provides an API to request information about this board and data format. In the User API, these methods are available via BoardShim class.

Data acquisition methods are described below:

Expand All @@ -32,7 +32,7 @@ Board Description methods are described below:
DataHandler Interface
----------------------

This library performs signal processing. In User API these methods are available via DataFilter class.
This library performs signal processing. In the User API, these methods are available via DataFilter class.

.. literalinclude:: ../src/data_handler/inc/data_handler.h
:language: cpp
16 changes: 8 additions & 8 deletions docs/DataFormatDesc.rst
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ Generic Format Description
**Return 2d double array [num_channels x num_data_points], rows of this array represent different channels like EEG channels, EMG channels, Accel channels, Timesteps and so on, while columns in this array represent actual packages from a board.**

Exact format for this array is board specific but to keep API uniform we have methods like:
Exact format for this array is board specific. To keep the API uniform. we have methods like:

.. code-block:: python
Expand All @@ -32,40 +32,40 @@ Exact format for this array is board specific but to keep API uniform we have me
**For some boards like OpenBCI Cyton, OpenBCI Ganglion and others we can not separate EMG, EEG, EDA and ECG and in this case we return exactly the same array for all these methods but for some boards EMG and EEG channels differ**

Using methods above you can write completely board agnostic code and switch boards using single parameter! Even if you have only one board using these methods you can easily switch to Synthetic board for development and run code without real hardware.
Using the methods above, you can write completely board agnostic code and switch boards using a single parameter! Even if you have only one board using these methods you can easily switch to Synthetic board for development and run code without real hardware.

Special channels for Cyton Based boards
-----------------------------------------

`Cyton based boards from OpenBCI <https://docs.openbci.com/Tutorials/00-Tutorials>`_ suport different output formats which is described `here <https://docs.openbci.com/docs/02Cyton/CytonDataFormat#firmware-version-200-fall-2016-to-now-1>`_.
`Cyton based boards from OpenBCI <https://docs.openbci.com/docs/02Cyton/CytonLanding>`_ suport different output formats which is described `here <https://docs.openbci.com/docs/02Cyton/CytonDataFormat#firmware-version-200-fall-2016-to-now-1>`_.

**For Cyton based boards we add Cyton End byte to a first channel from:**
**For Cyton based boards, we add Cyton End byte to a first channel from:**

.. code-block:: python
get_other_channels (board_id)
**If Cyton End bytes is equal to 0xC0 we add accel data, to get rows which contain accel data use:**
**If Cyton End bytes is equal to 0xC0 we add accel data. To get rows which contain accel data use:**

.. code-block:: python
get_accel_channels (board_id)
**If Cyton End bytes is equal to 0xC1 we add analog data, to get rows which contain analog data use:**
**If Cyton End bytes is equal to 0xC1 we add analog data. To get rows which contain analog data use:**

.. code-block:: python
get_analog_channels (board_id)
For analog data we return int32 values but from low level API we return double array so these values are casted to double wo any changes.
For analog data, we return int32 values. From low level API, we return double array, so these values are cast to double without any changes.

**Also we add raw unprocessed bytes to the second and next channels returned by:**

.. code-block:: python
get_other_channels (board_id)
If Cyton End Byte is outside `this range <https://docs.openbci.com/docs/02Cyton/CytonDataFormat#firmware-version-200-fall-2016-to-now-1>`_ we drop entire package.
If Cyton End Byte is outside `this range <https://docs.openbci.com/docs/02Cyton/CytonDataFormat#firmware-version-200-fall-2016-to-now-1>`_, we drop the entire package.

**Check this example for details:**

Expand Down
6 changes: 3 additions & 3 deletions docs/Examples.rst
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@
Code Samples
============

Make sure that you've installed BrainFlow package before running code samples below.
Make sure that you've installed BrainFlow package before running the code samples below.

See :ref:`installation-label` for details.

Python
--------

**To run some signal processing samples you may need to install:**
**To run some signal processing samples, you may need to install:**

- matplotlib
- pandas
Expand Down Expand Up @@ -142,7 +142,7 @@ C# Denoising
C++
-----

**Make sure that compiled dynamic libraries exist in search path before running an executable, do one of:**
**Make sure that compiled dynamic libraries exist in search path before running an executable by doing one of the following:**

- for Linux and MacOS add them to LD_LIBRARY_PATH env variable
- for Windows add them to PATH env variable
Expand Down
6 changes: 3 additions & 3 deletions docs/SupportedBoards.rst
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ Cyton
:width: 312px
:height: 161px

`Cyton geting started guide from OpenBCI <https://docs.openbci.com/Tutorials/00-Tutorials>`_.
`Cyton geting started guide from OpenBCI <https://docs.openbci.com/docs/01GettingStarted/01-Boards/CytonGS>`_.

**To choose this board in BoardShim constructor please specify:**

Expand All @@ -122,7 +122,7 @@ Ganglion
:width: 400px
:height: 230px

`Ganglion geting started guide from OpenBCI <https://docs.openbci.com/Tutorials/00-Tutorials>`_.
`Ganglion geting started guide from OpenBCI <https://docs.openbci.com/docs/01GettingStarted/01-Boards/GanglionGS>`_.

**To use Ganglion board you need a** `dongle <https://shop.openbci.com/collections/frontpage/products/ganglion-dongle>`_.

Expand Down Expand Up @@ -152,7 +152,7 @@ Cyton Daisy
:width: 400px
:height: 394px

`Cyton Daisy geting started guide from OpenBCI <https://docs.openbci.com/Tutorials/00-Tutorials>`_.
`Cyton Daisy geting started guide from OpenBCI <https://docs.openbci.com/docs/01GettingStarted/01-Boards/DaisyGS>`_.

**To choose this board in BoardShim constructor please specify:**

Expand Down
4 changes: 2 additions & 2 deletions docs/UserAPI.rst
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ These classes are independent, so if you want, you can use BrainFlow API only fo
BrainFlow API is board agnostic, so **to select a specific board you need to pass BrainFlow's board id to BoardShim's constructor and an instance of BrainFlowInputParams structure** which should hold information for your specific board, check :ref:`supported-boards-label`. for details.
This abstraction allows you to switch boards without any changes in code.

In BoardShim all data from a board returned as a 2d array, rows in this array may contain timestamps, EEG and EMG data and so on, to see instructions how to query specific kind of data check :ref:`data-format-label` and :ref:`code-samples-label`.
In BoardShim, all board data is returned as a 2d array. Rows in this array may contain timestamps: EEG and EMG data and so on. To see instructions how to query specific kind of data check :ref:`data-format-label` and :ref:`code-samples-label`.

Python API Reference
----------------------
Expand Down Expand Up @@ -100,7 +100,7 @@ Content of brainflow namespace:
R API Reference
-----------------

R binding is a wrapper on top of Python binding, it is implemented using `reticulate <https://rstudio.github.io/reticulate/>`_.
R binding is a wrapper on top of Python binding. It is implemented using `reticulate <https://rstudio.github.io/reticulate/>`_.

Check R samples to see how to use it.

Expand Down

0 comments on commit f465a2d

Please sign in to comment.