Skip to content
Snippets Groups Projects
Commit fd8a9da0 authored by Astrid Muennich's avatar Astrid Muennich
Browse files

added files for tutorial

parent 6e1cb761
No related branches found
No related tags found
1 merge request!15Tutorial
Installation and Configuration
=============================
1. log into max-exfl
2. install karabo in your home directory or under /gpfs/exfel/data/scratch/username:
wget http://exflserv05.desy.de/karabo/karaboFramework/tags/2.2.4/karabo-2.2.4-Release-CentOS-7-x86_64.sh
chmod +x karabo-2.2.4-Release-CentOS-7-x86_64.sh
./karabo-2.2.4-Release-CentOS-7-x86_64.sh
source karabo/activate
3. get pycalibration
git clone https://git.xfel.eu/gitlab/detectors/pycalibration.git
4. install requirements:
cd pycalibration
pip install -r requirements.txt .
5. adjust xfel_calibrate/settings.py:
change karabo_activate_path and ipcluster_path according to where you installed karabo
Create your own notebook
========================
1. Create a new notebook or re-arrange an existing on following the guidelines explained here: https://in.xfel.eu/readthedocs/docs/european-xfel-offline-calibration/en/latest/workflow.html
2. register you notebook:
add an entry to xfel_calibrate/notebooks.py
Note: use all capital letters for DETECTOR and TYPE
3. update:
pip install --upgrade .
Running the notebook
====================
1. make sure output folders exist
2. run it:
xfel-calibrate Tutorial TEST
3. Look at generated report in output folder
This diff is collapsed.
%% Cell type:markdown id: tags:
Create a small simple notebook, without thinking about parameters or maxwell
%% Cell type:code id: tags:
``` python
import matplotlib
%matplotlib inline
import numpy as np
import matplotlib.pyplot as plt
```
%% Cell type:code id: tags:
``` python
sensor_size = [10,20]
random_seed = 2345
np.random.seed = random_seed
fake_data = np.random.random((sensor_size))
```
%% Cell type:code id: tags:
``` python
plt.imshow(fake_data, interpolation="nearest")
plt.colorbar()
```
%% Output
<matplotlib.colorbar.Colorbar at 0x7f9f38551d30>
%% Cell type:markdown id: tags:
Calculate some stuff from the data
%% Cell type:code id: tags:
``` python
my_mean = fake_data.mean()
my_std = fake_data.std()
my_mean, my_std
```
%% Output
(0.5116986708989778, 0.29529469463486308)
%% Cell type:code id: tags:
``` python
```
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment