... | ... | @@ -3,7 +3,7 @@ In the following, we will describe how to download, compile and test duneuro alo |
|
|
## Prerequisites
|
|
|
In a first step, we need to make sure that all necessary tools and libraries are installed. To do so, you can run
|
|
|
```bash
|
|
|
sudo apt install build-essential cmake git libeigen3-dev libpython-dev
|
|
|
sudo apt install build-essential cmake git libeigen3-dev libpython-dev libsuitesparse-dev
|
|
|
```
|
|
|
Next, we need to download three helper scripts that are provided on the duneuro homepage:
|
|
|
|
... | ... | @@ -57,9 +57,33 @@ pip install --user git+https://gitlab.dune-project.org/duneuro/simbiosphere.git |
|
|
## Test
|
|
|
In order to test if the installation was successful, we will perform an EEG forward computation in a multi-layer sphere model and compare the result with the analytical solution.
|
|
|
|
|
|
First, we download some test-dataset by running:
|
|
|
First we create a directory where to store the test script:
|
|
|
```bash
|
|
|
mkdir scripts
|
|
|
cd scripts
|
|
|
```
|
|
|
The we download some test-dataset by running:
|
|
|
```bash
|
|
|
for i in {test_sphere_dipoles.txt,test_sphere_electrodes.txt,test_sphere_tet.cond,test_sphere_tet.msh}; do
|
|
|
wget https://gitlab.dune-project.org/duneuro/duneuro-tests/blob/master/src/$i;
|
|
|
done;
|
|
|
```
|
|
|
Next, we need to tell python where to find the compile duneuro-py library:
|
|
|
```bash
|
|
|
export PYTHONPATH=$PYTHONPATH:/home/andreas/Dune/build-release/duneuro-py/src
|
|
|
```
|
|
|
Note that you need to modify the above path to your local directory.
|
|
|
|
|
|
Withon the python script, we use `numpy` to perform error calculations. To install it, call
|
|
|
```bash
|
|
|
pip install --user numpy
|
|
|
```
|
|
|
|
|
|
The python script that we will use is
|
|
|
```python
|
|
|
```
|
|
|
You can copy it and store it in a file `sphere.py` in the scripts directory.
|
|
|
Finally, we can run the script:
|
|
|
```bash
|
|
|
python sphere.py
|
|
|
``` |
|
|
\ No newline at end of file |