GUI example with LEMON dataset#
This example illustrates the use of
sovabids on the LEMON dataset
using the preliminary GUI tool.
Install Sovabids in gui-usage mode#
Download the Lemon dataset#
(if you have not already done so) If you need to download the files, you can use:
python -c 'from sovabids.datasets import lemon_prepare; lemon_prepare()'
This will download the lemon dataset inside the ‘_data’ subfolder of the cloned sovabids repository.
Run front/app/app.py in a terminal#
(the front folder is the one in the root of the cloned sovabids repository.)
Assuming you are at the root of the sovabids cloned repository, you can use:
Go to your browser at http://127.0.0.1:5000/#
You will see:
This is an introductory page of the GUI.
Click Upload Files#
Click ‘Choose Files’, select the lemon folder (inside the _data subdirectory) and click submit.
You will need to wait while the files are copied to the server. Since these are heavy eegs, it will take a bit.
Deselect any files you want to skip#
Here we won’t skip any files. Notice though that there are non-eeg files (.csv and tar.gz ) mixed in there. Sovabids will skip them automatically.
Confirm detected eegs#
Sovabids will show the individual eegs found. Notice that since this is a brainvision dataset, sovabids lists the main files of this format (the .vhdr files) since the other ones (.eeg and .vmrk) are sidecars.
The rules files#
A suitable rules file is already at examples/lemon_example_rules.yml, you can upload that one.
Click Choose File, then in the popup window select the rules file, click open and then submit.
After that you will notice the text pane is updated:
You can edit the rules directly, as shown here where we modify the dataset name to “Modified Name’.
Once ready, scroll down to find another submit and click it to continue.
Edit individual mappings#
You will now see a list of the eeg files, for each you can edit its mapping. At first you will see an empty text pane since no eeg file is chosen.
Click any of the files for editing it:
Once clicked, you will see the corresponding mapping:
You can edit the INDIVIDUAL mapping of this file, in example here we will change the power line frequency of this eeg to 60 Hz.
To save the edited individual mapping, press Send at the right:
You will be redirected to the empty mapping, but if you click the same eeg file again you will notice the changes are saved:
Once the mappings are ready, click next:
Proceed to the conversion#
Click on the button:
Once clicked it will take a while before the program finishes (a feedback information of the progress is not yet implemented on this preliminary GUI).
Save your conversion#
When the files are ready you will see:
Once you click there, sovabids will begin compressing your files so it will take a bit until the download windows is shown. Select where you want to download the file and press save.
When the download is ready, navigate to the chosen folder and decompress the files. Go into the correspondent folder to see the converted files:
Inspect the sovabids logs and mappings#
Inside the code/sovabids subdirectory you will see the mappings and log files.
The mappings.yml file will hold the mappings:
The logs will hold run-time information of the procedure:
Total running time of the script: ( 0 minutes 0.000 seconds)