Skip to main content

A software package for the analysis of dynamic measurements

Project description

PyDynamic

CircleCI Codacy Badge Documentation Status Codecov Badge

Python package for the analysis of dynamic measurements

The goal of this package is to provide a starting point for users in metrology and related areas who deal with time-dependent, i.e. dynamic, measurements. The software is part of a joint research project of the national metrology institutes from Germany and the UK, i.e. Physikalisch-Technische Bundesanstalt and the National Physical Laboratory.

PyDynamic offers propagation of uncertainties for

  • application of the discrete Fourier transform and its inverse
  • filtering with an FIR or IIR filter with uncertain coefficients
  • design of a FIR filter as the inverse of a frequency response with uncertain coefficients
  • design on an IIR filter as the inverse of a frequency response with uncertain coefficients
  • deconvolution in the frequency domain by division
  • multiplication in the frequency domain
  • transformation from amplitude and phase to a representation by real and imaginary parts

For the validation of the propagation of uncertainties, the Monte-Carlo method can be applied using a memory-efficient implementation of Monte-Carlo for digital filtering

The documentation for PyDynamic can be found on ReadTheDocs

Get in contact via @PyDynamic

PyDynamic packages

Installation

If you just want to use the software, the easiest way is to run from your system's command line

pip install PyDynamic

This will download the latest version from the Python package repository and copy it into your local folder of third-party libraries. Note that PyDynamic uses Python version 3.x. Usage in any Python environment on your computer is then possible by

import PyDynamic

or, for example, for the module containing the Fourier domain uncertainty methods:

from PyDynamic.uncertainty import propagate_DFT

Updates can then be installed via

pip install --upgrade PyDynamic

For collaboration we recommend forking the repository as described here , apply the changes and open a Pull Request on GitHub as described here . In this way any changes to PyDynamic can be applied very easily.

If you have downloaded this software, we would be very thankful for letting us know. You may, for instance, drop an email to one of the authors (e.g. Sascha Eichstädt, Björn Ludwig or Maximilian Gruber )

Examples

Uncertainty propagation for the application of a FIR filter with coefficients b with which an uncertainty ub is associated. The filter input signal is x with known noise standard deviation sigma. The filter output signal is y with associated uncertainty uy.

from PyDynamic.uncertainty.propagate_filter import FIRuncFilter
y, uy = FIRuncFilter(x, sigma, b, ub)    

Uncertainty propagation through the application of the discrete Fourier transform (DFT). The time domain signal is x with associated squared uncertainty ux. The result of the DFT is the vector X of real and imaginary parts of the DFT applied to x and the associated uncertainty UX.

from PyDynamic.uncertainty.propagate_DFT import GUM_DFT
X, UX = GUM_DFT(x, ux)

Sequential application of the Monte Carlo method for uncertainty propagation for the case of filtering a time domain signal x with an IIR filter b,a with uncertainty associated with the filter coefficients Uab and signal noise standard deviation sigma. The filter output is the signal *y and the Monte Carlo method calculates point-wise uncertainties uy and coverage intervals Py corresponding to the specified percentiles.

from PyDynamic.uncertainty.propagate_MonteCarlo import SMC
y, uy, Py = SMC(x, sigma, b, a, Uab, runs=1000, Perc=[0.025,0.975])

PyDynamic Workflow Deconvolution

Roadmap

Next steps

  1. Interpolation of timeseries with associated uncertainties
  2. Extension of the testsignals module
  3. Extension of data transformation functions to data streams applications

Longterm plans

  1. Implementation of other measurement (sensor) models
  2. Extension to more complex noise and uncertainty models
  3. Support for derivation of noise models

Citation

If you publish results obtained with the help of PyDynamic, please cite

Sascha Eichstädt, Clemens Elster, Ian M. Smith, and Trevor J. Esward Evaluation of dynamic measurement uncertainty – an open-source software package to bridge theory and practice J. Sens. Sens. Syst., 6, 97-105, 2017, DOI: 10.5194/jsss-6-97-2017

Acknowledgement

This work is part of the Joint Research Project 17IND12 Met4FoF of the European Metrology Programme for Innovation and Research (EMPIR).

This work was part of the Joint Support for Impact project 14SIP08 of the European Metrology Programme for Innovation and Research (EMPIR). The EMPIR is jointly funded by the EMPIR participating countries within EURAMET and the European Union.

Disclaimer

This software was developed at Physikalisch-Technische Bundesanstalt (PTB) and National Physical Laboratory (NPL). The software is made available "as is" free of cost. PTB and NPL assume no responsibility whatsoever for its use by other parties, and makes no guarantees, expressed or implied, about its quality, reliability, safety, suitability or any other characteristic. In no event will PTB and NPL be liable for any direct, indirect or consequential damage arising in connection with the use of this software.

License

PyDynamic is distributed under the LGPLv3 license with the exception of the module impinvar.py in the package misc, which is distributed under the GPLv3 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

PyDynamic-1.2.77.tar.gz (41.2 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

PyDynamic-1.2.77-py3-none-any.whl (42.8 kB view details)

Uploaded Python 3

File details

Details for the file PyDynamic-1.2.77.tar.gz.

File metadata

  • Download URL: PyDynamic-1.2.77.tar.gz
  • Upload date:
  • Size: 41.2 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for PyDynamic-1.2.77.tar.gz
Algorithm Hash digest
SHA256 895c22f7a68bb9100780be49eb4c3908d51782d55c11bafbb7e32f294969b499
MD5 72a70d75faa99d18f17838e283e655cd
BLAKE2b-256 691c320f6edfa2c072317b0bfb772faf1bd338e2f0d650f1c40ca4a3f28f5085

See more details on using hashes here.

File details

Details for the file PyDynamic-1.2.77-py3-none-any.whl.

File metadata

  • Download URL: PyDynamic-1.2.77-py3-none-any.whl
  • Upload date:
  • Size: 42.8 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/1.13.0 pkginfo/1.5.0.1 requests/2.22.0 setuptools/40.8.0 requests-toolbelt/0.9.1 tqdm/4.32.2 CPython/3.7.4

File hashes

Hashes for PyDynamic-1.2.77-py3-none-any.whl
Algorithm Hash digest
SHA256 e29f3a3577ca9031b0437ded06d586f6f67422ae90fcefdecfe7bcf1f7e8d949
MD5 980bdbfb9c7ae2843f93f386ba81b8be
BLAKE2b-256 2bc793811c9f91d9c7f200c7030cd06a26f21eb1e95a187cccf43380d80d1ac7

See more details on using hashes here.

Supported by

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