Getting started

Requirements

The package was developed on python 3.7 and 3.8, and is running and tested on Mac OSX.

  • ObsPy 1.0.* and its dependencies

  • pandas 1.0.*

Installation

  • Create a Python environment

  • Install ObsPy and pandas

  • Make sure you have cloned the repository

  • Install mttime

I recommend installing Python via Miniconda or Anaconda. Choose Miniconda for a lower footprint. Then follow the instructions on their sites to install ObsPy and pandas for your given platform.

Download mttime and install it from source. If you installed Python via conda make sure you activate the environment where ObsPy and pandas are installed.

# Activate environment
conda activate your_environment

# Build and install mttime
git clone https://github.com/LLNL/mttime
cd mttime
python setup.py install

Finally, if you want to run the tutorials you will need to install Jupyter Notebook.

Usage

You can execute the package from the command line or run it interactively in the Python console. In either case you will need to provide an input file that contains information about the file structure and parameters to set up the inverse routine. If no file is given the code will look for a file named mtinv.in in the current working directory.

Executing the package from command line will launch the inversion, save and plot the result to file:

mttime-run mtinv.in

The equivalent in the Python console:

>>> import mttime
>>> config = mttime.Configure(path_to_file="mtinv.in")
>>> mt = mttime.Inversion(config=config)
>>> mt.invert()
>>> mt.write()

Refer to the User Guide for more details.