Create beachball images from a focal mechanism or a moment tensor.


mtimg generates custom images from moment-tensor solutions and focal mechanisms in different image formats. If unspecified, the file format is determined by the ending of the output file. mtimg is called, e.g., by the default script for report generation @DATADIR@/mtv/tools/ configured in scmtv by mtv.extendedLog.script for report generation.


  • Generate a PNG image for focal mechanism with strike/dip/rake = 110/30/45 deg

    mtimg 110 30 45 -d 200x200 -o mt.png
  • Write JPEG image with 95% quality for moment tensor with RR/TT/PP/RT/RP/TP = 1/2/3/-1/0/-1 to stdout and then into file.

    mtimg --quality 95 -f jpg 1 2 3 -1 0 -1 > /tmp/mt.jpg

Module Configuration


mtimg inherits global options.


Modules/plugins may require a license file. The default path to license files is @DATADIR@/licenses/ which can be overridden by global configuration of the parameter gempa.licensePath. Example:

gempa.licensePath = @CONFIGDIR@/licenses

Command-Line Options

mtimg [options] [source parameters]


--verbosity arg

Verbosity level [0..4]. 0:quiet, 1:error, 2:warning, 3:info, 4:debug.

-v, --v

Increase verbosity level (may be repeated, eg. -vv).

-q, --quiet

Quiet mode: no logging output.

--component arg

Limit the logging to a certain component. This option can be given more than once.

-s, --syslog

Use syslog logging backend. The output usually goes to /var/lib/messages.

-l, --lockfile arg

Path to lock file.

--console arg

Send log output to stdout.


Execute in debug mode. Equivalent to --verbosity=4 --console=1 .

--log-file arg

Use alternative log file.


-h, --help

Show help message.

-V, --version

Show version information.

--config-file arg

Use alternative configuration file. When this option is used the loading of all stages is disabled. Only the given configuration file is parsed and used. To use another name for the configuration create a symbolic link of the application or copy it. Example: scautopick -> scautopick2.

--plugins arg

Load given plugins.


-d, --dimension arg

Default: 100x100

Output image dimensions in pixel (width x height).

-o, --output arg

Name of output image file. If unspecified or ‘-’, the image is written to stdout.

-f, --format arg

Image format, if unset, the format is derived by the output file name extension. Please refer to the command-line help to get a list of formats supported by your platform.

--quality arg

Default: -1

The image quality factor which must be in the range 0 to 100 or -1. Specify 0 to obtain small compressed files, 100 for large uncompressed files, and -1 to use the default settings.

--color-p arg

Color of pressure area.

--color-t arg

Color of tension area.

--color-b arg

Color of borders.


Enable shading.

--margin arg

Width of margin.