Skip to main content

Akima Interpolation

Project description

Akima is a Python library that implements Akima’s interpolation method using a continuously differentiable sub-spline built from piecewise cubic polynomials [1]. The resultant curve passes through the given data points and will appear smooth and natural.

Author:

Christoph Gohlke

Organization:

Laboratory for Fluorescence Dynamics. University of California, Irvine

License:

3-clause BSD

Version:

2019.4.22

Requirements

Notes

The Akima module is no longer being actively developed.

Consider using scipy.interpolate.Akima1DInterpolator instead.

References

  1. A new method of interpolation and smooth curve fitting based on local procedures. Hiroshi Akima, J. ACM, October 1970, 17(4), 589-602.

Examples

>>> from scipy.interpolate import Akima1DInterpolator
>>> def example():
...     '''Plot interpolated Gaussian noise.'''
...     x = numpy.sort(numpy.random.random(10) * 100)
...     y = numpy.random.normal(0.0, 0.1, size=len(x))
...     x2 = numpy.arange(x[0], x[-1], 0.05)
...     y2 = interpolate(x, y, x2)
...     y3 = Akima1DInterpolator(x, y)(x2)
...     from matplotlib import pyplot
...     pyplot.title('Akima interpolation of Gaussian noise')
...     pyplot.plot(x2, y2, 'r-', label='akima')
...     pyplot.plot(x2, y3, 'b:', label='scipy', linewidth=2.5)
...     pyplot.plot(x, y, 'go', label='data')
...     pyplot.legend()
...     pyplot.show()
>>> example()

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

akima-2019.4.22.tar.gz (8.9 kB view hashes)

Uploaded Source

Built Distributions

akima-2019.4.22-cp38-cp38-win_amd64.whl (15.1 kB view hashes)

Uploaded CPython 3.8 Windows x86-64

akima-2019.4.22-cp38-cp38-win32.whl (14.2 kB view hashes)

Uploaded CPython 3.8 Windows x86

akima-2019.4.22-cp37-cp37m-win_amd64.whl (15.3 kB view hashes)

Uploaded CPython 3.7m Windows x86-64

akima-2019.4.22-cp37-cp37m-win32.whl (14.1 kB view hashes)

Uploaded CPython 3.7m Windows x86

akima-2019.4.22-cp36-cp36m-win_amd64.whl (15.2 kB view hashes)

Uploaded CPython 3.6m Windows x86-64

akima-2019.4.22-cp36-cp36m-win32.whl (14.1 kB view hashes)

Uploaded CPython 3.6m Windows x86

akima-2019.4.22-cp35-cp35m-win_amd64.whl (15.2 kB view hashes)

Uploaded CPython 3.5m Windows x86-64

akima-2019.4.22-cp35-cp35m-win32.whl (14.1 kB view hashes)

Uploaded CPython 3.5m Windows x86

akima-2019.4.22-cp27-cp27m-win_amd64.whl (12.8 kB view hashes)

Uploaded CPython 2.7m Windows x86-64

akima-2019.4.22-cp27-cp27m-win32.whl (12.8 kB view hashes)

Uploaded CPython 2.7m Windows x86

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page