pyOPALTools
pyOPALTools is a post-processing library written in Python. The main idea behind the library is to provide a common interface to all output formats generated by OPAL in order to analyse the data. It is recommended to create a Python virtual environment where you install all necessary Python packages:
In the directory pyOPALTools/opal/test/ you can find several notebooks that show the usage of the library. In order to work properly you need to append the path of the root directory of pyOPALTools to PYTHONPATH, i.e.
export PYTHONPATH=/path/to/root/of/pyOPALTools/:$PYTHONPATH
You can check if it works by importing the library in an interactive session, e.g.
>>> import opal
>>>
You can also use the setup.py in order to install the opal package in your Python environment. For this purpose you just call
python setup.py install
in the root directory of pyOPALTools. Make sure you have the virtual environment loaded otherwise it will be installed to your default Python. This will install all dependencies and the opal package.
pyOPALTools is developed by
- Andreas Adelmann (PSI)
- Matthias Frey (PSI)
- Jochem Snuverink (PSI)
- Nicole Neveu (SLAC)
- Philippe Ganz
Installation of a virtual Python environment
It is recommended to create a virtual Python environment. You might need to install Python3 first.
Installation using virtualenv
If you do not have virtualenv
installed, type
pip install virtualenv
in your terminal. The pyOPALTools environment is installed with following steps:
virtualenv -p `which python3` pyOPALTools.venv
source pyOPALTools.venv/bin/activate
The virtual environment can be deactivated with
deactivate
Installation using venv
python3 -m venv pyOPALTools.venv
source pyOPALTools.venv/bin/activate
The virtual environment can be deactivated with
deactivate
Installation of dependent packages
Install Jupyter and additional software in the activated environment
pip install numpy
pip install scipy
pip install jupyter\[notebook\] matplotlib
pip install h5py
pip install pyQt5
pip install seaborn