This repository contains the exercises and tutorials for the hands-on session by QIM at the European Synchrotron Radiation Facility the 8th February 2021.
Option A: Running the tutorials with binder
You can run the tutorials on Jupyter Notebook from
Option B: Configuring a Local Setup
If Binder doesn't work for you, follow the instructions below to configure a local setup.
1. Get Workshop Material
Clone or download this repository as a .zip.
2. Installation of Framework for Jupyter Notebooks
If you don't already have Anaconda to run Jupyter Notebooks, we suggest Miniconda for a faster installation.
- Go to https://docs.conda.io/en/latest/miniconda.html and download the latest version
- Mac: Choose the
.pkg
- Mac: Choose the
- Install Miniconda
- Windows:
- Execute the
.exe
- Use default installation location and options.
- Execute the
- Mac:
- Execute the
.pkg
- Select a location for the installation
- If in MacOS Catalina or later, you have to do some extra steps:
- Open a terminal window
- Run
source <location of installation>/opt/miniconda3/bin/activate
- Run
conda init zsh
- Execute the
- Linux:
- Navigate to the folder with the downloaded
.sh
file - Open the terminal in this folder (right click on the folder and select open terminal)
- Change permissions to install by running
chmod 700 <filename>.sh
- To install, type
<filename>.sh
- Navigate to the folder with the downloaded
- Windows:
3. Set up environment
Unless you are using Google Colab, you will need to run the file called environment.yml to install the required packages via the command line.
Mac/Linux:
- Navigate to the esrf-um-2021-master folder.
- To open the terminal, right click on the folder and navigate to
- Mac: Services/New Terminal at Folder
- Linux: Open in Terminal
- Type
conda env create -f environment.yml
and press enter. - Type
conda activate qim-esrf
and press enter.
Windows
- Open Anaconda Prompt.
-
cd <workshop_path>
, where workshop_path is the absolute (full) path to the esrf-um-2021-master folder. - Type
conda env create -f environment.yml
and press enter. - Type
conda activate qim-esrf
and press enter.
4. Installation of Layered Surface Tool
Install package using pip install slgbuilder
to get the implementation from this repository
5. Installation of Structure Tensor Tool
Option 1
The tutorial notebook for Structure Tensor will automatically clone the repository of the structure tensor tool. If that were to fail, use Option 2.
Option 2
- Download the repository as a .zip file
- Extract the .zip file
- Rename the directory from structure-tensor-master to structure_tensor
- Place the directory inside esrf-um-2021-master/Structure Tensor/
6. Open Jupyter Notebooks
In the same terminal window where you activated the environment, type jupyter notebook
.
You are ready! You can now navigate to the tutorial of interest =)