Software for analysis of multifractal time series

The new PhysioNet website is available at: https://physionet.org. We welcome your feedback.

When referencing this material, please include the standard citation for PhysioNet:

Goldberger AL, Amaral LAN, Glass L, Hausdorff JM, Ivanov PCh, Mark RG, Mietus JE, Moody GB, Peng C-K, Stanley HE. PhysioBank, PhysioToolkit, and PhysioNet: Components of a New Research Resource for Complex Physiologic Signals. Circulation 101(23):e215-e220 [Circulation Electronic Pages; http://circ.ahajournals.org/content/101/23/e215.full]; 2000 (June 13).

Software for calculating multifractal partitions and moments of a time series is available here. To begin, download these files:

In order to to use this code correctly, it is recommended you review:

J.F. Muzy, E. Bacry and A. Arneodo. Multifractal formalism for fractal signals: The structure-function approach versus the wavelet-transform modulus-maxima method. Physical Review E 47:875-884, 1993.

We also recommend the PhysioNet tutorial "A Brief Overview of Multifractal Time Series".

Requirements

All of these are standard on Unix, Linux, and Mac OS X systems, and are freely available for Windows as parts of Cygwin).

Compiling

If you have a make utility, you can use it to compile and test the software, simply by typing ``make check'' (look in Makefile to see what this command does). Otherwise, compile ibs.c and link it with the C standard math library. For example, if you use the GNU C compiler (recommended), you can do this by:

     gcc -o multifractal -O multifractal.c -lm

Usage

For brief instructions about how to run the program, type its name at a command prompt:

    multifractal

which should produce a message similar to:

    multifractal INPUT N QMIN QMAX DW MODE >OUTPUT
       INPUT  name of file containing the input time series
       N      number of points (lines) in INPUT
       QMIN   minimum MF order (moment, q)
       QMAX   maximum MF order
       DW     order of the Gaussian derivative wavelet (0-7)
       MODE   the type of output to be produced, one of:
                 1: partition functions (text)
                 2: maxima lines (text)
                 3: wavelet cascade (PPM image)

    INPUT is a text file containing two columns of numbers; the
    first is ignored, and the second contains the data values.

Note that when the Hurst exponent of the input series is negative (i.e., when its DFA scaling exponent is less than 1), it is necessary to integrate the series before using it as input to this software!

Output formats

As noted above, multifractal can produce three different types of output. The output type is selected by passing 1, 2, or 3 as the sizth argument on the command line; the results of these choices are:

The tau(q) and multifractal spectra of the input time series can be obtained from the partition functions (MODE 1) using mf_moments_lt.awk; see below.

Example of multifractal analysis

The input to multifractal is a text file containing two columns of numbers (time and data values).

An example multifractal time series, for which the spectrum tau(q) and the MF spectrum D(h) are analytically known, is provided in the file log_normal_sigma0.1, which can be obtained by unpacking testfiles.tar.gz:

    tar xfvz testfiles.tar.gz

To generate this example time series, we used the log-normal wavelet cascade algorithm, with parameters nu = -ln(2)/4 and sigma = 0.1, as described in:

A. Arneodo, E. Bacry, and J. F. Muzy. Random cascades on wavelet dyadic trees. J. Math. Phys. 39:4142 (1998).

First, we generate the multifractal partition function, using the command:

    multifractal log_normal_sigma0.1 32768 -5 5 3 1 >out.zq

where:

Note that multifractal performs a computationally intensive process that may require a minute or more to complete, even on a fast PC. Be patient!

After obtaining the partition function (out.zq in our case), we may calculate the tau(q) spectrum and the multifractal spectrum D(h), using the awk program, mf_moments_lt.awk:

    awk -f mf_moments_lt.awk -v a=1 -v b=2.53 out.zq >out.tq

In this command, we have specified the range over which the scaling is calculated (between log10(scale)=1 and log10(scale)=2.53; the -v option indicates that a parameter assigment follows, and the parameters a and b are the upper and lower limits of the scaling range). The program reads out.zq (the output that we have just obtained from multifractal), and it writes the corresponding tau(q) and D(h) curves into out.tq.

Further information

If you have questions or comments about this software, please contact the author, Yossi Ashkenazy.

Questions and Comments

If you would like help understanding, using, or downloading content, please see our Frequently Asked Questions.

If you have any comments, feedback, or particular questions regarding this page, please send them to the webmaster.

Comments and issues can also be raised on PhysioNet's GitHub page.

Updated Tuesday, 4 October 2016 at 15:25 EDT

PhysioNet is supported by the National Institute of General Medical Sciences (NIGMS) and the National Institute of Biomedical Imaging and Bioengineering (NIBIB) under NIH grant number 2R01GM104987-09.