Skip to main content

Python interface to harminv

Project description

This is a python interface to harminv, a library for performing harmonic inversion on a signal.


  • libharminv-dev
  • numpy


Make sure that you have the requirements above, then

pip install pharminv


harminv.invert contains the basic functionality of the harminv tool. This function should remain stable but the API elsewhere is subject to change.

import numpy as np
import harminv

time = np.linspace(0, 1, 1000)

signal = np.cos(2 * np.pi * time * 10) + np.cos(2 * np.pi * time * 20)

inversion = harminv.invert(signal, fmin=1, fmax=100)

inversion.freq        # mode frequencies
inversion.decay       # decay rates
inversion.Q           # Q factor
inversion.amplitudes  # absolute amplitudes
inversion.phase       # phase shift


harminv was written by Steven G. Johnson and is licensed under the GNU GPLv2+, copyright 2005 by the Massachusetts Institute of Technology.

This python interface to harminv is licensed under the standard BSD 3-clause license.

Project details

Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

pharminv-0.2.3.tar.gz (45.3 kB view hashes)

Uploaded source

Supported by

AWS AWS Cloud computing Datadog Datadog Monitoring Facebook / Instagram Facebook / Instagram PSF Sponsor Fastly Fastly CDN Google Google Object Storage and Download Analytics Huawei Huawei PSF Sponsor Microsoft Microsoft PSF Sponsor NVIDIA NVIDIA PSF Sponsor Pingdom Pingdom Monitoring Salesforce Salesforce PSF Sponsor Sentry Sentry Error logging StatusPage StatusPage Status page