-
Philipp Schmidt authoredPhilipp Schmidt authored
Offline Calibration
The offline calibration is a package that consists of different services, responsible for applying most of the offline calibration and characterization for the detectors.
Contents
Offline Calibration Installation
It's recommended to install the offline calibration (pycalibration) package on maxwell, using the anaconda/3 environment.
The following instructions clone from the EuXFEL GitLab instance using SSH remote URLs, this assumes that you have set up SSH keys for use with GitLab already. If you have not then read the appendix section on SSH Key Setup for GitLab for instructions on how to do this .
Installation using python virtual environment - recommended
pycalibration uses the same version of Python as Karabo, which in June 2021 updated to use Python 3.8. Currently the default python installation on Maxwell is still Python 3.6.8, so Python 3.8 needs to be loaded from a different location.
One option is to use the Maxwell Spack installation, running module load maxwell will activate the test Spack instance from DESY, then you can use module load python-3.8.6-gcc-10.2.0-622qtxd to Python 3.8. Note that this Spack instance is currently a trial phase and may not be stable.
Another option is to use pyenv, we provide a pyenv installation at
/gpfs/exfel/sw/calsoft/.pyenv which we use to manage different versions of
python. This can be activated with source /gpfs/exfel/sw/calsoft/.pyenv/bin/activate
A quick setup would be:
source /gpfs/exfel/sw/calsoft/.pyenv/bin/activate
-
git clone ssh://git@git.xfel.eu:10022/detectors/pycalibration.git && cd pycalibration
- clone the offline calibration package from EuXFEL GitLab -
pyenv shell 3.8.11
- load required version of python -
python3 -m venv .venv
- create the virtual environment -
source .venv/bin/activate
- activate the virtual environment -
python3 -m pip install --upgrade pip
- upgrade version of pip -
python3 -m pip install .
- install the pycalibration package (add-e
flag for editable development installation)
Copy/paste script:
source /gpfs/exfel/sw/calsoft/.pyenv/bin/activate
git clone ssh://git@git.xfel.eu:10022/detectors/pycalibration.git
cd pycalibration
pyenv shell 3.8.11
python3 -m venv .venv
source .venv/bin/activate
python3 -m pip install --upgrade pip
python3 -m pip install . # `-e` flag for editable install, e.g. `pip install -e .`
Installation into user home directory
This is not recommended as pycalibration has pinned dependencies for stability, if you install it directly into you users home environment then it will downgrade/upgrade your local packages, which may cause major issues and may break your local environment, it is highly recommended to use the venv installation method instead.
source /gpfs/exfel/sw/calsoft/.pyenv/bin/activate
-
git clone ssh://git@git.xfel.eu:10022/detectors/pycalibration.git && cd pycalibration
- clone the offline calibration package from EuXFEL GitLab -
pyenv shell 3.8.11
- load required version of python -
pip install .
- install the pycalibration package (add-e
flag for editable development installation) -
export PATH=$HOME/.local/bin:$PATH
- make sure that the home directory is in the PATH environment variable