Skip to content
lassejsc edited this page Nov 25, 2025 · 11 revisions

Get Analysator

HTTPS method

If you do not have a github account with SSH keys installed, use the HTTPS method.

cd $HOME
git clone https://github.com/fmihpc/analysator.git

SSH method

This method is recommended, but requires activating your PGP key and linking it with your Github account. If that is the case, downloading a copy of the analysator toolset may be as simple as:

cd $HOME
git clone git@github.com:fmihpc/analysator.git

Installation

Analysator requires Python 3.7+.

Analysator requires a selection of python libraries, namely matplotlib and numpy. Analysator handles its own dependencies via pip. In your environment of choice (system/user environment or a virtual environment), run pip install --editable <path_to_analysator>

Optional dependencies

vtk and a specific version of vtk are required for some functionalities. pip install --editable <path_to_analysator>[all] or pip install --editable <path_to_analysator>[bvtk] will install the optional dependencies (bvtk specifically requires a pinned version of vtk)

iPython is recommended for debugging and ease of use. This is often already available, but can also be installed manually if necessary. sudo apt-get install -y ipython

Note that if you are using a virtual environment, make sure to have ipython installed in your environment. In some cases, system python and its incompatible ipython can become fallbacks, leading to a matplotlib error.

A TeX Live installation (or similar) is recommended for formatting of plotting text. If one is not available on the target system, output can be forced to use TeX-like markup supported directly by matplotlib. This is achieved by setting the system variable export PTNOLATEX=1 and to make the setting permanent echo "export PTNOLATEX=1" >> ~/.bashrc

(Optional) deactivate X-windowing

On systems without an x-windowing system such as compute nodes on a cluster (or if using it is prohibitively slow due to e.g. network weather), Analysator can be set to ignore X-windowing and use a non-interactive frontend by setting the system variable export PTNOINTERACTIVE=1 and to make the setting permanent echo "export PTNOINTERACTIVE=1" >> ~/.bashrc.

If necessary, the matplotlib frontend can be declared manually with, for example, export PTBACKEND=Qt5Agg

(Optional) Set image output directory

The default directory for image file output for some Analysator plotting tools is $HOME/Plots. This setting can be altered by setting the system variable export PTOUTPUTDIR=/target/directory/. This is required on e.g. Vorna and if using compute nodes which do not have access to the user home directory.

Test the installation

ipython
import analysator as pt

Sample output of the test

markusb@dx7-flafo-01:~$ ipython
Python 2.7.17 (default, Sep 30 2020, 13:38:04) 
Type "copyright", "credits" or "license" for more information.

IPython 5.5.0 -- An enhanced Interactive Python.
?         -> Introduction and overview of IPython's features.
%quickref -> Quick reference.
help      -> Python's own help system.
object?   -> Details about 'object', use 'object??' for extra details.

In [1]: import analysator as pt

In [2]:

Clone this wiki locally