MAG-MIX© download

Rocks and sediments inevitably contain mixtures of magnetic minerals, grain sizes, and weathering states. Most rock magnetic interpretation techniques rely on a set of value parameters, such as susceptibility and isothermal/anhysteretic remanent magnetisation (ARM or IRM). These parameters are usually interpreted in terms of mineralogy and domain state of the magnetic particles. In some cases, such interpretation of natural samples may be misleading or inconclusive.

A less constrained approach to magnetic mineralogy models is based on the analysis of magnetisation curves, which are decomposed into a set of elementary contributions. Each contribution is called a magnetic component, and characterises a specific set of magnetic grains with a unimodal distribution of physical and chemical properties. Magnetic components are related to specific biogeochemical signatures rather than representing traditional categories, such as single domain magnetite. This unconventional approach can be regarded as a kind of principal component analysis (PCA) that gives a direct link to the interpretation of natural processes on a multidisciplinary level. Since magnetic components rarely occur alone in natural samples, unmixing techniques and rock magnetic models are interdependent.

Valuable information for rock magnetic and environmental studies can be obtained directly from the coercivity distribution of the sample, which provides a richness of details hidden in the measurement curve (see examples).

What is MAG-MIX?
The software package MAG-MIX provides computer programmes for the analysis of isothermal magnetisation curves* and coercivity distributions and was developed by Ramon Egli. This first release includes the programmes CODICA and GECA. It consists of two packages: CODICA (COercivity DIstribution CAlculator) and  GECA (GEneralised Coercivity Analyser).

*The term magnetisation curve has here and in the following the meaning of an acquisition curve, alternating field demagnetisation curve or backfield curve (latter also called direct current demagnetisation).

What does CODICA do?
CODICA is a programme that calculates the coercivity distribution of a magnetisation curve and estimates the measurement errors. CODICA eliminates efficiently measurement noise from acquisition or demagnetisation curves of remanent magnetisation (based on rescaling procedures) and calculates then the derivative (also called coercivity distribution or coercivity spectrum).

CODICA proceeds essentially on three steps that are shown in the figures below, considering a simple example. First, a set of scale transformations is applied to the field and the magnetisation (b). After field and magnetisation scales have been changed, the magnetisation curve becomes close to straight line, and is said to be linearised (c). A so-called residual curve is obtained after removing the linear trend from the scaled curve by subtraction of a polynomial (d). The residual curve has the characteristics of a stochastic signal, because it oscillates more or less randomly around a mean value of zero. Wiggles may arise from small asymmetries of the original magnetisation curve, and as well as from  measurement errors. Measurement errors are easy to recognise in the residual curve, since they are enormously amplified. This gives the possibility to optimise and to correct experiments in order to obtain optimal results. The residual curve is then fitted using a method called least-squares collocation, which is a particularly effective model for stochastic (non-periodic) signals red line in (d). The interpolated residual curve - supposed to be free of measurement errors -  is transformed back into a magnetisation curve red line in (e) and its first derivative, called coercivity distribution (f), is calculated. The least-squares collocation method provides also a way to estimate the error associated to the operations described above and thus provides confidence limits for the results it produces.

The following figures (a) to (f) illustrate the working principle of CODICA on a simple example (sample kindly provided by Christoph Geiss).

(a) Original AF demagnetisation curve showing a characteristic multidomain (MD) shape.

(b) The field axis is rescaled in order to get a sigmoidal-shaped curve. To do so, the scale is expanded at small fields.

(c) The magnetisation is now rescaled in order to linearise the magnetisation curve. To obtain this result, CODICA expands the magnetisation scale near the beginning and the end of the magnetisation curve. The red line is the linear best-fit to the data.

(d) The linear trend of the rescaled curve (red line in c) is subtracted to obtain the so-called residuals. As it can be clearly seen, the measurement errors are quite evident in this plot. The red curve is a best-fit of the residuals that CODICA obtains from an autocorrelation model.

(e) A model for the  error-free  magnetisation curve (red) is obtained from the fitted residuals (red curve in d), by inverting the mathematical functions used to transform the original measurement (a) into the residuals (d).

(f) A coercivity distribution is calculated as the analytical derivative of (e). The thickness of the line corresponds to the estimated confidence limits of the coercivity distribution. CODICA calculates the coercivity distribution on a logarithmic field scale, as in (f), as well as on a linear scale.

Some applications of CODICA to rock magnetic and environmental studies. The left plots show the original measurements, the right plots are coercivity distributions calculated with CODICA. The thickness of the curves corresponds to the error estimate of CODICA.

(a) Alternating field demagnetisation curves of a Tiva Canyon Tuff that contains acicular magnetite in the SP/SSD grain size range. Measurements have been started 8.5 and 160 hours after an ARM was imparted (see the IRM Quarterly, 14(3), 2004, for more details about the Tiva Canyon Tuff).
(b) Coercivity distributions calculated from (a). Notice the bimodal character of the 8.5 h curve, showing the magnetisation of viscous and of more stable particles. The difference between both curves (inset) shows the coercivity distribution of the viscous particles with relaxation times between 8.5 and 160 h.


(c) Normalised alternating field demagnetisation curves of ARM from samples of particulate matter collected from the atmosphere at three places in the city of Zürich, Switzerland (see S. Spassov et al., 2004).
(d) The normalised coercivity distributions show the increasing relative contribution of a high coercivity component in more polluted areas (GMA: forest near Zürich, WDK: center of Zürich, GUB: motorway tunnel).

What does Geca do?

GECA is a programme for modelling a coercivity distribution as a linear combination of special model functions, that are supposed to represent the coercivity distribution of specific groups of magnetic particles, called components (= unmixing).
A Pearson's X 2 goodness of fit test evaluates the number of functions required for the best-fit and an error estimation allows to calculate the confidence limit for each model parameter.

The figure below displays the modelling of a coercivity distribution (sample WDK from above). The grey band corresponds to the coercivity distribution (in absolute) and
its thickness is the error estimate of CODICA. The coercivity distribution is fitted with a linear combination (blue) of two model functions (red and green). Τhe difference between the measured (grey) and the modelled (blue) coercivity distribution (= residuals) is plotted in the lower diagram (blue). The residuals fit well within the error of the coercivity distribution (grey). Pearson's X 2 goodness of fit test gives a value of 1.5 for the solution obtained, which is inside the interval of confidence [0.59;1.7], hence the test is passed - model and measurement are not significantly different. Click on the figure to zoom in.  Another example of unmixing (lake sediment) is given below.


(a) alternating field demagnetisation of an anhysteretic remanent magnetisation imparted to an anoxic sediment from lake Baldeggersee, Switzerland (see Egli, 2004, for a detailed discussion about magnetic measurements on this lake).

(b) Coercivity distribution calculated from (a), and results of a component analysis (colored areas). Three components can be clearly distinguished: the lowest coercivity component has been attributed to detrital magnetite, the middle coercivity component to magnetosomes that survived reductive dissolution, and the high coercivity component to a high coercivity mineral such as haematite.

Both programmes are written in Mathematica, a programming language similar to other traditional computer languages such as C, Pascal or FORTRAN. The usage of CODICA implies that Mathematica is installed on your computer. MAG-MIX has been developed for Mathematica 5.0 under Windows, but with small code modifications it is also compatible with Mathematica for Linux/Unix.  At least 128 MB RAM and a 1 GHz CPU are recommended.

1. Install Mathematica on your computer.
2. Download the zip-file from below, store it in a local directory and unpack it.
3. Install CODICA. To install CODICA 5.0 copy the source code file MAG_MIX_1/CODICA/Install/Codica.m into the following directory:
whereby C:/.../ depends on the installation of Mathematica on your computer.

4. To install GECA, copy the source code file MAG_MIX_1/GECA/Install/Geca.m and the file MAG_MIX_1/GECA/Install/components.txt into the
following directory:
C:/.../Wolfram Research/Mathematica/5.0/AddOns/StandardPackages/Utilities
whereby C:/.../ depends on the installation of Mathematica on your computer.

Both releases can be downloaded following the links below.

MAG-MIX Release 1 (2005), Mathematica v.5.0 for Windows must be installed in your computer.
The zip file contains: installation instructions for CODICA 5.0 and GECA 2.1, the source code (files Codica.m, Geca.m), the reference manual (pdf-format) and examples (including data). (4.6 Mb)

Manual only
Here you can download the reference manual, including theoretical aspects.

  Manual MAG-MIX 5.0 (2005) (4.1 Mb)

Your feedback is important to improve the MAG-MIX. If you encounter problems in using the programmes, or if you have suggestions, please do not hesitate to contact the author by e-mail:

Egli, R., Analysis of the field dependence of remanent  magnetization  curves, Journal  of Geophysical   Research,   108   (B2),   2081,   doi 10.1029/2002JB002023, 2003.

Egli, R.,  Characterization of individual rock magnetic components by analysis of remanence curves, 2. fundamental properties of coercivity distributions, Physics and Chemistry of the Earth, 29, 851-867, 2004.

Heslop, D.,  Dekkers, M.J., Kruiver, P.P. and  I. H. M. van Oorschot, Analysis of isothermal remanent magnetization acquisition curves using the expectation-maximization algorithm,
Geophysical Journal International,148, 58-64, 2002.

Kruiver P.P.,  Dekkers M.J. and D. Heslop, Quantification of magnetic coercivity components by the analysis of acquisition curves of isothermal remanent magnetisation,
Earth and Planetary Science Letters, 189, 269-276, 2001.

Spassov, S., Egli, R., Heller, F., Nourgaliev, D.K. and J. Hannam, Magnetic quantification of urban pollution sources in atmospheric particulate matter, Geophysical Journal International, 159, 555-564, 2004.