title |
---|
Setup |
On the GitHub repo, click the green button that says "Code", then click Download ZIP. Once downloaded, extract the ZIP file.
Using this method requires a (very) useful piece of software called git
. The process of installing git depends heavily on whether you're using MacOS, Windows or Linux. Follow the instructions in the link below to set up git
on your PC:
Once you've installed git
, open up your terminal and do the following:
git clone https://github.com/carpentries-incubator/SDC-BIDS-sMRI.git
This will download the repository directly into your current directory.
We use python version 3.6.0, but any newer version should also work (Python 2 versions haven't been tested). There are many methods to setting up a python environment but we'd recommend using some sort of virtual environment as to not break your system python install. Two methods (of many) are listed below:
For easy set-up we recommend Anaconda to manage python packages for scientific computing. Once installed, setting up the python environment can be done quite easily:
- Install Anaconda Python version 3.7
- Open Anaconda Navigator
- Click on Environments on the left pane
- Click Create then type in
SDC-BIDS-sMRI
- In the
SDC-BIDS-sMRI
entry click the play button then click Open Terminal - In terminal type:
conda install -y numpy pandas scipy scikit-learn matplotlib jupyter ipykernel nb_conda nilearn seaborn
conda install -y -c conda-forge awscli
conda install -y -c anaconda lxml
pip install nilearn nibabel
- Close the terminal, click on the play button again and open Jupyter Notebook
- Navigate to
SDC-BIDS-sMRI
folder you downloaded earlier. - Done!
After installing Anaconda, open terminal and type:
cd SDC-BIDS-sMRI
conda create -p ./SDC_sMRI_workshop_2021
source activate $(pwd)/SDC_sMRI_workshop_2021
conda install numpy pandas scipy scikit-learn matplotlib seaborn jupyter ipykernel nb_conda
conda install -c conda-forge awscli nibabel nilearn lxml
An alternative method uses pyenv with pyenv virtualenv. This is a favourite because it seamlessly integrates multiple python versions and environments into your system while maintaining use of pip (instead of conda).
cd SDC-BIDS-sMRI
pyenv virtualenv 3.6.0 SDC_sMRI_workshop_2021
echo SDC_sMRI_workshop_2021 > .python-version
pip install --requirement requirements.txt
All datasets needed for the notebook examples are in the ./SDC-BIDS-sMRI/local_data dir
Finally open up the jupyter notebook to explore the tutorials:
cd SDC-BIDS-sMRI
# Include the line below if you are using anaconda environment and it is not already active
# source activate $(pwd)/SDC_sMRI_workshop_2021
jupyter notebook
{% include links.md %}