"Fossies" - the Fresh Open Source Software Archive

Member "harminv-1.4.1/doc/harminv-man.md" (20 Jul 2017, 8257 Bytes) of package /linux/privat/harminv-1.4.1.tar.gz:


As a special service "Fossies" has tried to format the requested source page into HTML format (assuming markdown format). Alternatively you can here view or download the uninterpreted source code file. A member file download can also be achieved by clicking within a package contents listing on the according byte size field.

A hint: This file contains one or more very long lines, so maybe it is better readable using the pure text view mode that shows the contents as wrapped lines within the browser window.


harminv command-line program

Harminv is installed as both a library and as a command-line program harminv. This page describes the usage of the command-line program.

Synopsis

harminv [OPTION]... [freq-min-freq-max]...

Description

harminv is a program designed to solve the problem of “harmonic inversion”: given a time series consisting of a sum of sinusoids (“modes”), extract their frequencies and amplitudes. It can also handle the case of exponentially-decaying sinusoids, in which case it extracts their decay rates as well.

harminv is often able to achieve much greater accuracy and robustness than Fourier-transform methods, essentially because it assumes a specific form for the input.

It uses a low-storage “filter-diagonalization method” (FDM), as described in V. A. Mandelshtam and H. S. Taylor, “Harmonic inversion of time signals,” J. Chem. Phys., vol. 107, p. 6756 (1997). See also erratum, ibid 109, 4128 (1998).

Input

harminv reads in a sequence of whitespace-separated real or complex numbers from standard input, as well as command-line arguments indicating one or more frequency ranges to search, and outputs the modes that it extracts from the data. (It preferentially finds modes in the frequency range you specify, but may sometimes find additional modes outside of that range.) The data should correspond to equally-spaced time intervals, but there is no constraint on the number of points.

Complex numbers in the input should be expressed in the format RE+IMi (no whitespace). Otherwise, whitespace is ignored. Also, comments beginning with # and extending to the end of the line are ignored.

A typical invocation is something like

harminv -t 0.02 1-5 < input.dat

which reads a sequence of samples, spaced at 0.02 time intervals (in ms, say, corresponding to 50 kHz), and searches for modes in the frequency range 1–5 kHz. (See below on units.)

Output

harminv writes four comma-delimited columns to standard output, one line for each mode: frequency, decay constant, Q, amplitude, phase, and error. Each mode corresponds to a function of the form:

amplitude * exp[-i (2 pi frequency t - phase) - decay t]

Here, i is sqrt(-1), t is the time (see below for units), and the other parameters in the output columns are:

Spurious Modes

Typically, harminv will find a number of spurious solutions in addition to the desired solutions, especially if your data are noisy. Such solutions are characterized by large errors, small amplitudes, and/or small Q (large decay rates / broad linewidths). You can omit these from the output by the error/Q/amplitude screening options defined below.

By default, modes with error > 0.1 and Q < 10 are automatically omitted, but it is likely that you will need to set stricter limits.

Units

The frequency (and decay) values, both input and output, are specified in units of 1/time, where the units of time are determined by the sampling interval dt (the time between consecutive inputs). dt is by default 1, unless you specify it with the -t dt option.

In other words, pick some units (e.g. ms in the example above) and use them to express the time step. Then, be consistent and use the inverse of those units (e.g. kHz = 1/ms) for frequency.

Note that the frequency is the usual 1/period definition; it is not the angular frequency.

Options

Bugs

Report bugs by filing a github issue.

Authors

Written by Steven G. Johnson. Copyright © 2004–2017 by the Massachusetts Institute of Technology.