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 1: Running the tutorials with binder
You can run the tutorials on Jupyter Notebook from
Option 2: 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 two options:
Miniconda
-
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: Billy?
- Mac:
- Execute the
.pkg
- Select a directory for installation
- If in MacOS Catalina or later, you have to do some extra steps:
- Open a terminal window
- Run
source <full path to installation directory>/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
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 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 Navigator.
-
cd workshop_path
, where path is the absolute (full) path of the 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
- Download the repository as a .zip file
- Extract the .zip file
- Rename the directory from structure-tensor-master to structure_tensor_master
- 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 =)