Installation#

Installation of relMT is easy. The basic installation requires:

  • The FFTW library (often provided via the system package manager)

  • The Python packages NumPy, SciPy, PyYAML

Note

relMT is currently tested only on Linux systems.

Windows users, please use the Linux Subsystem for Windows (WSL) and proceed with the instructions below.

Mac users will need to install the fortran compiler gfortran on your system. Please consult the Fortran documentation for details. Then proceed below.

Pre-requisite#

This installation instruction assumes installation with Conda, pip and git. Experienced users may use uv or other tools instead.

As a pre-requisite, please install Miniconda.

Based on Conda and Pip#

We recommend to create a conda environment or to install into an existing one. Choose any Python version greater or equal 3.10

# Create and activate the environment
conda create -n relmt python
conda activate relmt

# Install the Fastest Fourier Transform in the West
conda install -c conda-forge fftw

If not already present, install pip

conda install pip

If not already present, install git

conda install git

Now install relMT locally

git clone https://github.com/wasjabloch/relMT
cd relMT
pip install .

Additional dependencies#

For plotting, we require:

  • Matplotlib for all plotting

  • networkx to visualize connections of equations in the linear system

  • Pyrocko to plot moment tensors

Consider installing these packages using the plot optional dependency:

pip install .[plot]

Some additional functionality requires community packages:

  • Import of waveforms and station inventories via ObsPy

  • Computation of spectra with Multitaper

  • Conversion to and from Cartesian coordinates with UTM

Consider installing these packages using the extra optional dependency:

pip install .[extra]

If you are working in IPython, or Jupyter, install the package in the same Conda environment to avoid version conflicts

conda install ipython

or

conda install jupyter

If you consider contributing to relMT, please install the development version

pip install .[dev]