pydvma¶
A Python package for dynamics and vibration measurements and analysis.
About pydvma¶
This is a modular library for data measurement and analysis in the context of dynamics and vibration, for use in student laboratory experiments as well as for research projects, developed at Cambridge University Engineering Department.
A high-level interface allows straightforward application for common use-cases and a low-level interface provides more control when needed.
The aim is for a library that is simple to use and simple to maintain. It is not a full-featured GUI, but when used in conjunction with Jupyter Notebooks it is intended to provide the best of both worlds: interactive tools for common tasks and a command line interface for customisation.
Features¶
At present the library has basic functionality for:
- Logging data using soundcards or National Instruments DAQs
- Logging with pre-trigger for impulse response measurements
- Logging with PC generated output (soundcard and NIDAQ)
- Computing frequency domain data (FFT)
- Computing transfer function data
- Computing sonograms/spectrograms
- Basic modal analysis tools (mode-fitting, damping estimation)
- Saving and plotting data
- Export to Matlab and CSV
- Interactive browser tools for standard acquisition and analysis
- Live oscilloscope and FFT monitoring of input signals
Two interfaces, one analysis core¶
pydvma has two front-ends over the same analysis engine:
- the web logger — a browser-based interface for acquiring, monitoring, analysing, fitting and exporting data. This is the recommended way to use pydvma interactively, and it runs in three modes (below); and
- the Python interface —
import pydvma as dvmain a notebook or script, for full customisation and scripted workflows.
The earlier desktop Qt logger GUI has been removed now that the
web logger has full parity (its last version is the qt-final git tag) —
see From the Qt logger.
The web logger — no install for two of the three modes¶
| Mode | Open it | What you get |
|---|---|---|
| Pages app | torebutlin.github.io/pydvma/app/ | Full analysis of saved files plus soundcard capture — nothing to install |
| Local bridge | pip install "pydvma[serve,soundcard]", then pydvma-serve --open |
The same app driving real hardware (soundcard or NI-DAQ) on your machine |
| JupyterLite | torebutlin.github.io/pydvma/lite/ | import pydvma in a browser notebook — no install |
Saved a dataset in the lab? Open the
Pages app (or the
JupyterLite notebook) and
drag your .dvma, .npy or .mat file straight in — Python runs inside
your browser, and files never leave your machine. See
the web logger guide for the full workflow.
Quick start¶
Analyse or measure in the browser — no install¶
Open torebutlin.github.io/pydvma/app/ and either load a saved file or capture from a soundcard. Full walkthrough: the web logger.
Drive real hardware locally¶
pip install "pydvma[serve,soundcard]" # add [ni] for National Instruments
pydvma-serve --open # serves the app + bridge, opens a browser
pydvma-serve --driver nidaq --open
See Installation and NI hardware over the bridge.
Script it in Python¶
import pydvma as dvma
dataset = dvma.load_data('measurement.dvma') # or record with log_data
freq = dvma.calculate_fft(dataset.time_data_list[0])
Install the Python interface with pip install pydvma (analysis-only
core; add [soundcard,ni] for the hardware backends, or [serve] for
the browser app's local bridge). See
Installation and the
Python interface guides.
Documentation Overview¶
- Getting Started: Installation and setup instructions
- Web Logger: The browser-based interface — acquisition, live monitoring, analysis, modal fitting, calibration and export
- Python Interface: Scripting acquisition and analysis in notebooks
- API Reference: Detailed API documentation
- Examples: Practical examples and tutorials
Contributing¶
Contributions to this project are welcomed, keeping in mind the project aims above:
- If you find a bug, please report using GitHub's issue tracker
- For bug-fixes and refinements: please feel free to clone the repository, make edits and create a pull request with a clear description of changes made
- If you would like to make a more significant contribution or change, then please be in contact to outline your suggestion
See the Contributing page for more details.
Support & citation¶
pydvma is free and open for everyone — nothing is gated. If it supports your teaching or research, please consider citing it — see the Support & citation page.
License¶
This project is licensed under the BSD 3-Clause License - see the License page for details.