Installation & Usage¶
Here we describe how to install the necessary Python dependencies and then how to run the program.
Installation¶
First clone this repository to your machine. Then create a Python 3.7 environment. We typically use conda. To create the conda environment, execute
$ conda create -n decoding python=3.7
$ conda activate decoding
Next, install the MINDecoders repository into this conda environment. To do this, just clone that repository to a separate folder, and in your python environment run
$ python -m pip install -e <path_to_MINDecoders_repo>
See that repo’s README for more details related to installation.
Finally, install the rest of the necessary libraries using your package manager. If using conda, execute
$ conda env update --file requirements.yaml
If using pip, execute
$ python -m pip install -r requirements.txt
Usage¶
To run the Movement Intent Decoder software, first activate your virtual environment and enter the repo’s source folder.
$ conda activate decoding
$ cd <path_to_MINDecoding-Interface_repo>/src
To finally run the program, execute
$ python main.py
This will by default run the Backend on localhost:23432 with the GUI. To see different run options, execute
$ python main.py --help
usage: main.py [-h] [--plot] [--timing] [--log-file LOG_FILE] [--gpu [GPU]]
[--backend] [--no-backend] [--address ADDRESS] [--port PORT]
Starts the EMG-Decoder software which consists of a frontend-backend pair. The
default mode starts the GUI and the Backend. To only start the GUI and not a
backend, specify --no-backend. To only start the backend, specify --backend.
optional arguments:
-h, --help show this help message and exit
--plot start the graphing window
--timing enable logging of execution times
--log-file LOG_FILE name of log file
--gpu [GPU] command separated list of CUDA GPU IDs. (No GPUS used
otherwise). NO SPACES!
--backend only start the backend process
--no-backend don't start the backend process
--address ADDRESS the IP address of the backend
--port PORT the port of the backend
For example, to solely run the Backend on Port 23400, execute
$ python main.py --backend --port 23400
And to solely run the GUI and connect to an existing Backend process running on Port 23400, execute
$ python main --no-backend --port 23400