**********************
minkowski 2.1
**********************
A program for calculating Minkowski functionals of a Boolean grain
model with boundary correction.
Written by Jens Schmalzing and Martin Kerscher.
Minkowski functionals are discussed in all the references below. The
computational method for a Boolean grain model without boundary
conditions is discussed in [1]. The computational method for
boundaries is a generalization of this method [2]. The deconvolution
of the boundaries is discussed in [2], [3].
Download:
---------
The program is distributed as a compressed tar file. You may download
the actual version from
http://homepages.physik.uni-muenchen.de/~Martin.Kerscher/software/
Installation:
-------------
Go into the directory you unpacked the code and type: make
Perhaps you have to choose a different c-compiler and different flags in
the makefile. If `make' gives no error you probably generated the program
`main' successfully.
Examples:
---------
./main -h
get a list of options and the actual (default) values
of the parameters.
./main -n100 -l10 -R0.3 -obox.res
calculate the mean Minkowski functionals of 10 realization of a
binomial process with 100 points within a cube of sidelength 1. The
results go to box.res.
./main -n1000 -s0.1 -r0 -R0.17 -d0.01 -iparticle.dat -oparticle_sub.res
Subsample 10%, i.e. 1000 points from the 10k points in particle.dat
Then calculate the Minkowski functionals for radii from 0 to 0.17
with steps 0.01. The points in particle.dat were extracted from
a sample used in [4].
With
./main -n1000 -l10 -S128 -r0 -R0.17 -d0.01 -orandom_sub.res
we simulate 10 realizations of randomly distributed points (binomial
process) with the same scaling as in the preceding calculations.
From the 10 realizations we can estimate the fluctuations around the
randomly distributed points and hence compare with particle_sub.res
(see plotparticle.gpl).
./main -n10000 -r0 -R0.1 -d0.005 -iparticle.dat -oparticle.res
Finally, calculate the Minkowski functionals of all 10k points in
particle.dat. This may take some time.
Results of these calculations are saved in corresponding files *.ores
for your reference. Simple gnuplot macros for plotting the Minkowski
functionals can be found in box.plot, particle_sub.plot and
particle.plot .
Hints and known limitations:
----------------------------
- The definition of the geometry of the sample window is in the file
objects.c .
- The input procedure for the cluster data used in reference [3] is in
the file cluster.c, the input procedure used for analyzing tubulent
multiphase flow [4] is in bubble.c (definitions of the sample window
are in objects.c).
- Up to now the code was used only for convex boundaries.
- There is some documentation in the source code.
- The Program calculates the volume densities v of the
V-measures (compare the definitions in [2]).
- If several realizations are drawn, the program computes the mean
and the standard error of the v-measures.
- The time needed for a calculation strongly depends on the type of
clustering. With 100k points this ranges from several hours (Poisson)
to several weeks (strong filamentary clustering). Samples with less
than 1k points are typically no problem (several minutes) on present
day (2007) hardware.
- No precautions are taken to check for degenerate
positions. E.g. four points lying in a plane, especially if they
(almost) form a rectangle will lead to numerical problems.
Probably this is the reason that for some large strongly clustering
samples, the calculation delivers a "nan" (not a number).
- Another source of numerical problems are degenerate spherical
triangles, i.e. triangles with comparatively large sidelengths, but
vanishing areas. Such problems mostly occur while analyzing large
(>10k) and very strongly clustered data sets. Compared to minkowski 2.0,
some crude workarounds are built in (see minkowski.c and recipes.c).
- Sometimes it helps to randomize the positions slightly to get rid of
these numerical problems.
Applications:
-------------
The code minkowski 2.0 has been used in several situations, namely to
calculate the Minkowski functionals of Abell/ACO clusters as shown in
[3]. The typical sample size was <1000 points with moderately complex
boundaries. Recently the updated code minkowski 2.1 has been used to
calculate the Minkowski functionals of particles in turbulent flow
[4]. The sample sizes was 100K points with simple boundaries.
Versions History:
-----------------
2.0 The code was developed in 1996 by Jens Schmalzing and Martin Kerscher
based on a Fortran program by Klaus Mecke.
2.1 Some corrections and simplifications have been made in 2007
by Martin Kerscher.
You can obtain the old code minkowski2 from Thomas Buchert
(buchert@cosmunix.de) . As you may have guessed from the version
history, donīt expect frequent updates.
Legal stuff, acknowledgements, contact
--------------------------------------
The code in recipes.c is adopted from Numerical Recipes (see copyright
information in this file). The rest of the code is covered by the GPL
(for details see main.c and gpl-3.0.txt). Just to make sure, this
program is provided "as is" without warranty of any kind.
If you use the code for your publications, it would be nice if you
could cite [1] for the method and [3] for the code.
If you have comments, suggestions, improvements, feel free to contact me.
Martin Kerscher
Fakultaet fuer Physik
Schellingstr. 4
D-80799 Muenchen
martin.kerscher@lmu.de
References:
-----------
[1] K.R. Mecke, T. Buchert, H. Wagner (1994): ``Robust Morphological Measures
for Large-scale Structure in the Universe'', Astron. Astrophys. 288, 697-704.
astro-ph/9312028
[2] J. Schmalzing, M. Kerscher, T. Buchert (1996): ``Minkowski
functionals in Cosmology'', in: Proc. of the International
School Enrico Fermi Course CXXXII: Dark Matter in the Universe,
eds.: Bonometto, Primack, Provenzale. pp. 281--291, astro-ph/9508154
[3] M. Kerscher, J. Schmalzing, J. Retzlaff, S. Borgani, T. Buchert,
S. Gottl"ober, V. M"uller, M. Plionis, H. Wagner : ``Minkowski
functionals of Abell/ACO Clusters'', Mon. Not. R. Astr. Soc., 284 (1997)
pp. 73-84, astro-ph/9606133
[4] E. Calzavarini, M. Kerscher, D. Lohse, F. Toschi: Dimensionality
and Morphology of Particle and Bubble Clusters in Turbulent Flow (in
preparation 2007)