Skip to content

Commit

Permalink
Add links to mybinder'
Browse files Browse the repository at this point in the history
  • Loading branch information
wmvanvliet committed Aug 19, 2019
1 parent 3d2b9a7 commit 4018b2f
Showing 1 changed file with 14 additions and 37 deletions.
51 changes: 14 additions & 37 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,50 +1,27 @@
Neuroscience using Python
=========================

Some tutorials using Python for neuroscience. They use only NumPy, SciPy and matplotlib and show how to do everything from scratch.
They are in the form of [Jupyter Notebooks](https://jupyter.org).
Some tutorials using Python for neuroscience.
They are in the form of [Jupyter Notebooks](https://jupyter.org) and are designed to be run on a virtual server, such as [binder](mybinder.org).
Clicking on the links below will fire up a server for you and drop you into an interactive environment where you dive right in.
Give it a try!

I have tried to provide clear installation instructions below.

## 1. Install a python environment
## EEG-BCI

Install the Anaconda python distribution. It comes in two flavors: Anaconda and Miniconda. For the purposes of our exercise, Miniconda distribution will be enough. If you already have a working Anaconda installation, you can use that too.

### Linux
Analyze EEG data for BCI purposes, using no fancy toolboxes, just plain NumPy/SciPy:

1. Download the installer here: https://repo.continuum.io/miniconda/Miniconda3-latest-Linux-x86_64.sh
1. Open a terminal and run the following command: `bash /path/to/Downloads/Miniconda3-latest-Linux-x86_64.sh` (change the path to point to wherever you saved the installer script.)
1. Follow the installation instructions on the screen.
1. When prompted `Do you wish the installer to prepend the Miniconda3 install location to PATH in your ~/.bash_profile ? [yes|no]` type `yes` (unless you are running a different shell than BASH in which case it's up to you to add Miniconda3 to your `PATH`.)
1. Close the terminal window and open a new one. Try running the `conda` command. If you get a `conda: command not found` error, Miniconda3 is not properly set in your `PATH`.
[1. Load EEG data and plot ERP](https://mybinder.org/v2/gh/wmvanvliet/neuroscience_tutorials/master?filepath=eeg-bci%2F1.%20Load%20EEG%20data%20and%20plot%20ERP.ipynb)
[2. Frequency analysis](https://mybinder.org/v2/gh/wmvanvliet/neuroscience_tutorials/master?filepath=eeg-bci%2F2.%20Frequency%20analysis.ipynb)
[3. Imagined movement](https://mybinder.org/v2/gh/wmvanvliet/neuroscience_tutorials/master?filepath=eeg-bci%2F3.%20Imagined%20movement.ipynb)
[4. Classifying the P300](https://mybinder.org/v2/gh/wmvanvliet/neuroscience_tutorials/master?filepath=eeg-bci%2F4.%20Classifying%20the%20P300.ipynb)

### Mac

1. Download the installer here: https://repo.continuum.io/miniconda/Miniconda3-latest-MacOSX-x86_64.sh
1. Open `Terminal.app` and run the following command: `bash /path/to/Downloads/Miniconda3-latest-MacOSX-x86_64.sh` (change the path to point to wherever you saved the installer script.)
1. Follow the installation instructions on the screen.
1. When prompted `Do you wish the installer to prepend the Miniconda3 install location to PATH in your /Users/<username>/.bash_profile ? [yes|no]` choose yes (unless you are running a different shell than BASH in which case it's up to you to add Miniconda3 to your `PATH`.)
1. Close the terminal window and open a new one. Try running the `conda` command. If you get a `conda: command not found` error, Miniconda3 is not properly set in your `PATH`.
## MNE-Python

### Windows
[An introduction to basic MEG data analysis using MNE-Python](https://mybinder.org/v2/gh/wmvanvliet/neuroscience_tutorials/master?filepath=mne-intro%2Findex.ipynb)

1. Download the installer here: https://repo.continuum.io/miniconda/Miniconda3-latest-Windows-x86_64.exe
1. Run it and follow the instructions on the screen.
1. The "Anaconda Prompt" application should now be available on your Start menu. Open it.
1. Try running the `conda` command in the terminal window that you just opened.

## ConPy

## 2. Use Anaconda to install the required Python packages

1. Open a terminal for running anaconda. On Linux and OSX, just open a regular terminal window. On windows, you can use the "Anaconda Prompt" entry in your Start menu.
1. Run `conda install numpy scipy matplotlib jupyter`
1. Watch the installation process scroll by.
1. Run `python -c "import numpy, scipy, matplotlib"` to see if the installation was succesfull. The command should not give you any errors and finish silently.


## 3. Launch the Jupyter Notebook environment

1. Download the tutorial notebooks in this repository
1. In your Miniconda3 terminal, change your working directory to the path you've saved the `.ipynb` files to (the command to do this is `cd`).
1. In the directory where the notebook files live, run the following command: `jupyter notebook`. This should open up a browser window showing the contents of your current working directory. It will also write the URL to the terminal so you can point your browser to it manually if need be.
1. In the browser, click on one of the notebook files to open it.
[An introduction to basic functional connectivity analysis using ConPy](https://mybinder.org/v2/gh/wmvanvliet/neuroscience_tutorials/master?filepath=conpy-intro%2FMEG_connectivity_exercise.ipynb)

0 comments on commit 4018b2f

Please sign in to comment.