Interpolation with PyDynamic.uncertainty.interpolate.interp1d_unc

In this series of notebooks we illustrate the use of our method interp1d_unc, which is very much inspired by Scipy’s interp1d method and therefore closely aligned with its signature and corresponding capabilities. The main features are:

  • interpolation of measurement values and associated uncertainties

  • available interpolation methods are linear, cubic, next, nearest, previous (aligned with scipy.interpolate.interp1d)

  • extrapolation of measurement values and associated uncertainties based on the values at the original data’s bounds or by custom input

  • returning sensitivity coefficients

  • performance oriented optional parameters

    • copy

    • assume_sorted

Comprehensive details about the parameters meanings, you find on pydynamic.readthedocs.io.

Content

The examples proceed according to the following scheme.

01 Basic measurement data pre-processing.ipynb

  • Set up the appropriate execution and plotting environment.

  • Download an example data set of real sensor recordings from Zenodo.org.

  • Visualize the relevant part of the contained data.

02 Basic interpolation.ipynb

  • Conduct a simple interpolation.

03 Basic extrapolation.ipynb

  • Conduct simple interpolation and extrapolation outside the original bounds.

  • Demonstrate returning the sensitivity coefficients

Setup the Python environment

[1]:
import holoviews as hv
import numpy as np
import h5py
import pickle
from download import download

Setup plotting environment and labels

[2]:
# Set one of the available plotting backends ('plotly', 'bokeh', 'maplotlib').
hv.extension("bokeh")

# Define labels and units for plots.
timestamp_labels = hv.Dimension("relative measurement time", unit="s")
measurement_labels = hv.Dimension("Primary Nominal Current", unit="A")