Compiling MTEX

Explains how to compile MTEX on Mac, Linux, and Windows systems. This should not be necessary in most cases.

Introduction

MTEX is shipped with precompiled binaries for Mac OSX, Windows, and Linux, 32 and 64-bits. However, if these binaries are for some reason not compatible with your system, you have to compile them by hand. Compiling MTEX is not that easy and you are encouraged to contact the author if you have any problem.

Pre-requisits

Compiler

In order to install the MTEX toolbox you will have to compile it. Therefore you need a standard C compiler gcc and the make utility. You may also need the package named build-essentials. Under Linux and MAC OSX all these components can be easily installed using your favorite package manager. For Windows we recommend the usage of MinGW and MSYS.

FFTW

The FFTW is one of the most popular fast Fourier transform libraries. For Linux and Mac OSX pre-compiled packages are available through your favorite package manager. The package is called fftw3 or similar. You will also need to install the header (developer) files. Alternatively you can download the latest source directly from http://www.fftw.org and compile it on your computer. For Windows this is the only way to go. Download the source code and compile it using MinGW.

NFFT

The NFFT is a C library for non equispaced fast Fourier transforms including Fourier transforms on the sphere. It can be downloaded at http://www-user.tu-chemnitz.de/~potts/nfft and has to be installed by the following steps:

Compiling MTEX

Now you can compile the MTEX toolbox. This is done by

Checking Your Installation

Before starting MATLAB you can check whether the C programs were compiled successfully by typing

After the next start of MATLAB change to the MTEX path and enter

This should startup the MTEX toolbox. You can check your installation under MATLAB by typing

check_mtex
checking MTEX installation
this might take some time
 
simulating pole figures
 
pf = PoleFigure  
  crystal symmetry : m-3m
  specimen symmetry: 222
 
  h = (100), r = 1 x 206 points
  h = (110), r = 1 x 206 points
  h = (111), r = 1 x 206 points
  h = (211), r = 1 x 206 points
 
------ MTEX -- PDF to ODF inversion ------------------
Call c-routine
initialize solver
start iteration
error: 8.2110E-02 2.2828E-02 1.1396E-02 7.4612E-03 5.8534E-03 4.7929E-03 4.0929E-03 3.4589E-03 2.9928E-03 2.5734E-03 2.2540E-03 
Finished PDF-ODF inversion.
error: 2.2540E-03
alpha: 9.9983E-01 9.9975E-01 9.9964E-01 9.9982E-01 
required time: 2s
ghost correction
calculate with fixed background 0.73
initialize solver
start iteration
error: 5.0183E-01 2.9200E-01 1.9060E-01 1.3656E-01 9.7762E-02 6.7339E-02 4.4499E-02 2.9389E-02 2.0824E-02 1.6300E-02 1.3990E-02 1.2812E-02 
Finished PDF-ODF inversion.
error: 1.2812E-02
alpha: 1.0010E+00 9.9999E-01 9.9996E-01 9.9979E-01 
 
rec = ODF  
  crystal symmetry : m-3m
  specimen symmetry: 222
 
  Uniform portion:
    weight: 0.73013
 
  Radially symmetric portion:
    kernel: de la Vallee Poussin, halfwidth 10°
    center: 150 orientations, resolution: 10°
    weight: 0.26987
 
 
check reconstruction error: 
everythink seems to be ok!
Elapsed time is 3.919057 seconds.